Compare commits

...

26 Commits

Author SHA1 Message Date
5944805d27 refactor: 💡 Added TODO comment to fix alpine image, still not working doing that later
All checks were successful
andreas-personal/jenkins-ssh-docker-agent/pipeline/head This commit looks good
2025-06-06 05:40:52 +02:00
355dcb3816 fix: 💚 Maybe Fix Alpine now ???
All checks were successful
andreas-personal/jenkins-ssh-docker-agent/pipeline/head This commit looks good
2025-06-06 05:33:36 +02:00
16f4ca20a1 fix: 💚 Maybe Fix alpine image
All checks were successful
andreas-personal/jenkins-ssh-docker-agent/pipeline/head This commit looks good
2025-06-06 05:27:43 +02:00
5c7e43445a fix: 💚 Add Java to path for SSH Sessions ? maybe fix agent
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2025-06-06 05:12:04 +02:00
5f367cc3aa feat: 👷 Use local gitea package registry
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2025-06-06 04:09:23 +02:00
ece29dd217 fix: 💚 Just remove flutter since no longer using it
All checks were successful
andreas-personal/jenkins-ssh-docker-agent/pipeline/head This commit looks good
2025-06-06 03:59:54 +02:00
2ca9c9dbe4 fix: 💚 Fix Wrongly formatted line 2025-06-06 03:39:25 +02:00
6df34b6236 fix: 💚 Fix Flutter build on alpine image, and AutoFormatter for Dockerfile, and vscode workspace
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2025-06-06 03:35:48 +02:00
5966d4f447 Comment out installation of tea-cli
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-08-16 21:50:29 +02:00
3b3c3558a1 feat: Enable git lfs
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-06-04 02:51:26 +02:00
ed74cfcdf4 fix: 🐛 Add Dart global to path
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-05-23 22:01:05 +02:00
612f1350f8 feat: Add flutter_distributor
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-05-23 21:35:37 +02:00
6141fdc54c feat: Update to jdk21
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-29 22:48:12 +02:00
819392a885 Added Channel and upgrade command to Alpine (alpine still does not work)
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-16 01:22:15 +02:00
51c04bc837 Added possible missing dependencies
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-16 01:17:13 +02:00
e8ac6e80bf Missing Dependeny for flutter
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-16 01:11:50 +02:00
ba3a0025e7 Added missing apt-get update
Some checks reported errors
andreas-personal/jenkins-ssh-docker-agent/pipeline/head Something is wrong with the build of this commit
2024-04-16 01:10:44 +02:00
5d4415b9a1 Install flutter from source since apk doesn't work
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-16 01:07:30 +02:00
a56f0a86e1 remove flutter upgrade from alpine-image
All checks were successful
andreas-personal/jenkins-ssh-docker-agent/pipeline/head This commit looks good
2024-04-16 00:59:32 +02:00
d4b7efc44a remove channel change alpine image
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-16 00:58:20 +02:00
44ccc78236 Removed NodeJS and fix Flutter Install error in alpine
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-04-16 00:50:14 +02:00
1ab094973b Fixed typo
Some checks reported errors
andreas-personal/jenkins-ssh-docker-agent/pipeline/head Something is wrong with the build of this commit
2024-04-16 00:44:44 +02:00
79f46c59a2 Add tea and make docker build parallel
Some checks reported errors
andreas-personal/jenkins-ssh-docker-agent/pipeline/head Something is wrong with the build of this commit
2024-04-16 00:42:29 +02:00
c8060531d6 Added nodejs and npm to agent
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-03-14 17:40:39 +01:00
619613928d Merge branch 'main' of gitea.fahrecker.com:andreas-personal/jenkins-ssh-docker-agent
Some checks failed
andreas-personal/jenkins-ssh-docker-agent/pipeline/head There was a failure building this commit
2024-03-14 06:44:41 +01:00
befe29b9a4 Added openssl to default image 2024-03-14 06:44:35 +01:00
4 changed files with 81 additions and 64 deletions

View File

@ -0,0 +1,8 @@
{
"folders": [
{
"path": ".."
}
],
"settings": {}
}

View File

