Issue in Jenkins integration with GitHub and Ionic project - jenkins

I am trying to integrate ionic application with Jenkins and i am using GitHub as a repository. When i run the Multibranch pipeline job manually, the Jenkin is displaying below error.
Does anyone know what can be possible issue ? I am trying to learn how CI/CD works with this demo experiment.
I am referring this Youtube video : https://www.youtube.com/watch?v=q5voVJb3rHI&t=605s
Started by user admin
13:42:45 Connecting to https://api.github.com using PrashobThekkyal/*****
Obtained Jenkinsfile from a85fffb01a96c5c5d550326873047c6071557aff
Running in Durability level: MAX_SURVIVABILITY
GitHub has been notified of this commit’s build result
java.lang.IllegalArgumentException: Unsupported class file major version 57
at org.kohsuke.asm6.ClassReader.<init>(ClassReader.java:176)
at org.kohsuke.asm6.ClassReader.<init>(ClassReader.java:158)
at org.kohsuke.asm6.ClassReader.<init>(ClassReader.java:146)
at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.reader(ClassLoadingReferenceTypeHierachyReader.java:64)
at org.jenkinsci.bytecode.helper.TypeHierarchyReader.hierarchyOf(TypeHierarchyReader.java:176)
at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.hierarchyOf(ClassLoadingReferenceTypeHierachyReader.java:39)
at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:321)
at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFromAnyInterfaceImplementedBy(TypeHierarchyReader.java:329)
at org.jenkinsci.bytecode.helper.TypeHierarchyReader$TypeHierarchy.isAssignableFrom(TypeHierarchyReader.java:311)
at org.jenkinsci.bytecode.helper.TypeHierarchyReader.isAssignableFrom(TypeHierarchyReader.java:124)
at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.isAssignableFrom(ClassLoadingReferenceTypeHierachyReader.java:39)
at org.jenkinsci.bytecode.helper.TypeHierarchyReader.getCommonSuperClass(TypeHierarchyReader.java:131)
at org.jenkinsci.bytecode.helper.ClassLoadingReferenceTypeHierachyReader.getCommonSuperClass(ClassLoadingReferenceTypeHierachyReader.java:39)
at org.jenkinsci.bytecode.NonClassLoadingClassWriter.getCommonSuperClass(NonClassLoadingClassWriter.java:72)
at org.kohsuke.asm6.SymbolTable.addMergedType(SymbolTable.java:1209)
at org.kohsuke.asm6.Frame.merge(Frame.java:1293)
at org.kohsuke.asm6.Frame.merge(Frame.java:1238)
at org.kohsuke.asm6.MethodWriter.computeAllFrames(MethodWriter.java:1604)
at org.kohsuke.asm6.MethodWriter.visitMaxs(MethodWriter.java:1540)
at org.kohsuke.asm6.tree.MethodNode.accept(MethodNode.java:807)
at org.kohsuke.asm6.commons.JSRInlinerAdapter.visitEnd(JSRInlinerAdapter.java:150)
at org.jenkinsci.bytecode.Transformer$1$1.visitEnd(Transformer.java:109)
at org.kohsuke.asm6.MethodVisitor.visitEnd(MethodVisitor.java:783)
at org.kohsuke.asm6.ClassReader.readMethod(ClassReader.java:1278)
at org.kohsuke.asm6.ClassReader.accept(ClassReader.java:679)
at org.kohsuke.asm6.ClassReader.accept(ClassReader.java:391)
at org.jenkinsci.bytecode.Transformer.transform(Transformer.java:115)
at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:706)
at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1310)
at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1363)
at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1326)
at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1079)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.jenkinsci.plugins.workflow.cps.CpsScript.<init>(CpsScript.java:69)
at WorkflowScript.<init>(WorkflowScript)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:166)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:404)
at java.base/java.lang.Class.newInstance(Class.java:591)
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:434)
Caused: groovy.lang.GroovyRuntimeException: Failed to create Script instance for class: class WorkflowScript. Reason
at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:466)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:561)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:522)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:327)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
Jenkinsfile
pipeline {
agent any
stages {
stage ('Build') {
steps {
echo "Building Multibranch Pipeline"
}
}
stage ('Testing') {
steps {
echo "Testing Multibranch Pipeline"
}
}
stage ('Deployment') {
steps {
echo "False Deploying Multibranch Pipeline"
}
}
}
}
Jenkins Job configuration:

After days of analysis finally I have found the solution. I have did a very basic mistake of not reading version requirement to run Jenkins.
Java requirement to run Jenkins job
As mentioned in above URL, under the section 'Running Jenkins', they have clearly mentioned the support versions of java to run Jenkins job. So I checked java version and it was running on Java 13-a, yes that was stupid, because the Jenkins job will only run with java version 8 and 11.
So degrade your java version to 8 or 11 and it will work smoothly.
Proof
I thought to delete my stupid question, but later I thought to keep it, if in case it could help somebody. Kindly please don't give any kind of (+ve or -vew) points to this post, as it doesn't make any sense.

Related

Jenkins "unable to resolve class Declarative" error when building Python script

I began learning to use to Jenkins and wanted to make it run a Python script of mine automatically. I followed their tutorial and created a new Project called Pipeline Test.
I've also added the GitHub repo of a Python script I wanted to test (https://github.com/mateasmario/spam-bot).
As you can see, I've created a Jenkinsfile in that repo. Because my script is called spam-bot.py, I want my Jenkinsfile to run that script every time I click "Build now" inside Jenkins. This is the content of my Jenkinsfile:
Jenkinsfile (Declarative Pipeline)
pipeline {
agent { docker { image 'python:3.10.1-alpine' } }
stages {
stage('build') {
steps {
sh 'python spam-bot.py'
}
}
}
}
The problem is, whenever I click "Build now", my build fails and the console outputs the following error:
Started by user Mario Mateas
Obtained Jenkinsfile from git https://github.com/mateasmario/spam-bot.git
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 1: unable to resolve class Declarative
# line 1, column 26.
Jenkinsfile (Declarative Pipeline)
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:958)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:605)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:554)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:142)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:127)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:571)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:523)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:334)
at hudson.model.ResourceController.execute(ResourceController.java:99)
at hudson.model.Executor.run(Executor.java:432)
Finished: FAILURE
I looked up for this error on the internet, but didn't find any useful information, and that's why I decided to ask here.
I also don't have any Docker container configured. Do I need to configure one? I took a look over Jenkins' documentation for Docker, but didn't see any useful information for adding a Python image (as the one mentioned at the beginning of the Jenkinsfile) to the container.
Your Jenkinsfile contains invalid syntax on the first line, which is why the error is being thrown. Assuming you intended that first line to be a comment, you can modify the pipeline code to be:
// Jenkinsfile (Declarative Pipeline)
pipeline {
...
}
and your pipeline code will have valid syntax.

Unspecified Jenkinsfile Null Pointer Error in Workflow Steps

