Skip to content

Instantly share code, notes, and snippets.

@rajdavies
Created February 13, 2018 15:28
Show Gist options
  • Save rajdavies/deab232e6f1cc1644e077fb776ee28c4 to your computer and use it in GitHub Desktop.
Save rajdavies/deab232e6f1cc1644e077fb776ee28c4 to your computer and use it in GitHub Desktop.
Feature: Jenkins X multibranch pipeline
In order to provide a basic jenkins-x experience
As a project admin
I need to be able to import and run a SpringBoot Github project via the multibranch plugin
Scenario: a SpringBoot sample application pipeline builds and deploys successfully # features/multibranch.feature:6
Given there is a "bdd-test" jenkins credential # multibranch_test.go:15 -> thereIsAJenkinsCredential
When we create a multibranch job called "spring-boot-web-example" # multibranch_test.go:38 -> weCreateAMultibranchJobCalled
And trigger a scan of the job "spring-boot-web-example" # multibranch_test.go:61 -> triggerAScanOfTheJob
waiting for job http://jenkins.jx.35.205.79.155.nip.io/job/spring-boot-web-example/job/master/ build #1 to finish
Branch indexing
Connecting to https://api.github.com using rajdavies/******
Obtained Jenkinsfile from 0280ad739ab23db08aef9034cd655eccf16a4963
[Pipeline] node
Still waiting to schedule task
maven-fq5tk is offline
Running on maven-65t8r in /home/jenkins/workspace/ing-boot-web-example_master-UIQWCU4BD66DNQI2WTSH2QFOH6JE54OPZ6RPWWYSJBXQYZGXF4DQ
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository https://github.com/rajdavies/spring-boot-web-example.git
> git init /home/jenkins/workspace/ing-boot-web-example_master-UIQWCU4BD66DNQI2WTSH2QFOH6JE54OPZ6RPWWYSJBXQYZGXF4DQ # timeout=10
Fetching upstream changes from https://github.com/rajdavies/spring-boot-web-example.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials
> git fetch --no-tags --progress https://github.com/rajdavies/spring-boot-web-example.git +refs/heads/master:refs/remotes/origin/master
> git config remote.origin.url https://github.com/rajdavies/spring-boot-web-example.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/master:refs/remotes/origin/master # timeout=10
> git config remote.origin.url https://github.com/rajdavies/spring-boot-web-example.git # timeout=10
Fetching without tags
Fetching upstream changes from https://github.com/rajdavies/spring-boot-web-example.git
using GIT_ASKPASS to set credentials
> git fetch --no-tags --progress https://github.com/rajdavies/spring-boot-web-example.git +refs/heads/master:refs/remotes/origin/master
Checking out Revision 0280ad739ab23db08aef9034cd655eccf16a4963 (master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0280ad739ab23db08aef9034cd655eccf16a4963
Commit message: "Draft create"
First time build. Skipping changelog.
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Run maven)
[Pipeline] container
[Pipeline] {
[Pipeline] sh
[ing-boot-web-example_master-UIQWCU4BD66DNQI2WTSH2QFOH6JE54OPZ6RPWWYSJBXQYZGXF4DQ] Running shell script
+ mvn -version
Picked up _JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Xms10m -Xmx192m
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T16:41:47+00:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.i386/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.4.86+", arch: "i386", family: "unix"
[Pipeline] sh
Job http://jenkins.jx.35.205.79.155.nip.io/job/spring-boot-web-example/job/master/ build 1 has result SUCCESS
Then there should be a "spring-boot-web-example/master" job that completes successfully # multibranch_test.go:81 -> thereShouldBeAJobThatCompletesSuccessfully
And the "spring-boot-web-example" application is "running" in the "staging" environment # multibranch_test.go:89 -> theApplicationIsInTheEnvironment
error getting a Kubernetes client No Auth Provider found for name "gcp"
--- Failed scenarios:
features/multibranch.feature:11
1 scenarios (1 failed)
5 steps (4 passed, 1 failed)
3m22.104883154s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment