Skip to content

Commit

Permalink
Merge pull request #32 from WorldBank-Transport/develop
Browse files Browse the repository at this point in the history
Cache Docker layers and set VERSION in correct run step
  • Loading branch information
olafveerman authored Jun 14, 2018
2 parents cc47c17 + bf7404f commit 60ed044
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:

steps:
- checkout
- setup_remote_docker
- setup_remote_docker:
docker_layer_caching: true

- run:
name: Build base Docker image ram-tools
Expand Down Expand Up @@ -48,7 +49,8 @@ jobs:

steps:
- checkout
- setup_remote_docker
- setup_remote_docker:
docker_layer_caching: true

- add_ssh_keys:
fingerprints:
Expand Down Expand Up @@ -84,6 +86,9 @@ jobs:
- run:
name: Tag and push Docker image for ram-vt's stable version
command: |
# Grab version from package.json and prepend with ram-analysis-v (ram-analysis-v0.5.0)
VERSION=v$(grep -m1 version ram-vt/package.json | awk -F: '{ print $2 }' | sed 's/[", ]//g')
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWD
echo Pushing image to Docker Hub with ${VERSION} tag
Expand All @@ -101,7 +106,8 @@ jobs:

steps:
- checkout
- setup_remote_docker
- setup_remote_docker:
docker_layer_caching: true

- add_ssh_keys:
fingerprints:
Expand Down Expand Up @@ -137,6 +143,9 @@ jobs:
- run:
name: Tag and push Docker image for ${DOCKER_IMAGE}'s stable version
command: |
# Grab version from package.json and prepend with ram-analysis-v (ram-analysis-v0.5.0)
VERSION=v$(grep -m1 version ram-analysis/package.json | awk -F: '{ print $2 }' | sed 's/[", ]//g')
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWD
echo Pushing image to Docker Hub with ${VERSION} tag
Expand Down

0 comments on commit 60ed044

Please sign in to comment.