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