Enable merge jobs to trigger downstream job
[ci-management.git] / jjb / akraino-templates / akraino-ta-common-macros.yaml
index 874d166..24436b9 100644 (file)
       - lf-provide-maven-settings-cleanup
       - config-file-provider:
           files:
-            - file-id: 'images-snapshots-settings'
+            - file-id: 'ta-settings'
               variable: 'SETTINGS_FILE'
+      - inject:
+          properties-content: 'ALT_NEXUS_URL=https://nexus3.akraino.org'
       - lf-infra-create-netrc:
-          server-id: images-snapshots
+          server-id: rpm.snapshots
       - shell: !include-raw:
           # Ensure python-tools are installed in case job template does not
           # call the lf-infra-pre-build macro.
       - lf-provide-maven-settings-cleanup
       - config-file-provider:
           files:
-            - file-id: 'images-snapshots-settings'
+            - file-id: 'ta-settings'
               variable: 'SETTINGS_FILE'
       - lf-infra-create-netrc:
           server-id: images-snapshots
       - shell: |2-
           sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
           sudo yum -y install docker-ce docker-ce-cli containerd.io
+          sudo mkdir -p /etc/docker/
+          echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
           sudo systemctl start docker
           # Ugly hack to make docker usable for non-root
           # (adding to the group would require re-login)
           sudo chmod 777 /var/run/docker.sock
 
+- builder:
+    name: ta-builder-install-build-tools
+    builders:
+      - shell: |2-
+          sudo yum -y install createrepo libguestfs-tools-c jq
+          sudo systemctl start libvirtd
+          systemctl status libvirtd
+
 ###########
 # TRIGGER #
 ###########
             # Not sure if it would be better to use "change-merged" here and just clone the master
             # branch. With the current approach the SCM can be identical in verify and merge jobs.
             - ref-updated-event
+            - comment-added-contains-event:
+                comment-contains-value: 'remerge'
           projects:
             - project-compare-type: 'ANT'
               project-pattern: '{project}'
 - publisher:
     name: ta-publisher-job-verify
     publishers:
-        - lf-infra-publish
+      - lf-infra-publish
 
 - publisher:
     name: ta-publisher-job-merge
     publishers:
-        - lf-infra-publish
+      - lf-infra-publish
+      - trigger-parameterized-builds:
+          - project: 'ta-ci-build'
+            condition: UNSTABLE_OR_BETTER
+            trigger-with-no-params: true