Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
# first grab all dependencies | |
mvn dependency:resolve | |
# then list them with -o to keep noise low, | |
# remove extra information and duplicates | |
mvn -o dependency:list \ | |
| grep ":.*:.*:.*" \ | |
| cut -d] -f2- \ | |
| sed 's/:[a-z]*$//g' \ | |
| sort -u |
Code | Title | Duration | Link |
---|---|---|---|
Keynote | Andy Jassy Keynote Announcement Recap | 0:01 | https://www.youtube.com/watch?v=TZCxKAM2GtQ |
Keynote | AWS re:Invent 2016 Keynote: Andy Jassy | 2:22 | https://www.youtube.com/watch?v=8RrbUyw9uSg |
Keynote | AWS re:Invent 2016 Keynote: Werner Vogels | 2:16 | https://www.youtube.com/watch?v=ZDScBNahsL4 |
Keynote | [Tuesday Night Live with Jame |
| Title | Description
ProcessBuilder builder = new ProcessBuilder( myCommand.split(' ') ) | |
builder.redirectErrorStream(true) | |
Process process = builder.start() | |
InputStream stdout = process.getInputStream () | |
BufferedReader reader = new BufferedReader (new InputStreamReader(stdout)) | |
content = "" | |
while ((line = reader.readLine ()) != null) { |
echo "GIT environment variables" | |
echo "GIT Commit $GIT_COMMIT" | |
echo "GIT Branch $GIT_BRANCH" | |
echo "GIT Previous commit $GIT_PREVIOUS_COMMIT" | |
echo "GIT URL $GIT_URL" |
Check to see if a build is running or not | |
I tried the Python script in the answer to this question, but couldn't get it to work. I don't know Python, and didn't want to invest any time in debugging, but was able to read enough of the script to gain inspiration from it. | |
All I need to do is check to see if a build is running or not. To do that I used curl and grep, like this: | |
curl http://myjenkins/job/myjob/lastBuild/api/json | grep --color result\":null | |
If a build is in progress, a grep for result\":null will return 0. | |
If a build is finished, a grep for result\":null will return 1. |
from wants a file or path. What you're feeding it, generatePomFileForMavenJavaPublication is a task, which is most definitely not a file or path, so that's not going to work. | |
What you can do is make generatePomFileForMavenJavaPublication a prerequisite for jar and pick up the pom it creates in your build directory. | |
Something like the following should accomplish this: | |
jar { | |
dependsOn generatePomFileForMavenJavaPublication | |
from("$builddir/pom.xml") //Or whatever path it goes to in the generate task. | |
into("META-INF/maven/$project.group/$project.name") |
FIX: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS | |
Published 17 February 10 01:39 PM | Scott Mitchell | |
I teach two six week courses on ASP.NET at the University of California - San Diego Extension. The first class serves as an introduction to ASP.NET and as such many of the students create their first ASP.NET websites in class. During the first meeting students create a simple ASP.NET website. At the end of the first evening, those students who did not bring their own laptop need to work on their website from home or work; they may copy the files to a thumb drive or ZIP up the files and send them via email. In either case, it's not uncommon for students to bump into the following error when opening the website to bump into the following error message: | |
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application |
Execute the following script using your MyGet [feedUrl] and MyGet [username] , [password] and [apikey]. Run this from a commandline where you have access to nuget.exe (or set the path to your nuget.exe in a system environment variable).
nuget setapikey [apikey] -source [feedUrl]
nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]