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

This commit is contained in:
Andreas Fahrecker 2024-04-16 00:42:29 +02:00
parent c8060531d6
commit 79f46c59a2
3 changed files with 47 additions and 30 deletions

View File

@ -20,6 +20,11 @@ RUN echo \
RUN apt-get update
RUN apt-get install -y docker-ce-cli
# Install tea
RUN apt-get install -y git make golang
RUN git clone https://gitea.com/gitea/tea.git
RUN cd tea && make && make install
# Install flutter
RUN apt-get update
RUN apt-get install -y\

61
Jenkinsfile vendored
View File

@ -1,7 +1,9 @@
#!groovy
pipeline {
agent none
agent {
label 'linux'
}
stages {
stage('Build/Push Docker Image') {
@ -9,42 +11,43 @@ pipeline {
beforeAgent true;
branch 'main'
}
agent {
label 'linux'
}
environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
}
stages {
stage('Login') {
environment {
DOCKER_HUB_CREDENTIALS = credentials('docker-hub-fah16145')
}
steps {
sh 'docker login -u ${DOCKER_HUB_CREDENTIALS_USR} -p ${DOCKER_HUB_CREDENTIALS_PSW}'
}
}
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 .'
}
}
stage('Push Default Image') {
steps {
sh 'docker push fah16145/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 alpine/'
}
}
stage('Push Alpine Image') {
steps {
sh 'docker push fah16145/jenkins-ssh-docker-agent:alpine'
}
}
}
}
}

View File

@ -5,10 +5,19 @@ RUN addgroup jenkins docker
RUN apk add --no-cache docker docker-compose
# Install tea
RUN apk add --no-cache tea
# Install flutter
RUN apk add --no-cache flutter
RUN apk add --no-cache ----repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing flutter
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 Node.js
RUN apk add --no-cache nodejs npm