From ad114ad2b8fafe8c23bbdea2a6ff1cbedecfedb4 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Tue, 24 Mar 2020 15:48:42 +0100 Subject: Add subproject support for golang verify job 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 --- jjb/global-templates-golang.yaml | 8 +++++++- jjb/integration/integration.yaml | 24 ++++++++++++++---------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/jjb/global-templates-golang.yaml b/jjb/global-templates-golang.yaml index 6305828d9..261515754 100644 --- a/jjb/global-templates-golang.yaml +++ b/jjb/global-templates-golang.yaml @@ -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: @@ -71,6 +71,12 @@ - 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 # diff --git a/jjb/integration/integration.yaml b/jjb/integration/integration.yaml index 4f95f5e02..62a0bed76 100644 --- a/jjb/integration/integration.yaml +++ b/jjb/integration/integration.yaml @@ -49,20 +49,24 @@ 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 -- cgit 1.2.3-korg