@ -1,46 +1,26 @@
FROM jenkins/ssh-agent
FROM jenkins/ssh-agent:latest-jdk21
RUN groupadd -g 281 docker
RUN usermod -aG docker jenkins
RUN apt-get update
RUN apt-get install -y\
ca-certificates \
curl \
gnupg
RUN apt-get install -y ca-certificates \
curl \
gnupg
RUN mkdir -m 0755 -p /etc/apt/keyrings
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list >/dev/null
RUN apt-get update
RUN apt-get install -y docker-ce-cli
# Install flutter
RUN apt-get update
RUN apt-get install -y\
curl git wget \
unzip libgconf-2-4 gdb \
libstdc++6 libglu1-mesa fonts-droid-fallback \
lib32stdc++6 python3 sed
#Install OpenSSL
RUN apt-get install -y openssl
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
RUN git config --global --add safe.directory /usr/local/flutter
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
RUN chown -R jenkins:jenkins /usr/local/flutter
# Run flutter doctor and upgrade
USER jenkins
RUN flutter config --no-cli-animations
RUN flutter doctor -v
RUN flutter channel master
RUN flutter upgrade
USER root
#Install git lfs
RUN apt-get install -y git-lfs
RUN git lfs install --system

72
Jenkinsfile vendored
View File

@ -1,7 +1,9 @@
#!groovy
pipeline {
agent none
agent {
label 'linux'
}
stages {
stage('Build/Push Docker Image') {
@ -9,42 +11,58 @@ pipeline {
beforeAgent true;
branch 'main'
}
agent {
label 'linux'
}
environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
def tag = sh(returnStdout: true, script: 'git rev-parse --short=10 HEAD').trim()
}
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('Default Image') {
stages {
stage('Build') {
steps {
sh 'docker build -t fah16145/jenkins-ssh-docker-agent:latest .'
stage('Build & Push') {
parallel {
stage('Default Image') {
stages {
stage('Build Default Image') {
steps {
sh '''docker build \
-t fah16145/jenkins-ssh-docker-agent:latest \
-t gitea.fahrecker.com/andreas-personal/jenkins-ssh-docker-agent:latest \
.
'''
}
}
stage('Push Default Image') {
steps {
sh 'docker push fah16145/jenkins-ssh-docker-agent:latest'
sh 'docker push gitea.fahrecker.com/andreas-personal/jenkins-ssh-docker-agent:latest'
}
}
}
}
stage('Push') {
steps {
sh 'docker push fah16145/jenkins-ssh-docker-agent:latest'
}
}
}
}
stage('Alpine Image') {
stages {
stage('Build') {
steps {
sh 'docker build -t fah16145/jenkins-ssh-docker-agent:alpine alpine/'
}
}
stage('Push') {
steps {
sh 'docker push fah16145/jenkins-ssh-docker-agent:alpine'
stage('Alpine Image') {
stages {
stage('Build Alpine Image') {
steps {
sh '''docker build \
-t fah16145/jenkins-ssh-docker-agent:alpine \
-t gitea.fahrecker.com/andreas-personal/jenkins-ssh-docker-agent:alpine \
alpine/
'''
}
}
stage('Push Alpine Image') {
steps {
sh 'docker push fah16145/jenkins-ssh-docker-agent:alpine'
sh 'docker push gitea.fahrecker.com/andreas-personal/jenkins-ssh-docker-agent:alpine'
}
}
}
}
}

View File

@ -1,14 +1,25 @@
FROM jenkins/ssh-agent:alpine
FROM jenkins/ssh-agent:alpine-jdk21
RUN addgroup --gid 281 docker
RUN addgroup jenkins docker
RUN apk add --no-cache docker docker-compose
# Install flutter
RUN apk add --no-cache flutter
# Install tea
RUN apk add --no-cache tea
RUN flutter config --no-cli-animations
RUN flutter doctor -v
RUN flutter channel master
RUN flutter upgrade
#Install OpenSSL
RUN apk add --no-cache openssl
#Install git lfs
RUN apk add --no-cache git-lfs
RUN git lfs install --system
# TODO: doesnt work still, something about not finding the java binary over ssh
# Configure SSH to behave more like Debian - load environment properly
#RUN echo 'PermitUserEnvironment yes' >> /etc/ssh/sshd_config
#RUN echo 'UsePAM yes' >> /etc/ssh/sshd_config
# Add Java to environment file that SSH will read
#RUN echo 'PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' >> /etc/environment