I am getting this 'No such DSL method 'pipeline' found among steps' from Jenkins. From a quick google search, it seems like I am missing the Pipeline: Model definition plugin. However, I can't find the plugin on in 'Plugin Manager'. I have tried to install 'Pipeline: Model API', and a few other plugins with no luck resolving the issue.
How can i install 'Pipeline: Model definition' on jenkins 2.89.3?
Installing 'Pipeline: Model definition' resolve the issue
Related
I'm trying to add a dependency to my seed job, but no matter what I try, I always get the exception in Jenkins that it can't find the classes that I import in my groovy job. I've tried adding the dependency as compile, testCompile, lib, everything in my build.gradle file, but it doesn't seem to do anything... I'm trying to import org.yaml.snakeyaml.Yaml from the org.yaml:snakeyaml:1.17 dependency.
Any idea on how I can somehow get jenkins to get a hold of that dependency when trying to execute that seed job?
Thanks!
Alternatively you might use Grape to download any dependency directly from your Jenkinsfile. If you add
#Grab(group='org.yaml', module='snakeyaml', version='1.20')
on top of your Jenkinsfile, Jenkins pipeline will download this dependency and it will get available in your pipeline script.
Never mind, I've found the solution. I copied the dependency to a specific folder during the gradle build and added that to the additional classpath of the job dsl. It works now!
I am using Chef to deploy my Jenkins instance. I am currently using the Jenkins cookbook found in the Chef Supermarket: https://supermarket.chef.io/cookbooks/jenkins .
I'm managing my plugins by adding them to the _master_war.rb recipe file. Most plugins I'm finding are straight forward, follow the specified instructions in the cookbook supermarket page and can be found for download on the https://wiki.jenkins-ci.org site with a link to a hpi/jpi file.
I'm finding some plugins which are only available via GitHub. For example, https://plugins.jenkins.io/workflow-cps. My current plugin code looks like thus:
# Installs the latest version of the workflow-job Plugin for Jenkins
# The BitBucket Build Status Notifier plugin is dependent on this plugin
# https://github.com/jenkinsci/workflow-job-plugin
jenkins_plugin 'workflow-job-plugin' do
source 'https://github.com/jenkinsci/workflow-job-plugin.git'
notifies :restart, 'runit_service[jenkins]', :immediately
end
Unfortunately, this syntax does not appear to install the plugin via git successfully on my jenkins instance. The following warning appears after running the recipe on the node jenkins is running on:
Bitbucket Build Status Notifier Plugin v1.3.3
workflow-job v1.11 is missing. To fix, install v1.11 or later.
workflow-cps v1.11 is missing. To fix, install v1.11 or later.
multiple-scms v0.6 is missing. To fix, install v0.6 or later.
What would be the correct way / syntax to use to go about downloading and installing these plugins from github to my jenkins instance using the jenkins cookbook for Chef?
I would to to add to this discussion that I found a way to work through this issue. When a page like this one is the official source for a Jenkins plugin: plugins.jenkins.io/workflow-cps, on the right hand side of the screen is an 'Archives' link which will take you to the .hpi listing for all available versions of the given plugin. I.E. updates.jenkins.io/download/plugins/workflow-cps . Using the link address for the listed versions you can source the appropriate .hpi file
Weirdly I cannot find jenkins scriptler plugin.It not already installed I checked.I tried "check now " option in plugin manager to update available plugins also .It updated but still cannot find scriptler plugin in available plugins.Is the name changed .I searched several times.Couldn't find if the name is changed.Please, help.
The Jenkins Scriptler plugin is no longer available, due to security reasons: https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin
"Distribution of This Plugin Has Been Suspended"
In my Jenkins build, I have a Groovy script(because I am using the Pipeline plugin) where I am trying to make an API call using OkHttpClient.
I have the following Grape code that I got from here:
#Grapes(
#Grab(group='com.squareup.okhttp', module='okhttp', version='2.7.5')
)
For this, I am getting:
General error during conversion: Error grabbing Grapes -- [unresolved dependency: com.squareup.okkhttp#okhttp;2.7.5: not found]
java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: com.squareup.okhttp#okhttp;2.7.5: not found]
at sun.reflect.NativeContructorAccessorImpl.newInstance0(Native Method)
Any idea what could be wrong?
Can't Grape retrieve packages when running in a Jenkins pipeline script?
I had a similar issue running a Jenkins Groovy console script that used the #Grab annotation. The error was caused by the Jenkins Groovy not being able to resolve my corporate proxyhost server.
The Groovy proxyserver can be set on the command line, like this:
groovy -Dhttp.proxyHost=yourproxy -Dhttp.proxyPort=portNumber yourscript.groovy
but I was not able to find out how to do that for the Jenkins Groovy.
I ended with the following workaround:
You can install the required library from the command line (assuming you have access to the Jenkins server). In that case the proxyserver is easily specified as follows:
grape -Dhttp.proxyHost=proxy.server.net -Dhttp.proxyPort=port install %groupId% %artifactId% [%version%]
Also insure that you install the library while logged in under the Jenkins user account. Grapes libraries are user account specific.
I'm trying to use CSSLint with Jenkins Continious Integration using MSBuild.
I didn't found a plugin to install on Jenkins.
Does anyone knows how I can find a plugin that has the same functionality as CSSLint which can be installed with Jenkins?
I believe you are looking for Violation plugin.
The latest versions of the Violations Plugin allow you to report output using:
CSS Lint output --format=lint-xml and csslint violations configuration
OR
CSS Lint output --format=checkstyle-xml and checkstyle violations configuration