X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=jjb%2Fglobal-templates-golang.yaml;h=72004dc8d145a8ea6c7a43d00987cc78bafe719a;hb=7a95724e691582c9cddbb93d18fcab2f16d933a8;hp=168fb6203b813f389adc4f678e11ac6d5e7e6c5d;hpb=33a826480e61381963528b9b89eabee5ca01379a;p=ci-management.git diff --git a/jjb/global-templates-golang.yaml b/jjb/global-templates-golang.yaml index 168fb6203..72004dc8d 100644 --- a/jjb/global-templates-golang.yaml +++ b/jjb/global-templates-golang.yaml @@ -1,15 +1,27 @@ --- -- job-template: +- job-template: &verify_golang_bolierplate # Job template for Golang verify jobs # # The purpose of this job template is to run: # 1. make build # + # golangver can be set to golang110, golang111 or golang112 + # depending on what version is needed by the project + # default is golang110 + # # Required Variables: # branch: git branch (eg. stable/lithium or master) + # + # Optional Variables: + # script: build script to execute + # pattern: ant file-path pattern relative to the workspace used to + # trigger the job name: '{project-name}-{stream}-verify-golang' path: '$WORKSPACE' + pattern: '**' + script: '' + golangver: 'golang110' project-type: freestyle concurrent: true @@ -33,6 +45,7 @@ submodule-recursive: '{submodule-recursive}' wrappers: + - '{golangver}' - infra-wrappers: build-timeout: '{build-timeout}' @@ -41,24 +54,27 @@ server: '{server-name}' project: '{project}' branch: '{branch}' - files: '**' + files: '{pattern}' builders: + - lf-infra-pre-build - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' - shell: | #!/bin/bash - curl -O https://dl.google.com/go/go1.10.linux-amd64.tar.gz - tar -zxf go1.10.linux-amd64.tar.gz - export GOROOT=$WORKSPACE/go - export PATH=$PATH:$GOROOT/bin cd $WORKSPACE/{path} make build + - shell: '{script}' publishers: - - infra-shiplogs: - maven-version: '{maven-version}' + - lf-infra-publish + +- 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 @@ -66,11 +82,16 @@ # The purpose of this job template is to run: # 1. make deploy # + # golangver can be set to golang110 or golang111 + # depending on what version is needed by the project + # default is golang110 + # # Required Variables: # branch: git branch (eg. stable/lithium or master) name: '{project-name}-{stream}-merge-golang' path: $WORKSPACE + golangver: 'golang110' project-type: freestyle node: '{build-node}' @@ -95,6 +116,7 @@ submodule-recursive: '{submodule-recursive}' wrappers: + - '{golangver}' - infra-wrappers: build-timeout: '{build-timeout}' @@ -106,33 +128,34 @@ files: '**' builders: + - lf-infra-pre-build - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' - shell: | #!/bin/bash - curl -O https://dl.google.com/go/go1.10.linux-amd64.tar.gz - tar -zxf go1.10.linux-amd64.tar.gz - export GOROOT=$PWD/go - export PATH=$PATH:$GOROOT/bin cd $WORKSPACE/{path} make deploy publishers: - - infra-shiplogs: - maven-version: '{maven-version}' + - lf-infra-publish - job-template: # Job template for building & pushing docker images # + # golangver can be set to golang110 or golang111 + # depending on what version is needed by the project + # default is golang110 + # # The purpose of this job template is to run: # 1. login to the docker registry # 2. run a specified shell builder # name: '{project-name}-{stream}-docker-golang-shell-daily' + golangver: 'golang110' project-type: freestyle - node: 'ubuntu1604-docker-8c-8g' + node: 'ubuntu1804-docker-8c-8g' disabled: false properties: - infra-properties: @@ -144,7 +167,6 @@ branch: '{branch}' refspec: 'refs/heads/{branch}' artifacts: '{archive-artifacts}' - scm: - gerrit-trigger-scm: refspec: '' @@ -152,18 +174,20 @@ submodule-recursive: '{submodule-recursive}' wrappers: + - '{golangver}' - infra-wrappers: build-timeout: '{build-timeout}' triggers: # 12 AM UTC - - timed: 'H 12 * * *' + - timed: '@daily' - gerrit-trigger-release-manually: server: '{server-name}' project: '{project}' branch: '{branch}' builders: + - lf-infra-pre-build - provide-maven-settings: global-settings-file: 'global-settings' settings-file: '{mvn-settings}' @@ -173,5 +197,4 @@ - shell: '{script}' publishers: - - infra-shiplogs: - maven-version: '{maven-version}' \ No newline at end of file + - lf-infra-publish