From: chengli3 Date: Fri, 8 Nov 2019 06:27:10 +0000 (+0800) Subject: Add job for bm deployment X-Git-Tag: v0.4.0~56 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F1940%2F2;p=icn.git Add job for bm deployment Change-Id: Id2ae36f0e8cca73d1fd42f8654cc69bf63761d8d Signed-off-by: chengli3 --- diff --git a/ci/README.md b/ci/README.md index 5e3e444..d3a4200 100644 --- a/ci/README.md +++ b/ci/README.md @@ -25,17 +25,33 @@ Once the playbook is successful, we can visite the jenkins server at http:// **/*.log @@ -55,7 +55,70 @@ builders: - shell: !include-raw: - - shell/verify.sh + - shell/vagrant-verify.sh + + publishers: + - icn-infra-publish +# - email: +# recipients: icn.jenkins@intel.com + +- job-template: + id: icn-stream-bm-verify-target + name: 'icn-{stream}-bm-verify-{target}' + defaults: icn + archive-artifacts: > + **/*.log + build-days-to-keep: 30 + build-timeout: 60 + stream: master + target: verifier + project-type: freestyle + submodule-recursive: true + #node: '{build-node}' + + properties: + - lf-infra-properties: + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - lf-infra-parameters: + project: '{project}' + stream: '{stream}' + branch: '{branch}' + lftools-version: '{lftools-version}' + + - string: + name: ARCHIVE_ARTIFACTS + default: '{archive-artifacts}' + description: Artifacts to archive to the logs server. + + - string: + name: NEXUS_LOG_SUBDIR + default: '{nexus_log_subdir}' + description: Organization sub dir on Akraino Nexus server. + + wrappers: + - lf-infra-wrappers: + build-timeout: '{build-timeout}' + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: '{jenkins-ssh-credential}' + git-url: '{git-url}/{project}.git' + refspec: '$GERRIT_REFSPEC' + branch: '$GERRIT_BRANCH' + submodule-recursive: '{submodule-recursive}' + submodule-timeout: '{submodule-timeout}' + submodule-disable: false + choosing-strategy: 'gerrit' + + triggers: + - timed: "@midnight" + + builders: + - shell: !include-raw: + - shell/bm-verify.sh publishers: - icn-infra-publish diff --git a/ci/jjb/project.yaml b/ci/jjb/project.yaml index eb0415f..e3800c4 100644 --- a/ci/jjb/project.yaml +++ b/ci/jjb/project.yaml @@ -1,6 +1,6 @@ --- - project: - name: icn-private + name: icn-vagrant project: icn project-name: icn nexus_log_subdir: intel/ICN_CD_logs @@ -11,4 +11,17 @@ - master: branch: master jobs: - - icn-stream-verify-target + - icn-stream-vagrant-verify-target + +- project: + name: icn-bm + project: icn + project-name: icn + nexus_log_subdir: intel/ICN_CD_logs + target: + - bm_verifer + stream: + - master: + branch: master + jobs: + - icn-stream-bm-verify-target diff --git a/ci/jjb/shell/bm-verify.sh b/ci/jjb/shell/bm-verify.sh new file mode 100644 index 0000000..c9308fa --- /dev/null +++ b/ci/jjb/shell/bm-verify.sh @@ -0,0 +1,10 @@ +#!/bin/bash -l +echo "---> bm-verify.sh" + +# Ensure we fail the job if any steps fail +# Disable 'globbing' +set -exuf -o pipefail + +sudo apt update +sudo apt install -y make +sudo su -c 'make {target}' diff --git a/ci/jjb/shell/org-logs-deploy.sh b/ci/jjb/shell/org-logs-deploy.sh index ca828cb..4919a4f 100644 --- a/ci/jjb/shell/org-logs-deploy.sh +++ b/ci/jjb/shell/org-logs-deploy.sh @@ -14,7 +14,7 @@ echo "---> logs-deploy.sh" # Disable 'globbing' set -euf -o pipefail -JENKINS_HOSTNAME=pod14-node2 +JENKINS_HOSTNAME=`hostname` NEXUS_URL=https://nexus.akraino.org LOGS_SERVER=https://logs.akraino.org diff --git a/ci/jjb/shell/verify.sh b/ci/jjb/shell/vagrant-verify.sh similarity index 93% rename from ci/jjb/shell/verify.sh rename to ci/jjb/shell/vagrant-verify.sh index a5e68fa..65148aa 100644 --- a/ci/jjb/shell/verify.sh +++ b/ci/jjb/shell/vagrant-verify.sh @@ -1,5 +1,5 @@ #!/bin/bash -l -echo "---> verify.sh" +echo "---> vagrant-verify.sh" # Ensure we fail the job if any steps fail # Disable 'globbing'