Updated jenkins file
This commit is contained in:
parent
aec0c72f9c
commit
83f9d30c20
33
Jenkinsfile
vendored
33
Jenkinsfile
vendored
@ -1,16 +1,29 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
stage('docker build') {
|
stage('build') {
|
||||||
steps {
|
agent {
|
||||||
echo 'Starting docker image build'
|
docker {
|
||||||
script {
|
image 'rust'
|
||||||
docker.withRegistry("https://pkg.northcode.no", 'docker-login') {
|
reuseNode true
|
||||||
def image = docker.build("pkg.northcode.no/rollux")
|
}
|
||||||
image.push()
|
}
|
||||||
}
|
steps {
|
||||||
|
sh 'cargo build --release'
|
||||||
|
stash includes: 'target/release/rollux', name: 'app'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('docker build') {
|
||||||
|
steps {
|
||||||
|
unstash 'app'
|
||||||
|
echo 'Starting docker image build'
|
||||||
|
script {
|
||||||
|
docker.withRegistry("https://pkg.northcode.no", 'docker-login') {
|
||||||
|
def image = docker.build("pkg.northcode.no/rollux")
|
||||||
|
image.push()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user