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
# Install tea
RUN git clone https://gitea.com/gitea/tea.git
RUN cd tea && make && make install
RUN apk add --no-cache tea
COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy

19
Jenkinsfile vendored
View File

@ -1,9 +1,7 @@
#!groovy
pipeline {
agent {
label 'linux'
}
agent none
stages {
stage('Build/Push Docker Image') {
@ -11,6 +9,9 @@ pipeline {
beforeAgent true;
branch 'main'
}
agent {
label 'linux'
}
environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
}
@ -20,16 +21,14 @@ pipeline {
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
}
}
stage('Build & Push') {
parallel {
stage('Default Image') {
stages {
stage('Build Default Image') {
stage('Build') {
steps {
sh 'docker build -t fah16145/good-old-jenkins:latest .'
}
}
stage('Push Default Image') {
stage('Push') {
steps {
sh 'docker push fah16145/good-old-jenkins:latest'
}
@ -38,12 +37,12 @@ pipeline {
}
stage('Alpine Image') {
stages {
stage('Build Alpine Image') {
stage('Build') {
steps {
sh 'docker build -t fah16145/good-old-jenkins:alpine alpine/'
}
}
stage('Push Alpine Image') {
stage('Push') {
steps {
sh 'docker push fah16145/good-old-jenkins:alpine'
}
@ -51,8 +50,6 @@ pipeline {
}
}
}
}
}
post {
always {
sh 'docker logout'

View File

@ -5,7 +5,8 @@ RUN addgroup --gid 281 docker
RUN addgroup jenkins docker
# 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