Added Jenkins Build Steps fro alpine Build
Some checks failed
andreas-personal/jenkins-with-docker/pipeline/head There was a failure building this commit
Some checks failed
andreas-personal/jenkins-with-docker/pipeline/head There was a failure building this commit
This commit is contained in:
parent
25156a931b
commit
225469414f
35
Jenkinsfile
vendored
35
Jenkinsfile
vendored
@ -16,19 +16,38 @@ pipeline {
|
|||||||
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
|
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
|
||||||
steps {
|
|
||||||
sh 'docker build -t fah16145/jenkins-with-docker:latest .'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Login') {
|
stage('Login') {
|
||||||
steps {
|
steps {
|
||||||
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
|
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Push') {
|
stage('Default Image') {
|
||||||
steps {
|
stages {
|
||||||
sh 'docker push fah16145/jenkins-with-docker:latest'
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'docker build -t fah16145/jenkins-with-docker:latest .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Push') {
|
||||||
|
steps {
|
||||||
|
sh 'docker push fah16145/jenkins-with-docker:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Alpine Image') {
|
||||||
|
stages {
|
||||||
|
stage('Build') {
|
||||||
|
steps {
|
||||||
|
sh 'cd alpine'
|
||||||
|
sh 'docker build -t fah16145/jenkins-with-docker:alpine .'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Push') {
|
||||||
|
steps {
|
||||||
|
sh 'docker push fah16145/jenkins-with-docker:alpine'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,7 @@ RUN usermod -aG docker jenkins
|
|||||||
|
|
||||||
RUN apk add --no-cache docker docker-compose
|
RUN apk add --no-cache docker docker-compose
|
||||||
|
|
||||||
|
COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy
|
||||||
|
|
||||||
USER jenkins
|
USER jenkins
|
||||||
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"
|
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user