-
-
Save anarquias/59f645e746bcb0fc564c7b4b29b111f2 to your computer and use it in GitHub Desktop.
Jenkins
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
stages { | |
stage('Checkout Source') { | |
steps { | |
git url:'https://github.com/vamsijakkula/hellowhale.git', branch:'master' | |
} | |
} | |
stage("Build image") { | |
steps { | |
script { | |
myapp = docker.build("vamsijakkula/hellowhale:${env.BUILD_ID}") | |
} | |
} | |
} | |
stage("Push image") { | |
steps { | |
script { | |
docker.withRegistry('https://registry.hub.docker.com', 'dockerhub') { | |
myapp.push("latest") | |
myapp.push("${env.BUILD_ID}") | |
} | |
} | |
} | |
} | |
stage('Deploy App') { | |
steps { | |
script { | |
kubernetesDeploy(configs: "hellowhale.yml", kubeconfigId: "mykubeconfig") | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment