Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Commit

Permalink
Merge pull request #1180 from pablochacin/manual-e2e-job
Browse files Browse the repository at this point in the history
Implement manual e2e test job
  • Loading branch information
pablochacin authored Jun 23, 2020
2 parents 022183c + c66fa4d commit 57c1cc9
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 6 deletions.
8 changes: 8 additions & 0 deletions ci/jenkins/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
- '{name}/{platform}/{test}-daily'
- '{name}/{platform}/update-daily'

- project:
name: caasp-jobs/dev
repo-name: skuba
repo-owner: SUSE
repo-credentials: github-token
jobs:
- '{name}/e2e-test'


- job:
name: caasp-jobs/caasp-jjb-skuba
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,46 @@
// type of worker required by the job
def worker_type = 'integration'

// repository branch
branch_repo = ""

// worker selection labels
def labels = 'e2e'

node('caasp-team-private-integration') {
stage('select worker') {
if (env.BRANCH != 'master') {
if (env.BRANCH.startsWith('experimental') || env.BRANCH.startsWith('maintenance')) {
worker_type = env.BRANCH
}
}

// Overrride the worker type if explicitly requested
if (env.WORKER_TYPE != '') {
worker_type = env.WORKER_TYPE
}

// Set additional labels for worker selection
if (env.WORKER_LABELS != '') {
labels = env.WORKER_LABELS
}

if (env.REPO_BRANCH != ""){
branch_repo = "http://download.suse.de/ibs/Devel:/CaaSP:/${repo_version}:/Branches:/${branch_name}/SLE_15_SP2"
}
}
}

pipeline {
agent { node { label "caasp-team-private-${worker_type} && e2e" } }

parameters {
string(name: 'E2E_MAKE_TARGET_NAME', defaultValue: 'all', description: 'The make target to run (only e2e related)')
}
agent { node { label "caasp-team-private-${worker_type} && ${labels}" } }

environment {
SKUBA_BINPATH = "/home/jenkins/go/bin/skuba"
OPENSTACK_OPENRC = credentials('ecp-openrc')
GITHUB_TOKEN = credentials('github-token')
VMWARE_ENV_FILE = credentials('vmware-env')
TERRAFORM_STACK_NAME = "${BUILD_NUMBER}-${JOB_NAME.replaceAll("/","-")}".take(70)
BRANCH_REPO = "${branch_repo}"
}

stages {
Expand Down
2 changes: 1 addition & 1 deletion ci/jenkins/templates/e2e-daily-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
browser: auto
suppress-automatic-scm-triggering: true
basedir: skuba
script-path: skuba/ci/jenkins/pipelines/skuba-e2e-daily.Jenkinsfile
script-path: skuba/ci/jenkins/pipelines/skuba-e2e-test.Jenkinsfile

51 changes: 51 additions & 0 deletions ci/jenkins/templates/e2e-dev-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- job-template:
name: '{name}/e2e-test'
project-type: pipeline
number-to-keep: 30
days-to-keep: 30
wrappers:
- timeout:
timeout: 120
fail: true
parameters:
- string:
name: BRANCH
default: 'master'
description: The branch to checkout
- string:
name: PLATFORM
default: 'vmware'
description: The platform to perform the tests on
- string:
name: E2E_MAKE_TARGET_NAME
default: ''
description: The make target to run (only e2e tests)
- string:
name: KUBERNETES_VERSION
default: ''
description: version of kubernetes to install
- string:
name: WORKER_TYPE
default: ''
description: worker type required by the job
- string:
name: WORKER_LABELS
default: ''
description: additional labels used for worker selection
- string:
name: REPO_BRANCH
default: ''
description: repository branch used for skuba packages
pipeline-scm:
scm:
- git:
url: 'https://github.com/{repo-owner}/{repo-name}.git'
credentials-id: '{repo-credentials}'
refspec: '+refs/heads/*:refs/remotes/origin/* +refs/pull/*/head:refs/remotes/origin/pr/*'
branches:
- '$BRANCH'
browser: auto
suppress-automatic-scm-triggering: true
basedir: skuba
script-path: skuba/ci/jenkins/pipelines/skuba-e2e-test.Jenkinsfile

0 comments on commit 57c1cc9

Please sign in to comment.