Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9342287
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/jobs/tools/jenkins-jobs-builder.yaml b/jobs/tools/jenkins-jobs-builder.yaml
new file mode 100644
index 0000000..57e2d87
--- /dev/null
+++ b/jobs/tools/jenkins-jobs-builder.yaml
@@ -0,0 +1,58 @@
+- 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')
+ }
+ }
+
+ stage('Setup jenkins integration on gitlab') {
+ steps {
+ script {
+ projects = readYaml(file: 'jobs/swh-packages.yaml')
+ for (project in projects) {
+ if (project.containsKey("project")) {
+ def jenkinsFolder = project.get('project').get('name')
+ def repoName= project.get('project').get('repo_name')
+ build(
+ job: '/jenkins-tools/gitlab-jenkins-integration',
+ parameters: [
+ string(name: 'jenkins_job_name', value: "${jenkinsFolder}/gitlab-tests"),
+ string(name: 'gitlab_project', value: "swh/devel/${repoName}"),
+ ],
+ wait: false,
+ )
+ }
+ }
+ }
+ }
+ }
+ }
+ }
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jul 4, 12:36 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3272358
Attached To
rCJSWH Jenkins jobs
Event Timeline
Log In to Comment