241 lines
No EOL
6.2 KiB
Groovy
241 lines
No EOL
6.2 KiB
Groovy
pipeline {
|
|
agent {
|
|
label 'dockermain'
|
|
}
|
|
|
|
|
|
options {
|
|
buildDiscarder(
|
|
logRotator(
|
|
numToKeepStr: '5'
|
|
)
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage("Clean Up Repo") {
|
|
steps {
|
|
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
git reset --hard
|
|
git clean -xfd
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
stage("Clean Docker Caches") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker system prune --volumes -f
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Stop Workers") {
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
docker-compose down
|
|
|
|
docker stop -t 10 linuxagent || true
|
|
docker stop -t 10 linuxfs || true
|
|
docker stop -t 10 archagent || true
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Debian Base") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/debian:base DebianBase
|
|
docker push git.zontreck.com/packages/debian:base
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Builder Debian Compiler") {
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
|
|
docker build -t git.zontreck.com/packages/debian:build DebianBuilder
|
|
docker push git.zontreck.com/packages/debian:build
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build ADK") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/adk:latest AndroidSDK
|
|
docker push git.zontreck.com/packages/adk:latest
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Flutter") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/flutter:latest FlutterSdk
|
|
docker push git.zontreck.com/packages/flutter:latest
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build AppImage Layer") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/appimage:latest AppImage
|
|
docker push git.zontreck.com/packages/appimage:latest
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Linux Node") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/buildenvironments:linux LinuxGeneralCompiler
|
|
docker push git.zontreck.com/packages/buildenvironments:linux
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Linux Firestorm Node") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/buildenvironments:linuxfs FirestormLinux
|
|
docker push git.zontreck.com/packages/buildenvironments:linuxfs
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Arch Base") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/arch:base ArchBase
|
|
docker push git.zontreck.com/packages/arch:base
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Arch Develop") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/arch:build ArchBuilder
|
|
docker push git.zontreck.com/packages/arch:build
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build DIND Images") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker build -t git.zontreck.com/packages/dind:latest DIND
|
|
docker push git.zontreck.com/packages/dind:latest
|
|
|
|
docker build -t git.zontreck.com/packages/buildenvironments:dind DIND/Agent
|
|
docker push git.zontreck.com/packages/buildenvironments:dind
|
|
|
|
docker build -t git.zontreck.com/packages/dind:wings DIND/Wings
|
|
docker push git.zontreck.com/packages/dind:wings
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build NextCloud Image") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
|
|
docker build -t git.zontreck.com/packages/nextcloud:latest NextCloud
|
|
docker push git.zontreck.com/packages/nextcloud:latest
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build Jenkins Image") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
|
|
docker build -t git.zontreck.com/packages/jenkins:latest Jenkins
|
|
docker push git.zontreck.com/packages/jenkins:latest
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Clean Up Caches") {
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
docker system prune --volumes -f
|
|
'''
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
} |