OpenDev: Introducing OpenDev to Nordix
[infra/cicd.git] / opendev / global-templates-opendev-push-upstream.yaml
diff --git a/opendev/global-templates-opendev-push-upstream.yaml b/opendev/global-templates-opendev-push-upstream.yaml
new file mode 100644 (file)
index 0000000..385fdd4
--- /dev/null
@@ -0,0 +1,41 @@
+- job-template:
+    name: 'opendev-{project-name}-{stream}-push-upstream'
+
+    node: infra-build01-ubuntu1804
+
+    disabled: false
+
+    concurrent: true
+
+    properties:
+      - logrotate
+
+    parameters:
+      - project-parameters:
+          project: 'opendev/{project}'
+          branch: '{branch}'
+      - nordix-gerrit-parameters
+
+    scm:
+      - git-scm-gerrit:
+          ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
+          branch: '{branch}'
+          refspec: $GERRIT_REFSPEC
+
+    triggers:
+      - nordix-gerrit-push-upstream:
+          project: 'opendev/{project}'
+          branch: '{branch}'
+          files: '**'
+
+    wrappers:
+      - build-timeout:
+          timeout: 10
+
+    builders:
+      - shell:
+          !include-raw-escape: ./push-upstream-jobs.sh
+
+    publishers:
+      - notify-slack:
+          slack-channel: '#infra'