Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
Include git tag in environment variable NF_IMAGE_TAG
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Mar 11, 2019
1 parent 90e934d commit c8d455b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,6 @@ ADD buildbot-git-config /root/.gitconfig
USER buildbot
ARG NF_IMAGE_VERSION
ENV NF_IMAGE_VERSION ${NF_IMAGE_VERSION:-latest}

ARG NF_IMAGE_TAG
ENV NF_IMAGE_TAG ${NF_IMAGE_TAG:-latest}
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pipeline {
anyOf { branch 'master' ; branch 'xenial' ; branch 'trusty' ; buildingTag() }
}
steps {
sh "docker build --build-arg NF_IMAGE_VERSION=${env.GIT_COMMIT} -t netlify/build:${env.BRANCH_NAME} -t netlify/build:${env.GIT_COMMIT} ."
sh "docker build --build-arg NF_IMAGE_VERSION=${env.GIT_COMMIT} --build-arg NF_IMAGE_TAG=${env.BRANCH_NAME} -t netlify/build:${env.BRANCH_NAME} -t netlify/build:${env.GIT_COMMIT} ."
}
}

Expand All @@ -25,7 +25,7 @@ pipeline {
anyOf { buildingTag() }
}
steps {
sh "docker build --build-arg NF_IMAGE_VERSION=${env.GIT_COMMIT} --squash -t netlify/build:${env.BRANCH_NAME}-squash ."
sh "docker build --build-arg NF_IMAGE_VERSION=${env.GIT_COMMIT} --build-arg NF_IMAGE_TAG=${env.BRANCH_NAME} --squash -t netlify/build:${env.BRANCH_NAME}-squash ."
}
}

Expand Down

0 comments on commit c8d455b

Please sign in to comment.