diff --git a/jobs/tools/jenkins-jobs-builder.yaml b/jobs/tools/jenkins-jobs-builder.yaml new file mode 100644 index 0000000..24f7666 --- /dev/null +++ b/jobs/tools/jenkins-jobs-builder.yaml @@ -0,0 +1,36 @@ +- job: + name: jenkins-tools/swh-jenkins-jobs-builder + project-type: pipeline + description: Update jenkins jobs + node: built-in + auth-token: "ph4br1cat0r" + + properties: + - build-discarder: + days-to-keep: 7 + + dsl: | + pipeline { + agent any + + stages { + + stage('Checkout Repository') { + steps { + checkout([ + $class: 'GitSCM', + branches: [[name: 'gitlab-integration']], + userRemoteConfigs: [[ + url: "http://forge.softwareheritage.org/source/swh-jenkins-jobs.git", + ]], + ]) + } + } + + stage('Update Jenkins jobs') { + steps { + sh('tox -- update --delete-old') + } + } + } + }