diff options
-rw-r--r-- | jjb/global-macros.yaml | 16 | ||||
-rw-r--r-- | jjb/hicn/hicn.yaml | 67 | ||||
-rw-r--r-- | jjb/scripts/hicn/functest.sh | 9 |
3 files changed, 89 insertions, 3 deletions
diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index 5043b8681..4468b03b3 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -280,6 +280,22 @@ #### TRIGGERS # Keep 'trigger' entries ordered alphabetically, please. - trigger: + name: gerrit-trigger-build + # Comes from hicn, some verify jobs wait for build to pass. + triggers: + - gerrit: + server-name: 'Primary' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'build_success' + projects: + - project-compare-type: 'ANT' + project-pattern: '{name}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + +- trigger: name: gerrit-trigger-checkstyle # Comes from VPP, some verify jobs wait for checkstyle to pass. # This macro is to be used for such verify jobs which are voting. diff --git a/jjb/hicn/hicn.yaml b/jjb/hicn/hicn.yaml index 2667a8ae5..f824c02fe 100644 --- a/jjb/hicn/hicn.yaml +++ b/jjb/hicn/hicn.yaml @@ -15,7 +15,8 @@ - project: name: hicn-x86_64 jobs: - - "hicn-verify-{stream}-{os}-{executor-arch}" + - "hicn-verify-build-{stream}-{os}-{executor-arch}" + - "hicn-verify-functest-{stream}-{os}-{executor-arch}" - "hicn-merge-{stream}-{os}-{executor-arch}" project: "hicn" os: ubuntu2004 @@ -27,7 +28,7 @@ - project: name: hicn-aarch64 jobs: - - "hicn-verify-{stream}-{os}-{executor-arch}" + - "hicn-verify-build-{stream}-{os}-{executor-arch}" - "hicn-merge-{stream}-{os}-{executor-arch}" project: "hicn" os: ubuntu2004 @@ -161,7 +162,7 @@ fixed-delay: 90 - job-template: - name: "hicn-verify-{stream}-{os}-{executor-arch}" + name: "hicn-verify-build-{stream}-{os}-{executor-arch}" project-type: freestyle node: "builder-{os}-prod-{executor-arch}" @@ -195,6 +196,66 @@ - gerrit-trigger-checkstyle: name: "{project}" branch: "{branch}" + - gerrit: + override-votes: true + gerrit-build-notbuilt-verified-value: 0 + gerrit-build-successful-verified-value: 1 + # yamllint disable-line rule:line-length + notbuilt-message: "Automatic retry of failed jobs may be in process. A proper vote should be set when retry completes." + # yamllint disable-line rule:line-length + failed-message: "Build failed. No further verify jobs will be started." + successful-message: "build_success" + skip-vote: + successful: true + failed: false + unstable: false + notbuilt: false + + + builders: + - shell: !include-raw-escape: + - ../scripts/setup_executor_env.sh + - shell: !include-raw-escape: + - ../scripts/hicn/build.sh + + publishers: + - fdio-infra-publish + +- job-template: + name: "hicn-verify-functest-{stream}-{os}-{executor-arch}" + + project-type: freestyle + node: "{os}-builder-4c-4g" + concurrent: true + + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - project-parameter: + project: "{project}" + - gerrit-parameter: + branch: "{branch}" + - os-parameter: + os: "{os}" + - stream-parameter: + stream: "{stream}" + + scm: + - gerrit-trigger-scm: + credentials-id: "jenkins-gerrit-credentials" + refspec: "$GERRIT_REFSPEC" + choosing-strategy: "gerrit" + + wrappers: + - fdio-infra-wrappers: + build-timeout: 120 + + triggers: + - gerrit-trigger-build: + name: "{project}" + branch: "{branch}" builders: - shell: !include-raw-escape: diff --git a/jjb/scripts/hicn/functest.sh b/jjb/scripts/hicn/functest.sh new file mode 100644 index 000000000..e520c78ce --- /dev/null +++ b/jjb/scripts/hicn/functest.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# basic build script example +set -euxo pipefail + +echo "---> jjb/scripts/hicn/functest.sh" + +pushd scripts +bash ./functional-tests.sh +popd |