Revert removal of git-mirror jobs for pipelines
Fixes: PROD-27024 (PROD:27024)
Related: PROD-27010 (PROD:27010)
Related: PROD-27028 (PROD:27028)
Change-Id: I473b3dadc31c61c028c19cd3921619bb38f3c1e7
diff --git a/jenkins/client/job/git-mirrors/downstream/init.yml b/jenkins/client/job/git-mirrors/downstream/init.yml
index 2500254..8803f18 100644
--- a/jenkins/client/job/git-mirrors/downstream/init.yml
+++ b/jenkins/client/job/git-mirrors/downstream/init.yml
@@ -1,2 +1,41 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+parameters:
+ _param:
+ jenkins_git_mirror_downstream_jobs: []
+ jenkins_pollscm_spec: "H/60 * * * *"
+ jenkins:
+ client:
+ job_template:
+ git_mirror_downstream_common:
+ name: git-mirror-downstream-{{name}}
+ jobs: ${_param:jenkins_git_mirror_downstream_jobs}
+ template:
+ discard:
+ build:
+ keep_num: 10
+ artifact:
+ keep_num: 10
+ type: workflow-scm
+ concurrent: false
+ scm:
+ type: git
+ url: "${_param:jenkins_gerrit_url}/mk/mk-pipelines"
+ branch: "${_param:jenkins_pipelines_branch}"
+ credentials: "gerrit"
+ script: git-mirror-pipeline.groovy
+ trigger:
+ pollscm:
+ spec: ${_param:jenkins_pollscm_spec}
+ param:
+ SOURCE_URL:
+ type: string
+ default: "{{upstream}}"
+ TARGET_URL:
+ type: string
+ default: "${_param:jenkins_gerrit_url}/{{downstream}}"
+ CREDENTIALS_ID:
+ type: string
+ default: "gerrit"
+ BRANCHES:
+ type: string
+ default: "{{branches}}"
+ description: "Comma-separated list of branches to mirror"
\ No newline at end of file
diff --git a/jenkins/client/job/git-mirrors/downstream/pipelines.yml b/jenkins/client/job/git-mirrors/downstream/pipelines.yml
index 2500254..e0fd821 100644
--- a/jenkins/client/job/git-mirrors/downstream/pipelines.yml
+++ b/jenkins/client/job/git-mirrors/downstream/pipelines.yml
@@ -1,2 +1,15 @@
-# This file will be removed in Q3
-# jobs was moved into salt-models/infra repo
+classes:
+ - system.jenkins.client.job.git-mirrors.downstream
+parameters:
+ _param:
+ gerrit_pipeline_library_repo: https://github.com/Mirantis/pipeline-library
+ gerrit_mk_pipelines_repo: https://github.com/Mirantis/mk-pipelines
+ jenkins_git_mirror_downstream_jobs:
+ - name: pipeline-library
+ downstream: mcp-ci/pipeline-library
+ upstream: "${_param:gerrit_pipeline_library_repo}"
+ branches: "master,release/2018.8.1,release/2018.11.0,release/2019.2.0"
+ - name: mk-pipelines
+ downstream: mk/mk-pipelines
+ upstream: "${_param:gerrit_mk_pipelines_repo}"
+ branches: "master,release/2018.8.1,release/2018.11.0,release/2019.2.0"
\ No newline at end of file