View python3.6-setup.log
Sending build context to Docker daemon 203.8 kB
Step 1/4 : FROM python:3.6
---> 775dae9b960e
Step 2/4 : WORKDIR /tmp/app
---> 0a50baeafe90
Removing intermediate container 06d9206a8888
Step 3/4 : COPY requirements.txt requirements.txt
---> b8ee42a4b0f8
Removing intermediate container 3ef5cc0e069a
Step 4/4 : RUN python -m venv /tmp/venv && . /tmp/venv/bin/activate && pip install -r requirements.txt
View Dockerfile
FROM python@sha256:d7728edb9e52abc58552cec26d871f474394f3ffdefbe2929da93bfa42d92b1f
# Where the project files will be installed and tested inside the container
WORKDIR /usr/local/plowapp
# Copy the project files to the WORKDIR
COPY . .
# The python version in the container is owned by the OS of the container
# We need to isolate our project from the OS requirements by installing the virtualenv
View build.gradle
// To reproduce the bug:
// mkdir -p src/main/apple
// echo "red" >src/main/apple/pomme.txt
// gradle juicerJuicer
@Managed interface JuiceComponent extends GeneralComponentSpec { }
@Managed interface FruitLanguage extends LanguageSourceSet {}
@Managed
interface JuiceBinarySpec extends BinarySpec {
File getOutputDir()
View npe-getting-ivy.xml
$ gradle --daemon copyDeps --stacktrace
:copyDeps
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> java.lang.NullPointerException (no error message)
* Try:
View buildFruits2.gradle
@Managed interface JuiceComponent extends GeneralComponentSpec { }
@Managed interface FruitLanguage extends LanguageSourceSet {}
@Managed
interface JuiceBinarySpec extends BinarySpec {
List<String> getArgs()
void setArgs(List<String> args)
}
class JuicerTask extends SourceTask {
View buildFruits.gradle
@Managed
interface FruitBinarySpec extends BinarySpec {
List<String> getFruits()
void setFruits(List<String> fruits)
}
class FruitTask extends SourceTask {
@Input
List<String> fruits
View git-merge-before-build.dsl
// Jenkins Pipeline DSL to demonstrate git merge before build
node {
String path = '/tmp/jenkins/upstream-repo'
sh "rm -rf ${path}"
ws(path) {
sh 'git --version'
sh 'git init'
sh 'touch README.md; git add README.md; git commit -m "init"'
sh 'git checkout -b pull-requests/1/from'
sh 'touch file.txt; git add file.txt; git commit -m "Add file"'
View git-merge-before-build.log
[Pipeline] checkout
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url /tmp/jenkins/upstream-repo # timeout=10
Fetching upstream changes from /tmp/jenkins/upstream-repo
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress /tmp/jenkins/upstream-repo pull-requests/1/from
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/refs/heads/master^{commit} # timeout=10
Merging Revision 19e39345b1b178e3ebc4c5b3af277cbd64c37f9f (refs/remotes/origin/master) to origin/master, UserMergeOptions{mergeRemote='origin', mergeTarget='master', mergeStrategy='MergeCommand.Strategy', fastForwardMode='--no-ff'}
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.6</version>
<relativePath />
</parent>
View accessToJenkinsInstanceFromWorkflow
def j = Jenkins.getInstance()
def items = j.getItems(hudson.model.Job)
for (job in items) {
def lastStableBuild = job.getLastStableBuild()
println(lastStableBuild.number)
}