Compare commits

..

12 Commits

Author SHA1 Message Date
8ad8810541 feat: 👷 Use Gitea Container Registry
All checks were successful
andreas-personal/good-old-jenkins/pipeline/head This commit looks good
2025-06-06 05:43:25 +02:00
be6926acd4 refactor: 🔇 Remove Debug check of User
All checks were successful
andreas-personal/good-old-jenkins/pipeline/head This commit looks good
2025-06-06 03:21:13 +02:00
7fc26a9ac1 fix: 💚 Test which user and remove sudo call
All checks were successful
andreas-personal/good-old-jenkins/pipeline/head This commit looks good
2025-06-06 03:19:02 +02:00
1b63ae1b7a fix: 💚 Fix Default Image, maybe?
Some checks failed
andreas-personal/good-old-jenkins/pipeline/head There was a failure building this commit
2025-06-06 03:16:15 +02:00
04a87313a2 Comment out install of Tea-Cli
Some checks failed
andreas-personal/good-old-jenkins/pipeline/head There was a failure building this commit
2024-08-16 22:01:52 +02:00
af4c8c0d68 fix: 🐛 Fix git-lfs install
Some checks failed
andreas-personal/good-old-jenkins/pipeline/head There was a failure building this commit
2024-06-05 02:36:56 +02:00
31f228a915 feat: Add git lfs
Some checks failed
andreas-personal/good-old-jenkins/pipeline/head There was a failure building this commit
2024-06-05 02:25:17 +02:00
99dbf82b54 feat: update to use jdk21
All checks were successful
andreas-personal/good-old-jenkins/pipeline/head This commit looks good
2024-04-29 22:44:00 +02:00
046f87d27d Make Docker HUB Creds local to Login Step
All checks were successful
andreas-personal/good-old-jenkins/pipeline/head This commit looks good
2024-04-16 00:34:25 +02:00
cdb18bf2a5 Add golang to default image
All checks were successful
andreas-personal/good-old-jenkins/pipeline/head This commit looks good
2024-04-16 00:30:47 +02:00
b8862de242 Only install git and make instead of build essentials 2024-04-16 00:29:43 +02:00
aedd1d77a0 Added Build-Essential to Default image
Some checks failed
andreas-personal/good-old-jenkins/pipeline/head There was a failure building this commit
2024-04-16 00:28:43 +02:00
3 changed files with 32 additions and 10 deletions

View File

@ -1,15 +1,21 @@
FROM jenkins/jenkins:latest
FROM jenkins/jenkins:latest-jdk21
USER root
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 apt-get update && apt-get install -y git make golang
# 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
#Install git lfs
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt-get install -y git-lfs
RUN git lfs install --system
# Install jenkins plugins
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"

22
Jenkinsfile vendored
View File

@ -11,13 +11,15 @@ pipeline {
beforeAgent true;
branch 'main'
}
environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
}
stages {
stage('Login') {
environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
PACKAGE_REGISTRY_CREDENTIALS = credentials('gitea-package-registry-jenkins-user')
}
steps {
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
sh 'docker login -u ${PACKAGE_REGISTRY_CREDENTIALS_USR} -p ${PACKAGE_REGISTRY_CREDENTIALS_PSW} gitea.fahrecker.com'
}
}
stage('Build & Push') {
@ -26,12 +28,17 @@ pipeline {
stages {
stage('Build Default Image') {
steps {
sh 'docker build -t fah16145/good-old-jenkins:latest .'
sh '''docker build \
-t fah16145/good-old-jenkins:latest \
-t gitea.fahrecker.com/andreas-personal/good-old-jenkins:latest \
.
'''
}
}
stage('Push Default Image') {
steps {
sh 'docker push fah16145/good-old-jenkins:latest'
sh 'docker push gitea.fahrecker.com/andreas-personal/good-old-jenkins:latest'
}
}
}
@ -40,12 +47,17 @@ pipeline {
stages {
stage('Build Alpine Image') {
steps {
sh 'docker build -t fah16145/good-old-jenkins:alpine alpine/'
sh '''docker build \
-t fah16145/good-old-jenkins:alpine \
-t gitea.fahrecker.com/andreas-personal/good-old-jenkins:alpine \
alpine/
'''
}
}
stage('Push Alpine Image') {
steps {
sh 'docker push fah16145/good-old-jenkins:alpine'
sh 'docker push gitea.fahrecker.com/andreas-personal/good-old-jenkins:alpine'
}
}
}

View File

@ -1,4 +1,4 @@
FROM jenkins/jenkins:alpine
FROM jenkins/jenkins:alpine-jdk21
USER root
RUN addgroup --gid 281 docker
@ -9,6 +9,10 @@ RUN apk add --no-cache tea
COPY --chown=jenkins:jenkins executors.groovy /usr/share/jenkins/ref/init.groovy.d/executors.groovy
#Install git lfs
RUN apk add --no-cache git-lfs
RUN git lfs install --system
# Install jenkins plugins
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean docker-workflow"