Add subproject support for golang verify job 61/104261/1
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Tue, 24 Mar 2020 14:48:42 +0000 (15:48 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Tue, 24 Mar 2020 14:48:42 +0000 (15:48 +0100)
A descendant 'verify-golang' job is created using
yaml anchors for common job boilerplate.

Build minion gets changed to a Docker based one
as some projects depend on it on build time.

Build script is displaced so that it supports JJB
variable interpolation.

Change-Id: I0af4235287b58a251e399a90703ac3ffffc07338
Issue-ID: INT-1498
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
jjb/global-templates-golang.yaml
jjb/integration/integration.yaml

index 6305828..2615157 100644 (file)
@@ -1,5 +1,5 @@
 ---
-- job-template:
+- job-template: &verify_golang_bolierplate
     # Job template for Golang verify jobs
     #
     # The purpose of this job template is to run:
       - infra-shiplogs:
           maven-version: '{maven-version}'
 
+- job-template:
+    # Job template for Golang verify jobs with subproject support
+
+    <<: *verify_golang_bolierplate
+    name: '{project-name}-{stream}-{subproject}-verify-golang'
+
 - job-template:
     # Job template for Golang merge jobs
     #
index 4f95f5e..62a0bed 100644 (file)
     golangver: 'golang112'
     mvn-settings: 'integration-settings'
     archive-artifacts: ''
-    build-node: ubuntu1804-builder-4c-4g
+    build-node: ubuntu1804-docker-8c-8g
     jobs:
-      - '{project-name}-{stream}-verify-golang':
-          script: '{build_script}'
-    path: 'test/security/k8s'
-    pattern: '{path}/**'
+      - '{project-name}-{stream}-{subproject}-verify-golang':
+          script: |
+              #!/bin/bash
+              set -ex # Fail build if any setup step fails
+              cd $WORKSPACE/{path}
+              make test
+    subproject:
+      - 'test-security-k8s':
+          path: 'test/security/k8s'
+          pattern: '{path}/**'
+      - 'test-security-sslendpoints':
+          path: 'test/security/sslendpoints'
+          pattern: '{path}/**'
     stream:
       - 'master':
           branch: 'master'
-    build_script: |
-        #!/bin/bash
-        set -ex # Fail build if any setup step fails
-        cd test/security/k8s
-        make test
 
 - project:
     name: integration-netconf-pnp-simulator