From 94bc8a86dcb70a5c0ee29cdab91a9ad0f739be9d Mon Sep 17 00:00:00 2001 From: Roberto Berto Date: Sat, 8 Jun 2024 17:21:57 -0300 Subject: build .deb packages using docker --- Jenkinsfile | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'Jenkinsfile') diff --git a/Jenkinsfile b/Jenkinsfile index 7dd07b7..dfc07ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,31 +1,46 @@ pipeline { agent any triggers { - cron('0 18 * * *') // run daily on 18:00 + cron('0 18 * * *') // run daily at 18:00 } environment { REPO_URL = credentials('repo-url') - } + AWS_PROFILE = credentials('aws-profile') + } stages { stage('Checkout') { steps { - git "${REPO_URL}" + script { + git "${REPO_URL}" + } } } stage('Build Packages') { steps { - sh 'scripts/build_packages.sh' + script { + docker.build('vyos-apt-builder').inside { + sh 'scripts/build_packages.sh' + } + } } } stage('Update APT Repo') { steps { - sh 'scripts/update_repo.sh' + script { + docker.build('vyos-apt-builder').inside { + sh 'scripts/update_repo.sh' + } + } } } stage('Upload to R2') { steps { - withCredentials([string(credentialsId: 'aws-profile', variable: 'AWS_PROFILE')]) { - sh 'scripts/upload_repo.sh' + script { + docker.build('vyos-apt-builder').inside { + withCredentials([string(credentialsId: 'aws-profile', variable: 'AWS_PROFILE')]) { + sh 'scripts/upload_repo.sh' + } + } } } } -- cgit v1.2.3