Run self-versioning from Dockerhub
This commit is contained in:
		
							
								
								
									
										7
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@ -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)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user