unrar-arm64/Jenkinsfile

45 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2020-01-08 17:06:28 -05:00
pipeline {
environment {
registry = 'https://registry.hub.docker.com'
registryCredential = 'dockerhub_jcabillot'
dockerImage = 'jcabillot/unrar-arm64'
}
2021-01-01 19:56:24 -05:00
//agent { label 'arm64' }
agent {
kubernetes {
defaultContainer 'docker' // All `steps` instructions will be executed by this container
yamlFile 'Jenkinsfile-pod-template.yml'
}
}
2020-01-08 17:06:28 -05:00
triggers {
cron('@midnight')
}
stages {
stage('Clone repository') {
steps{
checkout scm
}
}
stage('Build image') {
steps{
2021-01-01 19:56:24 -05:00
sh 'docker build --force-rm=true --no-cache=true --network host --pull -t ${dockerImage} .'
2020-01-08 17:06:28 -05:00
}
}
stage('Deploy Image') {
steps{
script {
withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) {
sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}'
sh 'docker push ${dockerImage}'
}
}
}
}
}
}