From fcd7d1e2ce2ab0595a19086e89988f27a8fe7d90 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 8 Jan 2023 22:17:44 +0000 Subject: [PATCH] Add 'Jenkinsfil' --- Jenkinsfil | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Jenkinsfil diff --git a/Jenkinsfil b/Jenkinsfil new file mode 100644 index 0000000..3a8c5b2 --- /dev/null +++ b/Jenkinsfil @@ -0,0 +1,25 @@ +pipeline { +agent any +stages { + /*stage('GitCheckOut') { + steps{ + checkout([$class: 'GitSCM', branches: [[name: "${env.CHECKOUT}"]], extensions: [], userRemoteConfigs: [[credentialsId: 'gitea', url: "$GIT_URL"]]]) + } + +}*/ + stage('buildPush') { + steps{ + sh 'docker buildx rm jenkins-agent || echo "none there"' + sh '''#!/bin/bash + docker buildx create --bootstrap --name=jenkins-agent --driver=kubernetes --driver-opt=namespace=jenkinsagent --driver-opt=qemu.install=true --driver-opt=\\"nodeselector=kubernetes.io/arch=amd64\\" --driver-opt=\\"image=registry.local/buildkit-wagnerca:stable-3-rootless\\" --use + ''' + sh 'docker buildx build . -t registry.local/rgbarm64lib:v0.0.$BUILD_NUMBER --push --platform=linux/arm64,linux/amd64' + sh 'docker buildx build . -t registry.local/rgbarm64lib:latest --push --platform=linux/arm64,linux/amd64' + sh 'docker buildx rm jenkins-agent' + } + + +} + +} +} \ No newline at end of file