I encountered the following error in a Jenkinsfile pipeline I was building:
java.lang.NullPointerException
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE
The issue here, primarily, is that I'm not sure exactly what is going on. Since all it's mentioning is a null pointer error, I can't exactly be sure, and I can't find anything more specific.
Here's my Jenkinsfile:
#!groovy
node {
withEnv(["WORKSPACE=${pwd()}"]) { //Setting Workspace to the current directory
stage('Clone repository...') {
checkout scm //Let checkout automagically handle pulling in all the names we need and whatnot
}
stage('Building WAR...') {
step(withMaven(
// Maven installation declared in the Jenkins "Global Tool Configuration"
maven: 'Maven 3.6.0') {
// Run the maven build
sh 'mvn clean install' //Same as running on local
sh 'mv ${WORKSPACE}/target/QUserService.war ${WORKSPACE}/target/QUserService_War-QUserService-${BRANCH_NAME}-${BUILD_NUMBER}.war'
//For above line, 'mv' is the Linux command to rename/move files, which is needed for the UCD script
}
// withMaven will discover the generated Maven artifacts, JUnit Surefire & FailSafe & FindBugs reports...
)
}
}
}
So - first, you don't need to define WORKSPACE. It is defined for you by Jenkins. You can convince yourself of this by running sh 'set' on a linux agent.
Next, you don't need to check out the project. It will already be there (assuming you're using a pipeline project).
Next, you don't need to put the withMaven inside of a step call. In a scripted pipeline, the stuff in a stage is groovy script. Step isn't required.
node {
stage('Building WAR...') {
withMaven(
maven: 'Maven 3.5.0') {
// Run the maven build
sh 'mvn clean install' //Same as running on local
}
}
I took out the move step and comment just to make it clearer.
I didn't get a null pointer error. See if removeing the step call and removing the step call make the NPE go away. If not, I'd suggest attaching the console output to attempt to see where this happens.

Printing code coverage status on pull request for Bitbucket stash based repository using JenkinsFile

I currently have a private Bitbucket stash repository e.g. https://xyzgit.company.com/stash/scm/proj1/subproj2.
This is a gradle based project which uses JenkinsFile to manage different stages for Jenkins Job (including setup, build, publish etc). Whenever a new change is committed to a branch, it automatically triggers a build or provide an option to trigger a build. To analyse code coverage, we use Jcoco Plugin which analyzes all subfolders to get the coverage.
My current requirement is to print code coverage status on the pull request after the build is successful over jenkins using JenkinsFile.
I came across a plugin i.e. Bit Bucket Code Coverage Plugin but I did not find any such plugin available to be installed in my Jenkins Environment. I tried to do it manually but it redirects me to plugin available for Github.
I anyway installed that and tried what is suggested in the document i.e. adding these two lines in my Jenkins File :
step([$class: 'MasterCoverageAction', scmVars: [GIT_URL: "https://xyzgit.company.com/stash/scm/proj1/subproj2"]])
step([$class: 'CompareCoverageAction', scmVars: [GIT_URL: "https://xyzgit.company.com/stash/scm/proj1/subproj2"]])
It did not work. I got the following Error :
[GitHub PR Status] Attempt to discover PR for null # null
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // wrap
[Pipeline] }
[Pipeline] // wrap
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.FileNotFoundException: https://api.github.com/repos/stash/scm
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0
(HttpURLConnection.java:1872) at sun.net.www.protocol.http.
HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.
getResponseCode(HttpsURLConnectionImpl.java:338)
at org.kohsuke.github.Requester.parse(Requester.java:602)
Caused: java.io.FileNotFoundException:
https://api.github.com/repos/stash/scm
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.
newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.
newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at sun.net.www.protocol.http.HttpURLConnection$10.
run(HttpURLConnection.java:1926)
at sun.net.www.protocol.http.HttpURLConnection$10.
run(HttpURLConnection.java:1921)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.
getChainedException(HttpURLConnection.java:1920)
at sun.net.www.protocol.http.HttpURLConnection.
getInputStream0(HttpURLConnection.java:1490)
at sun.net.www.protocol.http.HttpURLConnection.
getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.
getInputStream(HttpsURLConnectionImpl.java:254)
at org.kohsuke.github.Requester.parse(Requester.java:612)
at org.kohsuke.github.Requester.parse(Requester.java:594)
at org.kohsuke.github.Requester._to(Requester.java:272)
Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Not
Found","documentation_url":"https://developer.github.com/v3"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:686)
at org.kohsuke.github.Requester._to(Requester.java:293)
at org.kohsuke.github.Requester.to(Requester.java:234)
at org.kohsuke.github.GitHub.getRepository(GitHub.java:443)
at com.github.terma.jenkins.githubprcoveragestatus.
GitHubPullRequestRepository.getGitHubRepository
(GitHubPullRequestRepository.java:57)
Caused: java.io.IOException: Could not retrieve GitHub repository named
stash/scm (Do you have properly set 'GitHub project' field in job
configuration?) at com.github.terma.jenkins.githubprcoveragestatus.
GitHubPullRequestRepository.getGitHubRepository
(GitHubPullRequestRepository.java:59) at
com.github.terma.jenkins.githubprcoveragestatus.
GitHubPullRequestRepository.getPullRequestFor
(GitHubPullRequestRepository.java:32)
at com.github.terma.jenkins.githubprcoveragestatus.
PrIdAndUrlUtils.getMultiBranch(PrIdAndUrlUtils.java:63)
at com.github.terma.jenkins.githubprcoveragestatus.
PrIdAndUrlUtils.getPrId(PrIdAndUrlUtils.java:72)
at com.github.terma.jenkins.githubprcoveragestatus.
CompareCoverageAction.perform(CompareCoverageAction.java:93)
at org.jenkinsci.plugins.workflow.steps.
CoreStep$Execution.run(CoreStep.java:80)
at org.jenkinsci.plugins.workflow.steps.
CoreStep$Execution.run(CoreStep.java:67)
at org.jenkinsci.plugins.workflow.steps.
SynchronousNonBlockingStepExecution$1$1.
call(SynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:260)
at org.jenkinsci.plugins.workflow.steps.
SynchronousNonBlockingStepExecution$1.
run(SynchronousNonBlockingStepExecution.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.
runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.
run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE
Can anybody help me if any additional setting is there? or How to inject env CHANGE_URL and CHANGE_ID in JenkinsFile ?
Take a look at Code Coverage Plugin for Bitbucket Server. In it's repo you could find maven-based client which supports JACOCO and could be easily called from gradle.

Using waitForQualityGate in a Jenkins declarative pipeline

The following SonarQube (6.3) analysis stage in a declarative pipeline in Jenkins 2.50 is failing with this error in the console log: http://pastebin.com/t2ja23vC. More specifically:
SonarQube installation defined in this job (SonarGate) does not match any configured installation. Number of installations that can be configured: 1.
Update: after changing "SonarQube" to "SonarGate" in the Jenkins settings (under SonarQube servers, so it'll match the Jenkinsfile), I get a different error: http://pastebin.com/HZZ6fY6V
java.lang.IllegalStateException: Unable to get SonarQube task id and/or server name. Please use the 'withSonarQubeEnv' wrapper to run your analysis.
The stage is a modification of the example from the SonarQube docs: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins#AnalyzingwithSonarQubeScannerforJenkins-AnalyzinginaJenkinspipeline
stage ("SonarQube analysis") {
steps {
script {
STAGE_NAME = "SonarQube analysis"
if (BRANCH_NAME == "develop") {
echo "In 'develop' branch, don't analyze."
}
else { // this is a PR build, run sonar analysis
withSonarQubeEnv("SonarGate") {
sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
}
}
}
}
}
stage ("SonarQube Gatekeeper") {
steps {
script {
STAGE_NAME = "SonarQube Gatekeeper"
if (BRANCH_NAME == "develop") {
echo "In 'develop' branch, skip."
}
else { // this is a PR build, fail on threshold spill
def qualitygate = waitForQualityGate()
if (qualitygate.status != "OK") {
error "Pipeline aborted due to quality gate coverage failure: ${qualitygate.status}"
}
}
}
}
}
I also created a webhook, sonarqube-webhook, with the URL http://****/sonarqube-webhook/. Should it be like that, or http://****/sonarqube/sonarqube-webhook? To access the server dashboard I use http://****/sonarqube.
In SonarQube's Quality Gates section I created a new quality gate:
I am not sure if the setting in SonarGate is correct. I do use jenkins-mocha to generate an lcov.info file that is used in Sonar to generate the coverage data.
Perhaps the quality gate setting is the wrong setting to do? The end result is to fail the job in Jenkins if coverage % is not met.
Finally, I am not sure if the following configurations in the Jenkins system configuration are at all required:
And
(It's 9000 not 900... cut text in the screen shot)
The SonarQube Jenkins plugin scans the build output for two specific lines, which it uses to get the SonarQube report task properties and project URL. If your invocation of sonar-scanner does not output these lines, the waitForQualityGate() call won't have the task ID to look them up. So you will have to figure out the correct settings to make it more verbose.
See the extractSonarProjectURLFromLogs and extractReportTask methods in the SonarUtils class of the plugin to understand how they work:
ANALYSIS SUCCESSFUL, you can browse <project URL> is used to add a link to the badge (in the build history)
Working dir: <dir with report-task.txt> is used to pass the task ID to the waitForQualityGate step
This was discovered to be a bug in the SonarQube scanner for Jenkins, when using a Jenkins slave for jobs (if the job is run on the master, it'd work). You can read more here: https://jira.sonarsource.com/browse/SONARJNKNS-282
I have tested this using a test build of v2.61 of the scanner plug-in and found it working.
The solution is to upgrade to v2.61 when released.
This stage will then work:
stage ("SonarQube analysis") {
steps {
withSonarQubeEnv('SonarQube') {
sh "../../../sonar-scanner-2.9.0.670/bin/sonar-scanner"
}
def qualitygate = waitForQualityGate()
if (qualitygate.status != "OK") {
error "Pipeline aborted due to quality gate coverage failure: ${qualitygate.status}"
}
}
}
If you're running SonarCube in a docker container check that the memory isn't exhausted. We were maxing out. Which seemed to be the issue.

How to use RTC plugin from jenkins pipeline groovy script?

I know I can use scm polling via a Jenkins RTC plugin, I'm just wondering if there's an example of how to do this via the groovy script for the pipeline plugin?
For example:
node{
stage 'Checkout'
git url: 'https://github.com/whatever/myrepo.git'
...
}
Something like above but instead of git, you use rtc toolkit with prod url and specify a stream or a workspace... Cannot find an example anywhere and not sure how to go about implementing it via api (or if that's even possible?)
Actually the snippet generator is a bit misleading in that it does not generate all that you need. For example, based on what was generated I used this in the pipeline:
node {
teamconcert([buildDefinition: 'TestStream', value: 'buildDefinition'])
}
If you use it as is you will get this exception:
RTC : checkout...
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.NullPointerException
at com.ibm.team.build.internal.hjplugin.RTCScm.checkout(RTCScm.java:1948)
atorg.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
at hudson.security.ACL.impersonate(ACL.java:221)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
The syntax that you require is this:
node {
teamconcert([
buildType: [
buildDefinition: 'TestStream',
value: 'buildDefinition'
]
])
}
Team concert expects things to be wrapped in a 'buildType'. I found this in a forum answer on jazz.net, have not seen it documented anywhere else.
There is a snippet code generator right there in the pipeline plugin, took me a while to find it, but it will generate the groovy code for any Jenkins task... Rtc is listed under teamconcert: Team Concert, just scroll down to the bottom and tick the Snippet Generator checkbox!

Resources