Upload files to ''
This commit is contained in:
Vendored
+31
@@ -0,0 +1,31 @@
|
|||||||
|
pipeline {
|
||||||
|
agent { label 'linux' }
|
||||||
|
options {
|
||||||
|
buildDiscarder(logRotator(numToKeepStr: '5'))
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
DOCKERHUB_CREDENTIALS = credentials('dockerhub')
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'docker build -t buzzerburger/test:latest ./app'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Login') {
|
||||||
|
steps {
|
||||||
|
sh 'echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Push') {
|
||||||
|
steps {
|
||||||
|
sh 'docker push buzzerburger/test:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh 'docker logout'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user