aboutsummaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/ci-AGL-verify/ci-platform-jjb.yaml206
-rw-r--r--jjb/common/include-agl-remove-artifacts-changeid.sh12
2 files changed, 131 insertions, 87 deletions
diff --git a/jjb/ci-AGL-verify/ci-platform-jjb.yaml b/jjb/ci-AGL-verify/ci-platform-jjb.yaml
index f20001c9..c1eb5bcc 100644
--- a/jjb/ci-AGL-verify/ci-platform-jjb.yaml
+++ b/jjb/ci-AGL-verify/ci-platform-jjb.yaml
@@ -17,18 +17,23 @@
- meta-renesas-rcar-gen3
jobs:
- ci-platform-{project}-verify
- # - ci-platform-{project}-verify-CIB-start
+ # - ci-platform-{project}-verify-CIB-start #unused
- ci-platform-{project}-verify-CIB-{machine}
- ci-platform-{project}-verify-CIB-finish-success
- ci-platform-{project}-verify-failure
- # - ci-platform-{project}-verify-CIBT-start
+ # - ci-platform-{project}-verify-CIBT-start #unused
- ci-platform-{project}-verify-CIBT-{machine}
- ci-platform-{project}-verify-CIBT-finish-success
+ - ci-platform-{project}-merge
-#
-# -verify = trigger from gerrit and control job
-# ###############################################
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -verify = trigger from gerrit and control job, multijob order
+################################################################################
- job-template:
name: 'ci-platform-{project}-verify'
project-type: multijob
@@ -55,21 +60,17 @@
name: GERRIT_PATCHSET_NUMBER
default: "2"
description: "patchset # to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
triggers:
- gerrit-trigger-patch-submitted-manual-verified:
name: 'AGL/{project}'
branch: '**/**/**'
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
-
builders:
- shell: |
set
@@ -156,7 +157,6 @@
current-parameters: true
abort-all-job: true
kill-phase-on: FAILURE
-
# publishers:
# - trigger-parameterized-builds:
# - project:
@@ -164,16 +164,19 @@
# condition: FAILED
# current-parameters: true
-#
-# -verify-failure
-# ###################
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -verify-CIB-start = start message (message back to gerrit)
+################################################################################
- job-template:
- name: 'ci-platform-{project}-verify-failure'
+ name: 'ci-platform-{project}-verify-CIB-start'
project-type: freestyle
concurrent: true
node: control-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -195,34 +198,32 @@
name: GERRIT_PATCHSET_NUMBER
default: "2"
description: "patchset # to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
-
+ - openstack:
+ single-use: false
builders:
- shell: |
- set
- echo "#### Verified -1 ####"
- #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified -1 -n NONE --message="CI-cycle\ failed.\ URL:\ ${{BUILD_URL}}" || true
- ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} -n NONE --message="CI-cycle\ failed.\ URL:\ ${{BUILD_URL}}" || true
-
+ #set
+ export TRIGGERURL=$(echo ${{BUILD_URL}} | sed -e 's,-CIB-start.*,,')
+ # ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 --label ci-image-build=0 --label ci-image-boot-test=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ ${{BUILD_URL}}" || true
+ ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ \$TRIGGERURL" || true
-#
-# CIB-{machine}
-# ##############
+################################################################################
+################################################################################
+# -verify-CIB-{machine} = build for machine
+################################################################################
- job-template:
name: 'ci-platform-{project}-verify-CIB-{machine}'
project-type: freestyle
concurrent: true
node: agl-test-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -248,18 +249,15 @@
name: MACHINE
default: '{machine}'
description: "Machine to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
- openstack:
single-use: true
-
builders:
- shell:
!include-raw-escape:
@@ -283,16 +281,15 @@
#regular-expression: "Unexpected termination of the channel"
-#
-# CIB-start
-# ###########
-
+################################################################################
+################################################################################
+# -verify-CIB-finish-success = build succeeded, message to gerrit
+################################################################################
- job-template:
- name: 'ci-platform-{project}-verify-CIB-start'
+ name: 'ci-platform-{project}-verify-CIB-finish-success'
project-type: freestyle
concurrent: true
node: control-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -314,35 +311,29 @@
name: GERRIT_PATCHSET_NUMBER
default: "2"
description: "patchset # to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
- - openstack:
- single-use: false
-
builders:
- shell: |
- #set
- export TRIGGERURL=$(echo ${{BUILD_URL}} | sed -e 's,-CIB-start.*,,')
- # ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 --label ci-image-build=0 --label ci-image-boot-test=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ ${{BUILD_URL}}" || true
- ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified=0 -n NONE --message="CI-Image-Build\ started.\ URL:\ \$TRIGGERURL" || true
+ set
+ echo "#### CIB +1 #### Verified +1 ####"
+ ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 -n NONE --message="CI-Image-Build\ finished,\ CIB+1,\ Verified+1" || true
-#
-# CIB-finish-success
-# ###################
+################################################################################
+################################################################################
+# -verify-failure = CI check failed, -1 message to gerrit
+################################################################################
- job-template:
- name: 'ci-platform-{project}-verify-CIB-finish-success'
+ name: 'ci-platform-{project}-verify-failure'
project-type: freestyle
concurrent: true
node: control-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -364,32 +355,79 @@
name: GERRIT_PATCHSET_NUMBER
default: "2"
description: "patchset # to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
-
builders:
- shell: |
set
- echo "#### CIB +1 #### Verified +1 ####"
- ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 -n NONE --message="CI-Image-Build\ finished,\ CIB+1,\ Verified+1" || true
+ echo "#### Verified -1 ####"
+ #ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified -1 -n NONE --message="CI-cycle\ failed.\ URL:\ ${{BUILD_URL}}" || true
+ ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} -n NONE --message="CI-cycle\ failed.\ URL:\ ${{BUILD_URL}}" || true
+
+
+################################################################################################################################################################
+################################################################################################################################################################
+
+################################################################################
+################################################################################
+# -verify-CIBT-start = CI BOOT TEST start
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-verify-CIBT-start'
+ project-type: freestyle
+ concurrent: true
+ node: control-slave
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ builders:
+ - shell: |
+ echo "CIBT Started"
+ # set
+ # ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --label ci-image-boot-test=0 -n NONE --message='CI-Image-Boot-Test\ started' || true
-#
-# CIBT-{machine} 'BOOT TEST'
-# ###########################
+################################################################################
+################################################################################
+# -verify-CIBT-{machine} = CI BOOT TEST on machine
+################################################################################
- job-template:
name: 'ci-platform-{project}-verify-CIBT-{machine}'
project-type: freestyle
concurrent: true
node: hwtest-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -415,12 +453,10 @@
name: MACHINE
default: '{machine}'
description: "Machine to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
@@ -443,7 +479,6 @@
credential-id: lab_baylibre_seattle_lava_instance
username: LAB_BAYLIBRE_SEATTLE_USER
password: LAB_BAYLIBRE_SEATTLE_TOKEN
-
builders:
- shell:
!include-raw-escape:
@@ -453,22 +488,19 @@
- ../common/include-agl-run-test-prepare.sh
- ../common/include-agl-lava-labs-prepare.sh
- ../common/include-agl-run-test-short.sh
-
publishers:
- naginator:
max-failed-builds: 2
-
-#
-# CIBT-start
-# ###############
-
+################################################################################
+################################################################################
+# -verify-CIBT-finish-success = CI BOOT TEST succeeded, CIBT+1 to gerrit
+################################################################################
- job-template:
- name: 'ci-platform-{project}-verify-CIBT-start'
+ name: 'ci-platform-{project}-verify-CIBT-finish-success'
project-type: freestyle
concurrent: true
node: control-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -490,35 +522,34 @@
name: GERRIT_PATCHSET_NUMBER
default: "2"
description: "patchset # to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
- openstack:
single-use: false
-
builders:
- shell: |
- echo "CIBT Started"
# set
- # ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --label ci-image-boot-test=0 -n NONE --message='CI-Image-Boot-Test\ started' || true
+ echo "#### CIBT +1 ####"
+ ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 --label ci-image-boot-test=+1 -n NONE --message='CI-Image-Boot-Test\ finished' || true
-#
-# CIBT-finish-success
-# ####################
+################################################################################################################################################################
+################################################################################################################################################################
+################################################################################
+################################################################################
+# -merge = merge, remove artifacts and later trigger sstate refresh
+################################################################################
- job-template:
- name: 'ci-platform-{project}-verify-CIBT-finish-success'
+ name: 'ci-platform-{project}-merge'
project-type: freestyle
concurrent: true
node: control-slave
-
parameters:
- string:
name: GERRIT_PROJECT
@@ -540,20 +571,21 @@
name: GERRIT_PATCHSET_NUMBER
default: "2"
description: "patchset # to build"
-
build-discarder:
days-to-keep: 30
artifact-days-to-keep: -1
artifact-num-to-keep: 5
-
wrappers:
- agl-infra-wrappers:
build-timeout: '{build-timeout}'
- openstack:
single-use: false
-
+ triggers:
+ - gerrit-trigger-patch-merged:
+ name: 'AGL/{project}'
+ branch: '**/**/**'
builders:
- - shell: |
- # set
- echo "#### CIBT +1 ####"
- ssh -p 29418 agl-jobbuilder@gerrit.automotivelinux.org gerrit review ${{GERRIT_CHANGE_NUMBER}},${{GERRIT_PATCHSET_NUMBER}} --verified +1 --label ci-image-build=+1 --label ci-image-boot-test=+1 -n NONE --message='CI-Image-Boot-Test\ finished' || true
+ - shell:
+ !include-raw-escape:
+ - ../common/include-agl-remove-artifacts-changeid.sh
+
diff --git a/jjb/common/include-agl-remove-artifacts-changeid.sh b/jjb/common/include-agl-remove-artifacts-changeid.sh
new file mode 100644
index 00000000..5cb1829c
--- /dev/null
+++ b/jjb/common/include-agl-remove-artifacts-changeid.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+#set -x
+set -e
+
+echo "\n\n\n"
+echo "################REMOVE CHANGEID#########################"
+echo "\n\n\n"
+
+
+export DST="/srv/download/AGL/upload/ci/${GERRIT_CHANGE_NUMBER}"
+ssh -o StrictHostKeyChecking=no jenkins-slave@10.30.72.8 rm -rf ${DST}