jenkinsci / jenkinsfile-runner-github-actions Goto Github PK
View Code? Open in Web Editor NEWJenkins single-shot pipeline execution in a GitHub Action POC
Home Page: https://github.com/features/actions
License: Apache License 2.0
Jenkins single-shot pipeline execution in a GitHub Action POC
Home Page: https://github.com/features/actions
License: Apache License 2.0
This repository now has GitHub Issues enabled. It would be awesome to move https://github.com/jenkinsci/jenkinsfile-runner-github-actions#current-limitations--todos to GitHub issues so that potential contributors can see the issues and potentially contribute to them
Your current example suggests something like
def allTests() {
mvn 'test -B'
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
if (currentBuild.result == "UNSTABLE") {
sh "exit 1"
}
}
def mvn(args) {
sh "mvn ${args} -Dmaven.test.failure.ignore -Dmaven.repo.local=/github/workspace/.m2"
}
which does not make much sense to me. First you are running Maven and telling it to accept test failures; then you are running the Jenkins publisher for tests, which is only useful for setting a build status since the actual reports are discarded as soon as the container exits; then you are causing the build to fail if there were results. This could all be done more simply:
def allTests() {
mvn 'test -B'
}
def mvn(args) {
sh "mvn ${args} -Dmaven.repo.local=/github/workspace/.m2"
}
letting Surefire fail the build if there are any test failures—its default behavior.
(Also BTW the -B
argument could be pushed down into the mvn
function.)
Hi,
I'm trying to load an additional Jenkins library via the config as code plugin. As far as I understand the lazy loaded action, it should respect a jenkins.yaml
file in the root of my repo, right? But Jenkins fails because it can't find my lib, and I don't see cac in the list of loaded plugins. Did I miss something?
Hi Team,
I am getting below error. while executing the workflow (calling jenkins file). Please refer the below error code and help me on this
/app/bin/jenkinsfile-runner-launcher lint --jenkins-war=/app/jenkins-2.319.3 --file=./demo2/githubaction1/actions/test/sample.jenkinsfile --plugins=/usr/share/jenkins/ref/plugins
java.lang.RuntimeException: Unhandled exception
at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.call(JenkinsLauncherCommand.java:69)
at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.call(JenkinsLauncherCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap.main(Bootstrap.java:46)
Caused by: java.lang.NoClassDefFoundError: hudson/model/RootAction
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.newInstance(Class.java:556)
at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.runJenkinsfileRunnerApp(JenkinsLauncherCommand.java:226)
at io.jenkins.jenkinsfile.runner.bootstrap.commands.JenkinsLauncherCommand.call(JenkinsLauncherCommand.java:67)
... 9 more
Caused by: java.lang.ClassNotFoundException: hudson.model.RootAction
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 35 more
0s
0s
Hi @jonico! I would like to join as a co-maintainer of this project so that I could work on improving the GitHub actions set for Jenkinsfile Runner as documented on jenkinsci/jenkinsfile-runner#576. I would appreciate your approval. Thanks in advance!
P.S: More contributors and maintainers are always welcome!
i tried to build swift language here with github actions:
https://github.com/soloturn/swift-aur/actions
but - the regular swift is built with jenkings. and one could add community based nodes, like described here:
is there a possiblitly to use this jenkinsfile runner to combine the github action building swift, and the apple hosted jenkins?
This project uses a lot of deprecated "master" terminology in documentation. It would be nice to clean it up, especially the README page and other user facing materials. All of that can be done in small atomic pull requests, contributors are welcome!
Currently the repo uses a custom Docker image, which is produced in another repository (and which is quite outdated). Once https://issues.jenkins-ci.org/browse/JENKINS-56233 is implemented, we can automate the build of based Docker images in this repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.