diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..9ba19e3 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,36 @@ +pipeline { + agent { label 'pipes-docker-agent' } + parameters { + string(name: 'GIT_URL', defaultValue: '', description: 'Url of helm chart git repo') + string(name: 'BRANCH_NAME', defaultValue: '', description: 'Branch name from helm repo') + string(name: 'TAG_NAME', defaultValue: '', description: 'Latest tag') + string(name: 'REPO_PATH', defaultValue: '', description: 'Path in acr') + } + environment { + // URL of helm repo + GIT_URL = "${params.GIT_URL}" + BRANCH_NAME= "${params.BRANCH_NAME}" + + GITHUB = credentials('github_credential') + GITHUB_USERNAME = "${env.GITHUB_USR}" + GITHUB_PASSWORD = "${env.GITHUB_PSW}" + + + + EMAIL = "nathan_wagner@gap.com" + } +stages { + stage('GitCheckOut') { + checkout([$class: 'GitSCM', branches: [[name: "${env.CHECKOUT}"]], extensions: [], userRemoteConfigs: [[credentialsId: 'gitea', url: "$GIT_URL"]]]) + +} + stage('buildPush') { + sh(''' + docker buildx create docker buildx create --bootstrap --name=jenkins-agent --driver=kubernetes --driver-opt=namespace=jenkinsagent --driver-opt=qemu.install=true --driver-opt=insecure=true + docker buildx build . -t registry.local:/rgbBoard:v0.0.1 --push --platform=linux/arm64,linux/amd64 + ''') + } + +} + +}