blob: 50529b24ebde9481e88565d16f792eaef57409a3 [file] [log] [blame]
Sergey Otpuschennikovaad1ae02020-09-11 19:33:51 +04001- project:
2 name: jenkins-jobs
3 jobs:
4 - infra/update-jenkins-jobs
5
6- job-template:
7 name: 'infra.jenkins-jobs.update'
8 id: infra/update-jenkins-jobs
9 project-type: pipeline
10 description: |
11 <p>Update jenkins jobs configuration</p>
12 <p>Requires python-tox package and user credentials stored as JJB_USER and JJB_PASSWORD</p>
13 concurrent: false
14
Sergey Otpuschennikov9bb06d32020-09-15 13:13:31 +040015 jjb_project: 'infra/jenkins-jobs'
Sergey Otpuschennikovaad1ae02020-09-11 19:33:51 +040016
17 properties:
18 - build-discarder:
19 days-to-keep: 3
20 - inject:
21 properties-content: |
22 K8S_CLUSTER={k8s_cluster}
23 GIT_CREDENTIALS_ID={git-credentials-id}
24 JENKINS_CREDENTIALS_ID={jjb_credentials_id}
25 DOCKER_IMAGE={docker-dev-virtual}/mirantis/openstack-ci/jenkins-job-tests:latest
26 CI_NAME={ci_name}
27 SLAVE_LABEL={jjb_update_label}
28 ARTIFACTORY_URL={artifactory-url}
29 ART_CREDENTIALS_ID={artifactory_credentials_id}
30
31 parameters:
32 - bool:
33 name: MAINTAIN_MODE
34 default: false
35 description: Enable maintaining mode
36 - string:
37 name: JOBS_LIST
38 description: |
39 Space separated list of jobs to update. Will update all jobs if empty
40
41 triggers:
42 - gerrit:
43 server-name: '{gerrit-server}'
44 projects:
45 - project-compare-type: PLAIN
46 project-pattern: '{jjb_project}'
47 branches:
48 - branch-pattern: 'master'
49 file-paths:
50 - compare-type: ANT
51 pattern: 'common/**'
52 - compare-type: ANT
53 pattern: 'servers/{ci_name}/**'
54 trigger-on:
55 - change-merged-event
56 custom-url: '- ${{JOB_NAME}} ${{BUILD_URL}}'
57
58 dsl: !include-raw-escape: pipelines/update-jenkins-jobs.groovy