Compare commits

..

No commits in common. "f58dc78f4e1232d7d203573b0122728a24864557" and "c7bd2d6cc6ec6907c8dadc076c9dc37ea048fbbd" have entirely different histories.

3 changed files with 30 additions and 33 deletions

View File

@ -5,8 +5,7 @@ RUN groupadd -g 281 docker
RUN usermod -aG docker jenkins RUN usermod -aG docker jenkins
# Install tea # Install tea
RUN git clone https://gitea.com/gitea/tea.git RUN apk add --no-cache tea
RUN cd tea && make && make install
COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy

55
Jenkinsfile vendored
View File

@ -1,9 +1,7 @@
#!groovy #!groovy
pipeline { pipeline {
agent { agent none
label 'linux'
}
stages { stages {
stage('Build/Push Docker Image') { stage('Build/Push Docker Image') {
@ -11,6 +9,9 @@ pipeline {
beforeAgent true; beforeAgent true;
branch 'main' branch 'main'
} }
agent {
label 'linux'
}
environment { environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145') DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
} }
@ -20,34 +21,30 @@ pipeline {
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('Build & Push') { stage('Default Image') {
parallel { stages {
stage('Default Image') { stage('Build') {
stages { steps {
stage('Build Default Image') { sh 'docker build -t fah16145/good-old-jenkins:latest .'
steps {
sh 'docker build -t fah16145/good-old-jenkins:latest .'
}
}
stage('Push Default Image') {
steps {
sh 'docker push fah16145/good-old-jenkins:latest'
}
}
} }
} }
stage('Alpine Image') { stage('Push') {
stages { steps {
stage('Build Alpine Image') { sh 'docker push fah16145/good-old-jenkins:latest'
steps { }
sh 'docker build -t fah16145/good-old-jenkins:alpine alpine/' }
} }
} }
stage('Push Alpine Image') { stage('Alpine Image') {
steps { stages {
sh 'docker push fah16145/good-old-jenkins:alpine' stage('Build') {
} steps {
} sh 'docker build -t fah16145/good-old-jenkins:alpine alpine/'
}
}
stage('Push') {
steps {
sh 'docker push fah16145/good-old-jenkins:alpine'
} }
} }
} }

View File

@ -5,7 +5,8 @@ RUN addgroup --gid 281 docker
RUN addgroup jenkins docker RUN addgroup jenkins docker
# Install tea # Install tea
RUN apk add --no-cache tea RUN git clone https://gitea.com/gitea/tea.git
RUN cd tea && make && make install
COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy