diff options
author | Leith Bade <leith@mapbox.com> | 2014-12-26 13:30:21 +1300 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2014-12-26 13:30:21 +1300 |
commit | 62d7bab59d40c5ddbc33b5be42385c2b0dfee6fb (patch) | |
tree | 51c767d398b7640308e738d8c1c8cec61aecc465 | |
parent | a9061120ceb1194fcf475501807c4c055ed56e68 (diff) | |
download | qtlocation-mapboxgl-62d7bab59d40c5ddbc33b5be42385c2b0dfee6fb.tar.gz |
Update travis stack
-rw-r--r-- | .travis.yml | 8 | ||||
-rwxr-xr-x | android/scripts/common.sh | 2 | ||||
-rwxr-xr-x | android/scripts/run-build.sh | 4 | ||||
-rw-r--r-- | travis/travis-resources.template | 66 |
4 files changed, 73 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index 9d06f91dca..14d36d655c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,13 +25,13 @@ matrix: env: global: - - secure: "bG4YYWMfl9API0MSRgmOaJrlGLv06tRg9KJNawBieZvBJbITPpxVGJZT3/l/SEJ+Rl15e2dRex4k+MGQlmT2SqPQxTEYWv1qxNigKPPcla7IWeNmWWqW8uVvFjdglojgBOK2k/xErVQtA4zDfi3mwSXH4DKwquXWsoEKmX2SV7M=" - - secure: "Cbvap9ubVKgjPe3hUhI6JGeDZzBXHpOG9RaYKh+SdoIPhKnlJiNOYm1egomi+e4uqJInlFKuVHTw7Ng9Cun6Zm0jIxpkSchv1GpsR7hmB3UGnGed19Dw8121FwuUaktN+4YnbVlsyd+u8EHD3+h58t4eELrLrZolM4rS7DL6caA=" + - secure: "MZHblLZXG/jWf2w0ZFlxCLDwx2qtGgRDODQyg1BR7JIuMz6AtWv8XR/sUczWLbiABCL0a/NzJF1g4v2pI7X69IntcjOdIABBgTh7++6+1TJ0Kp8viEltb55nQG3lHy/R6fOaI7Pj9tuCX0PCRtGA5C/fGnodLGEjy3RVOJ09ln0=" + - secure: "KaSQbhgjtV7ZCkesHmvrNsbQVjk5SPfGKB1VkWenRGYhLF45HpSRNwSxMQddZ566Pg7qIFgF1iWl/B0QW3B6AWL5WmzQ5AOJgwS876pNIc/UT7ubMPtgAtjpvw1bQvQP3B8MrB+3OE5c6tD+a3LhR9krV//dOsfErR5Yy+3Mbkc=" + - ANDROID_BUILD_INSTANCE_PROFILE: arn:aws:iam::234858372212:instance-profile/android-gl-build/travis/instance-profile/travis-mapbox-gl-native-AndroidInstanceProfile-13EA815DD8IQ9 - secure: "RiBIBfVhhaMjU5ksuwJO3shdvG9FpinBjdSv4co9jg9171SR8edNriedHjVKSIeBhSGNmZmX+twS3dJS/By6tl/LKh9sTynA+ZAYYljkE7jn881B/gMrlYvdAA6og5KvkhV1/0iJWlhuZrMTkhpDR200iLgg3EWBhWjltzmDW/I=" - secure: "CHBiUM60TolDbQnn+4IRA/tvOKwKs3g9EDvv8YHSJMg3FuHmjKQkprBasvxf3hnTXg4WLZEubmeDcyJ6RRzPP5mMSr/hksYl0pSjj/6TUecE5fHPVVeN7txVqkpOBf9i45Y+iBUQMjBb1NnDK3pHXxpnAs1Q/pe7vReErj4GF1U=" - - secure: "E1+87Ni3BxqDDTLf3Z2hjmFy0VeFzoLBPLAqchJGCxSblgjKdEbg+18TVM7faD57JI8WQ1jK5Z+p4ebqX0S5TAGlGsnFhcP7+ClntVi/pTkKZrF8ynoH8aIFhZCZ8wqaEVZeljO9ZFrW1VIxWlIqM1U8+WvcGki1NxGkPNaPhpo=" - LD_LIBRARY_PATH: '/usr/local/lib' - - TERM=dumb + - TERM: dumb before_install: - if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then sudo service mysql stop; fi diff --git a/android/scripts/common.sh b/android/scripts/common.sh index e925ea0abd..d9f1fce35c 100755 --- a/android/scripts/common.sh +++ b/android/scripts/common.sh @@ -12,7 +12,7 @@ export CXXFLAGS="-Wno-unknown-warning-option -Wno-unused-local-typedefs -Wno-unk export MASON_PLATFORM=android mkdir ./android/java/app/src/main/res/raw/ -echo "${ANDROID_KEY}" >> ./android/java/app/src/main/res/raw/token.txt +echo "${MAPBOX_ACCESS_TOKEN}" >> ./android/java/app/src/main/res/raw/token.txt make android BUILDTYPE=$BUILDTYPE diff --git a/android/scripts/run-build.sh b/android/scripts/run-build.sh index 89f266f604..f3a369045c 100755 --- a/android/scripts/run-build.sh +++ b/android/scripts/run-build.sh @@ -25,7 +25,7 @@ user_data="#!/bin/bash export JAVA_HOME=/android/jdk1.7.0_71 export ANDROID_HOME=/android/android-sdk-linux export PATH=\$PATH:/android/jdk1.7.0_71/bin - export ANDROID_KEY=$ANDROID_KEY + export MAPBOX_ACCESS_TOKEN=$MAPBOX_ACCESS_TOKEN if ./android/scripts/build-$CONFIG.sh $NAME &>../build.log; then echo 'ANDROID BUILD PASSED' @@ -42,7 +42,7 @@ id=$(aws ec2 run-instances \ --image-id $region_ami \ --count 1 \ --instance-type m3.large \ - --iam-instance-profile Name="android-gl-build" \ + --iam-instance-profile Arn="$ANDROID_BUILD_INSTANCE_PROFILE" \ --instance-initiated-shutdown-behavior terminate \ --user-data "$user_data" | jq -r '.Instances[0].InstanceId') diff --git a/travis/travis-resources.template b/travis/travis-resources.template index a0526933be..b3d2165864 100644 --- a/travis/travis-resources.template +++ b/travis/travis-resources.template @@ -117,6 +117,56 @@ "Ref": "BuildUser" } } + }, + "AndroidRole": { + "Type": "AWS::IAM::Role", + "Properties": { + "AssumeRolePolicyDocument": { + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Service": [ + "ec2.amazonaws.com" + ] + }, + "Action": [ + "sts:AssumeRole" + ] + } + ] + }, + "Policies": [ + { + "PolicyName": "android", + "PolicyDocument": { + "Statement": [ + { + "Effect": "Allow", + "Action": [ + "s3:PutObject" + ], + "Resource": [ + "arn:aws:s3:::android-gl-build/*" + ] + } + ] + } + } + ], + "Path": "/android-gl-build/travis/role/" + } + }, + "AndroidInstanceProfile": { + "Type": "AWS::IAM::InstanceProfile", + "Properties": { + "Roles": [ + { + "Ref": "AndroidRole" + } + ], + "Path": "/android-gl-build/travis/instance-profile/" + } } }, "Outputs": { @@ -132,6 +182,22 @@ "SecretAccessKey" ] } + }, + "AndroidInstanceProfile": { + "Value": { + "Fn::GetAtt": [ + "AndroidInstanceProfile", + "Arn" + ] + } + }, + "AndroidRole": { + "Value": { + "Fn::GetAtt": [ + "AndroidRole", + "Arn" + ] + } } } } |