Skip to content

Commit

Permalink
Merge pull request #208 from Augmint/staging
Browse files Browse the repository at this point in the history
fix docker image version tagging config (v1.0.9)
  • Loading branch information
treerz authored Apr 24, 2019
2 parents d1d34fe + 5048aaf commit b0d3598
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
32 changes: 17 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ before_install:
install:
- |
if [[ $BRANCH == "greenkeeper/"* ]]; then
echo Greenkeeper build using .yarnrc.greenkeeper; cp .yarnrc.greenkeeper .yarnrc; yarn install;
echo Greenkeeper build using .yarnrc.greenkeeper; cp .yarnrc.greenkeeper .yarnrc; yarn install;
else
echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile;
echo Normal build using .yarnrc and --frozen-lockfile option; yarn install --frozen-lockfile;
fi
before_script:
- greenkeeper-lockfile-update
Expand All @@ -32,22 +32,24 @@ after_success:
- echo after_success TRAVIS_BRANCH=$TRAVIS_BRANCH TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST TRAVIS_TAG=$TRAVIS_TAG TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER TRAVIS_COMMIT=$TRAVIS_COMMIT ;
- |
if [ $TRAVIS_PULL_REQUEST == "false" ]; then
if [ $TRAVIS_BRANCH == "master" ] || [[ $TRAVIS_TAG =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
if [ ! -z $TRAVIS_TAG ]; then
yarn docker:tag:version $TRAVIS_TAG;
fi
yarn docker:tag:latest; # NB: it will tag old version with latest if you tag an old commit on master
docker push augmint/contracts ;
fi
if [ $TRAVIS_BRANCH == "master" ] || [[ $TRAVIS_TAG =~ v([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
if [ ! -z $TRAVIS_TAG ]; then
yarn docker:tag:version $TRAVIS_TAG;
fi
if [ $TRAVIS_BRANCH == "master" ]; then
yarn docker:tag:latest;
fi
docker push augmint/contracts ;
fi
fi
- |
if [ "$TRAVIS_BRANCH" == "staging" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
yarn docker:tag:staging ;
docker push augmint/contracts ;
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ;
yarn docker:tag:build ;
yarn docker:tag:staging ;
docker push augmint/contracts ;
fi
after_failure:
- wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "augmint-contracts",
"version": "1.0.7",
"version": "1.0.9",
"description": "Augmint Stable Tokens - Solidity contracts",
"author": "“Augmint”",
"homepage": "https://github.com/Augmint/augmint-contracts#readme",
Expand Down Expand Up @@ -44,7 +44,7 @@
"docker:tag:build": "docker tag localdockerimage augmint/contracts:commit-$(git log -1 --format='%h'); docker tag localdockerimage augmint/contracts:build-$TRAVIS_BUILD_NUMBER",
"docker:tag:staging": "docker tag localdockerimage augmint/contracts:staging;",
"docker:tag:latest": "docker tag localdockerimage augmint/contracts:latest",
"docker:tag:version": "docker tag localdockerimage augmint/contracts:$1"
"docker:tag:version": "func () { docker tag localdockerimage augmint/contracts:${1}; }; func"
},
"devDependencies": {
"abiniser": "0.5.1",
Expand Down

0 comments on commit b0d3598

Please sign in to comment.