Initial commit
Add infrastructure jobs for sandbox
Related-PROD: RE-336
Change-Id: I2140d47e3fc360ab05f92175b29b31e69b2ec10b
diff --git a/common/update-jenkins-jobs.yaml b/common/update-jenkins-jobs.yaml
new file mode 100644
index 0000000..fdb6a03
--- /dev/null
+++ b/common/update-jenkins-jobs.yaml
@@ -0,0 +1,58 @@
+- project:
+ name: jenkins-jobs
+ jobs:
+ - infra/update-jenkins-jobs
+
+- job-template:
+ name: 'infra.jenkins-jobs.update'
+ id: infra/update-jenkins-jobs
+ project-type: pipeline
+ description: |
+ <p>Update jenkins jobs configuration</p>
+ <p>Requires python-tox package and user credentials stored as JJB_USER and JJB_PASSWORD</p>
+ concurrent: false
+
+ jjb_project: 'mcp-ci/jenkins-jobs'
+
+ properties:
+ - build-discarder:
+ days-to-keep: 3
+ - inject:
+ properties-content: |
+ K8S_CLUSTER={k8s_cluster}
+ GIT_CREDENTIALS_ID={git-credentials-id}
+ JENKINS_CREDENTIALS_ID={jjb_credentials_id}
+ DOCKER_IMAGE={docker-dev-virtual}/mirantis/openstack-ci/jenkins-job-tests:latest
+ CI_NAME={ci_name}
+ SLAVE_LABEL={jjb_update_label}
+ ARTIFACTORY_URL={artifactory-url}
+ ART_CREDENTIALS_ID={artifactory_credentials_id}
+
+ parameters:
+ - bool:
+ name: MAINTAIN_MODE
+ default: false
+ description: Enable maintaining mode
+ - string:
+ name: JOBS_LIST
+ description: |
+ Space separated list of jobs to update. Will update all jobs if empty
+
+ triggers:
+ - gerrit:
+ server-name: '{gerrit-server}'
+ projects:
+ - project-compare-type: PLAIN
+ project-pattern: '{jjb_project}'
+ branches:
+ - branch-pattern: 'master'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'common/**'
+ - compare-type: ANT
+ pattern: 'servers/{ci_name}/**'
+ trigger-on:
+ - change-merged-event
+ custom-url: '- ${{JOB_NAME}} ${{BUILD_URL}}'
+
+ dsl: !include-raw-escape: pipelines/update-jenkins-jobs.groovy