Skip to content

Commit

Permalink
add Jenkinsfile to build/push build image instead of another repo
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Lamy <[email protected]>
  • Loading branch information
olamy committed Jan 19, 2023
1 parent 30327e1 commit 7cbdbca
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04

ENV MAVEN_VERSION 3.8.3
ENV MAVEN_VERSION 3.8.7
ENV NODE_VERSION 10.13.0
ENV PHANTOMJS_VERSION 2.1.1
ARG UID=1000
Expand Down
22 changes: 22 additions & 0 deletions Jenkinsfile-build-image
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pipeline {
agent any

options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
disableConcurrentBuilds()
disableResume()
timeout(time: 60, unit: "MINUTES")
}

stages {
stage('Build docker build image') {
steps {
withDockerRegistry([credentialsId: '81012788-1be1-49e4-bfab-a882101f0442', url: ""]) {
sh('docker build --no-cache -t blueocean/blueocean:build_env --build-arg GID=$(id -g ${USER}) --build-arg UID=$(id -u ${USER}) - < Dockerfile.build')
sh('docker push blueocean/blueocean:build_env')
}
}
}
}

}

0 comments on commit 7cbdbca

Please sign in to comment.