Added jenkinsfile
This commit is contained in:
parent
8019ef9ccf
commit
d2cf69a319
30
Jenkinsfile
vendored
Normal file
30
Jenkinsfile
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(daysToKeepStr: '180', numToKeepStr: '30'))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Setup Vars') {
|
||||
steps {
|
||||
script {
|
||||
dockerBuildImage = 'registry.digitalocean.com/nerdfortress/cardano'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('build: create container') {
|
||||
steps {
|
||||
sh "docker build -t ${env.dockerBuildImage} ${env.tempDir}"
|
||||
}
|
||||
}
|
||||
stage('build: push container') {
|
||||
steps {
|
||||
sh "doctl auth init"
|
||||
sh "doctl registry login"
|
||||
sh "docker push ${env.dockerBuildImage}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user