File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 55
55
script :
56
56
- ./gradlew check
57
57
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash deployment/script/travis_push_container.sh; fi
58
- - if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then ./gradlew dockerPush; fi
59
58
after_success :
60
59
- ./gradlew sonarqube
61
60
- stage : deploy to development
Original file line number Diff line number Diff line change @@ -8,3 +8,8 @@ cd $TRAVIS_BUILD_DIR
8
8
eval $( aws sts assume-role --role-arn " $OPERATIONS_ROLE_ARN " --role-session-name " ${TRAVIS_REPO_SLUG// \/ / -} " | jq -r ' .Credentials | @sh "export AWS_SESSION_TOKEN=\(.SessionToken)\nexport AWS_ACCESS_KEY_ID=\(.AccessKeyId)\nexport AWS_SECRET_ACCESS_KEY=\(.SecretAccessKey) "' ) || exit 1
9
9
$( aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION ) || exit 1
10
10
./gradlew docker dockerTag dockerTagsPush publish -PTAG=$TRAVIS_BUILD_NUMBER -PREPOSITORY_URI=$REPOSITORY_URI || exit 1
11
+
12
+ # Only tag latest when we are building master
13
+ if [ " $TRAVIS_BRANCH " == " master" ]; then
14
+ ./gradlew dockerPush -PTAG=$TRAVIS_BUILD_NUMBER -PREPOSITORY_URI=$REPOSITORY_URI || exit 1
15
+ fi
You can’t perform that action at this time.
0 commit comments