Run self-versioning from Dockerhub

This commit is contained in:
Layla 2019-12-20 12:15:16 -05:00
parent e9412d0388
commit d74b0ad05d

7
Jenkinsfile vendored
View File

@ -11,14 +11,15 @@ pipeline {
DOCKER_CREDENTIALS = 'rbnopsDockerHubToken' DOCKER_CREDENTIALS = 'rbnopsDockerHubToken'
//Image tag to use for self-versioning //Image tag to use for self-versioning
SELF_SEMVER_TAG = "develop" SELF_SEMVER_TAG = "master"
} }
stages { stages {
//Runs versioning in docker container //Runs versioning in docker container
stage('Self Version') { stage('Self Version') {
steps { steps {
runAutoSemver("${env.DOCKER_REGISTRY}/auto-semver:${SELF_SEMVER_TAG}") sh("docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}")
runAutoSemver("rbnops/auto-semver:${SELF_SEMVER_TAG}")
} }
post{ post{
// Update Git with status of version stage. // Update Git with status of version stage.
@ -110,7 +111,7 @@ pipeline {
stage('Push Version and Tag') { stage('Push Version and Tag') {
steps { steps {
echo "The current branch is ${env.BRANCH_NAME}." echo "The current branch is ${env.BRANCH_NAME}."
gitPushTags(env.GITHUB_KEY ) gitPushTags(env.GITHUB_KEY)
} }
} }
} }