This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jenkins job configurations and scripts for vic and vic-product scenario tests.
- Loading branch information
1 parent
cfde16f
commit 1c69838
Showing
10 changed files
with
660 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
- project: | ||
name: 'scenario-tests-trigger' | ||
jobs: | ||
- '{repo}-{version}-trigger': | ||
repo: 'vic' | ||
version: 'master' | ||
branch: 'master' | ||
prefix: 'vic_' | ||
bucket: 'vic-engine-builds' | ||
- '{repo}-{version}-trigger': | ||
repo: 'vic' | ||
version: '1.4.3' | ||
branch: 'releases/1.4.3' | ||
prefix: 'vic_' | ||
bucket: 'vic-engine-builds' | ||
- '{repo}-{version}-trigger': | ||
repo: 'vic-product' | ||
version: 'master' | ||
branch: 'master' | ||
prefix: 'vic-dev' | ||
bucket: 'vic-product-ova-builds' | ||
- '{repo}-{version}-trigger': | ||
repo: 'vic-product' | ||
version: '1.4.3' | ||
branch: 'releases/1.4.3' | ||
prefix: 'vic-dev' | ||
bucket: 'vic-product-ova-builds' | ||
|
||
- project: | ||
name: 'scenario-tests' | ||
default_esx_build: '8169922' | ||
default_vc_build: '8217866' | ||
build_timeout: '1440' | ||
parallel_jobs: '1' | ||
jobs: | ||
- 'vic-{version}-scenario': | ||
repo: 'vic' | ||
version: '1.4.3' | ||
branch: 'releases/1.4.3' | ||
node: 'vic-executor' | ||
- 'vic-{version}-scenario': | ||
repo: 'vic' | ||
version: 'master' | ||
branch: 'master' | ||
node: 'vic-executor' | ||
- 'vic-product-{version}-scenario': | ||
repo: 'vic-product' | ||
version: '1.4.3' | ||
branch: 'releases/1.4.3' | ||
node: 'vic-executor1' | ||
- 'vic-product-{version}-scenario': | ||
repo: 'vic-product' | ||
version: 'master' | ||
branch: 'master' | ||
node: 'vic-executor1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
- defaults: | ||
name: 'scenario-tests' | ||
description: 'This is a parameterized build for running Nimbus scenario tests against build of {repo} {branch}' | ||
node: '{node}' | ||
parameters: | ||
- choice: | ||
name: VSPHERE_VERSION | ||
choices: | ||
- '6.7' | ||
- '6.5' | ||
- '6.0' | ||
description: 'The version of vSphere to run against. Skipped tests are determined by it.' | ||
- string: | ||
name: ESX_BUILD | ||
default: '{default_esx_build}' | ||
description: 'The build of ESX to deploy, e.g. ob-8169922 (6.7 default).' | ||
- string: | ||
name: VC_BUILD | ||
default: '{default_vc_build}' | ||
description: 'The build of VC to deploy, e.g. ob-8217866 (6.7 default).' | ||
- string: | ||
name: BUILD_NUM | ||
default: '' | ||
description: 'Build number to test.' | ||
- string: | ||
name: TEST_CASES | ||
default: '' | ||
description: | | ||
The specific test cases to run as part of the job. These are passed as arguments to pabot so will likely be of the form "tests/manual-test-cases/Group23-Future-Tests" | ||
Runs the default set of tests if left empty. | ||
scm: | ||
- git: | ||
url: '[email protected]:core-build/vic-internal.git' | ||
credentials-id: 'GitLabAutomationKey' | ||
branches: | ||
- 'master' | ||
basedir: 'vic-internal' | ||
- git: | ||
url: 'https://github.com/vmware/{repo}' | ||
branches: | ||
- '{branch}' | ||
basedir: '{repo}' | ||
- git: | ||
url: 'https://github.com/vmware/vic-tools' | ||
branches: | ||
- 'master' | ||
basedir: 'vic-tools' | ||
wrappers: | ||
- timeout: | ||
name: absolute_timeout | ||
timeout: '{build_timeout}' | ||
abort: true | ||
type: absolute | ||
- workspace-cleanup | ||
- build-name: | ||
name: ${{ENV,var="BUILD_NUM"}} | ||
publishers: | ||
- robot: | ||
output-path: '{repo}/report' | ||
pass-threshold: '100' | ||
unstable-threshold: '100' | ||
- groovy-postbuild: | ||
script: | | ||
def vc_build = manager.envVars['VC_BUILD'] | ||
def esx_build = manager.envVars['ESX_BUILD'] | ||
def vsphere_version = manager.envVars.get('VSPHERE_VERSION') | ||
def summary = manager.createSummary("gear2.gif") | ||
summary.appendText("Infrastructure Builds:<ul>", false) | ||
summary.appendText("<li><b>vSphere Version</b> - ${{vsphere_version}}</li>", false) | ||
summary.appendText("<li><b>vCenter</b> - ${{vc_build}}</li>", false) | ||
summary.appendText("<li><b>ESXi</b> - ${{esx_build}}</li>", false) | ||
- email-ext: | ||
recipients: [email protected] | ||
reply-to: [email protected] | ||
success: true | ||
aborted: true | ||
failure: true | ||
content-type: html | ||
send-to: | ||
- recipients | ||
subject: 'vmware/{repo} Scenario Testing - ${{VSPHERE_VERSION}}/{repo}/{branch} - Build: $BUILD_NUM' | ||
body: | | ||
Download link for the test logs is in the <a href="${{BUILD_URL}}/console">build console output</a> | ||
<p> | ||
${{VSPHERE_VERSION}} Jenkins Nimbus Scenario Job: <a href="${{BUILD_URL}}">${{BUILD_URL}}</a> | ||
<p> | ||
Run Report: ${{ROBOT_REPORTLINK}} | ||
<p> | ||
${{FILE,path="{repo}/console.log"}} | ||
- slack: | ||
room: '#notifications' | ||
auth-token-credential-id: 'SlackIntegrationToken' | ||
notify-success: True | ||
notify-aborted: True | ||
notify-failure: True | ||
base-url: 'https://vmware-vic.slack.com/services/hooks/jenkins-ci/' | ||
include-custom-message: True | ||
custom-message: 'vmware/{repo} Scenario Testing - ${{VSPHERE_VERSION}}/{repo}/{branch} - $BUILD_TIMESTAMP' | ||
|
||
- job-template: | ||
name: 'vic-{version}-scenario' | ||
defaults: 'scenario-tests' | ||
builders: | ||
- shell: | | ||
#!/bin/bash | ||
set -x | ||
dest="vic-ci-logs/vmware/{branch}/" | ||
cat > build.envfile <<ENVS | ||
PARALLEL_JOBS={parallel_jobs} | ||
NIMBUS_RETRY_ATTEMPTS=5 | ||
NIMBUS_RETRY_DELAY=1m | ||
LOG_UPLOAD_DEST=$dest | ||
GIT_COMMIT=$GIT_COMMIT | ||
BUILD_TIMESTAMP=$BUILD_TIMESTAMP | ||
BUILD_ID=$BUILD_ID | ||
ESX_BUILD=$ESX_BUILD | ||
VC_BUILD=$VC_BUILD | ||
BUILD_TAG={repo}_${{BUILD_NUM}} | ||
VCH_BUILD=${{BUILD_NUM}} | ||
VCH_BRANCH={branch} | ||
ENVS | ||
docker run --rm -v "${{WORKSPACE}}":/go --env-file vic-internal/{repo}-scenario-{version}-secrets.list --env-file build.envfile --name=${{BUILD_TAG}} gcr.io/eminent-nation-87317/vic-integration-test:1.48 vic-tools/jenkins/jobs/vic-scenario/build.sh ${{VSPHERE_VERSION}} ${{TEST_CASES}} | ||
- job-template: | ||
name: 'vic-product-{version}-scenario' | ||
defaults: 'scenario-tests' | ||
builders: | ||
- shell: | | ||
#!/bin/bash | ||
set -x | ||
./vic-tools/jenkins/jobs/vic-product-scenario/selenium_grid.sh create {version} | ||
cat > build.envfile <<ENVS | ||
PARALLEL_JOBS={parallel_jobs} | ||
ROBOT_REPORT=report | ||
NIMBUS_RETRY_ATTEMPTS=5 | ||
NIMBUS_RETRY_DELAY=1m | ||
ESX_BUILD=$ESX_BUILD | ||
VC_BUILD=$VC_BUILD | ||
BUILD_TAG={repo}_${{BUILD_NUM}} | ||
VIC_PRODUCT_BUILD=${{BUILD_NUM}} | ||
VIC_PRODUCT_BRANCH={branch} | ||
ENVS | ||
docker run --net grid-{version} --privileged --rm --link selenium-hub-{version}:selenium-grid-hub -v /var/run/docker.sock:/var/run/docker.sock -v /etc/docker/certs.d:/etc/docker/certs.d -v "${{WORKSPACE}}":/go -v /vic-cache:/vic-cache --env-file "vic-internal/{repo}-scenario-{version}-secrets.list" --env-file build.envfile gcr.io/eminent-nation-87317/vic-integration-test:1.46 vic-tools/jenkins/jobs/vic-product-scenario/build.sh ${{TEST_CASES}} | ||
./vic-tools/jenkins/jobs/vic-product-scenario/selenium_grid.sh remove {version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- job-template: | ||
name: '{repo}-{version}-trigger' | ||
description: 'This is a parameterized build for running Nimbus scenario tests against build of {repo} {branch}' | ||
node: 'vic-executor' | ||
scm: | ||
- git: | ||
url: 'https://github.com/vmware/vic-tools' | ||
branches: | ||
- 'master' | ||
triggers: | ||
- timed: '@midnight' | ||
builders: | ||
- shell: | | ||
#!/bin/bash | ||
docker run --rm -v ${{WORKSPACE}}:/src wdc-harbor-ci.eng.vmware.com/default-project/ci-trigger:0.0.1 /src/jenkins/jobs/scenario-trigger/build.sh {bucket} {branch} {prefix} {repo}-{version}-scenario |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- view: | ||
name: 'Scenario' | ||
view-type: list | ||
description: 'VIC Scenario Tests runs nightly' | ||
job-name: | ||
- vic-1.4.3-scenario | ||
- vic-master-scenario | ||
- vic-product-1.4.3-scenario | ||
- vic-product-master-scenario | ||
columns: | ||
- status | ||
- weather | ||
- job | ||
- last-success | ||
- last-failure | ||
- last-duration | ||
- robot-list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.