Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Commit

Permalink
build the docker image from the pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Dec 8, 2017
1 parent 35f5235 commit b029631
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ pipeline {
}

stages {
stage('Dockerize') {
steps {
checkout scm

script {
docker.build("devsecops-builder:${env.BUILD_ID}")
}
}
}

stage('Build') {
agent {
// we really just want to use `dockerfile`, but that doesn't (seem to) support `args`
docker {
image '18fgsa/devsecops-builder'
alwaysPull true
image "devsecops-builder:${env.BUILD_ID}"
// https://support.cloudbees.com/hc/en-us/articles/218583777-How-to-set-user-in-docker-image-
args '-u jenkins:jenkins'
}
Expand All @@ -24,7 +33,6 @@ pipeline {
sh 'ansible-playbook --version'
sh 'terraform version'

checkout scm
sh 'pwd'
sh 'ls -a'

Expand Down

0 comments on commit b029631

Please sign in to comment.