Commit graph

70 commits

Author SHA1 Message Date
Tibor Vass
0fa81e50e3
Update Jenkinsfile
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 7491db3e92)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-26 23:52:43 +02:00
Tibor Vass
dfadf729d3
Jenkinsfile: move integration step cleanup to amd64 where it was intended to be
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f3d8b8ae74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-26 18:16:49 +02:00
Stefan Scherer
168e23a2f5
Zap a fixed folder, add build number to folder inside
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit 4866207543)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:36:13 +02:00
Peter Salvatore
5d74bd7ef9
Jenkinsfile hack for auto-cancellation.
This change will cause Jenkins to only build the
latest HEAD of a PR branch, cancelling any
previous builds that may already be in progress.
This will decrease feedback time and help mitigate
resource contention.

Signed-off-by: Peter Salvatore <peter@psftw.com>
(cherry picked from commit 85bcc524ea)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:36:04 +02:00
Sebastiaan van Stijn
e101935ae8
Jenkinsfile: Windows: enabled debug-mode for daemon under test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1fbadd76b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:36:04 +02:00
Sebastiaan van Stijn
a365f0745d
Jenkinsfile: create bundles for Windows stages
CI already stores the logs of the test daemon, so we might as well
store them as artifacts

```
[2019-09-03T12:49:39.835Z] INFO: Tidying up at end of run
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.out) to C:\windows\TEMP\CIDUT.out
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.err) to C:\windows\TEMP\CIDUT.err
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6ee61f5493)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:36:03 +02:00
Sebastiaan van Stijn
08573e2920
Jenkinsfile: add TESTDEBUG
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d723643dc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:35:53 +02:00
Sebastiaan van Stijn
517ebe626c
integration: use gotestsum to generate junit.xml and go-test-report.json
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f3be6b346f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:35:51 +02:00
Sebastiaan van Stijn
14d561eb1c
integration: simplify parallel run destination
'Namespace' parallel runs by bind-mounting a different directory
in the container, instead of making the tests running inside
the container aware of the namespaced location.

This makes it transparent to the tests, and slightly reduces
complexity.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3262a69be6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-25 21:35:50 +02:00
Andrew Hsu
23c7134bad
Merge pull request #371 from andrewhsu/clean
[19.03] Jenkinsfile: ensure all containers are cleaned up
2019-09-19 17:56:39 -07:00
Tibor Vass
4b5c535be9 Jenkinsfile: ensure all containers are cleaned up
By convention, containers spawned by jenkins jobs have the name:
docker-pr${BUILD_NUMBER}

That works fine for jobs with a single container. This commit cleans up
when multiple containers are spawned with the convention that their names
share the same "docker-pr${BUILD_NUMBER}-" prefix.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f470698c2c)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-09-19 23:42:20 +00:00
Andrew Hsu
a18eea2702 run integration-cli stages on s390x and ppc64le if not a PR check
Essentially, run on merge to target branch which may or may not be
master branch. Could be 19.03 branch, for example.

See: https://jenkins.io/doc/book/pipeline/syntax/

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit e653943e8b)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-09-19 21:41:36 +00:00
Andrew Hsu
36fc8f5809 skip win-RS1 on PRs unless the checkbox is checked
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 039eb05ac8)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-09-19 21:41:10 +00:00
Sebastiaan van Stijn
ca22ec44ba Jenkinsfile: shorten stage names for consistency and to fit Jenkins UI
The Blue Ocean UI truncates names, which makes it possible to distinguish
which Windows stage is RS1 or RS5. This patch shortens those names so that they
fit in the Blue Ocean UI.

Other stages and parameters were renamed as well to better reflect what they're running;

Before             | After
-------------------|--------------------------------
janky              | amd64
power              | ppc64le
power-master       | ppc64le integration-cli
windowsRS1         | win-RS1
windowsRS5-process | win-RS5
z                  | s390x
z-master           | x390x integration-cli

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

WIP renames

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

(cherry picked from commit c18f793f40)

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-09-19 21:41:05 +00:00
Sebastiaan van Stijn
c5bfb0290e
Jenkinsfile: fix invalid expression in bundles script
This was introduced in a76ff632a4:

    + find bundles -path */root/*overlay2 -prune -o -type f ( -o -name *.log -o -name *.prof ) -print
    find: invalid expression; you have used a binary operator '-o' with nothing before it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ca1e7a3b4a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-31 13:27:31 +02:00
Sebastiaan van Stijn
2d3475bac8
Jenkinsfile: don't mark build failed when failing to create bundles
Failing to archive the bundles should not mark the build as failed.
This can happen if a build is terminated early, or if (to be implemented)
an optional build-stage is skipped / failed;

```
2019-08-24T10:53:09.354Z] + bundleName=janky
[2019-08-24T10:53:09.354Z] + echo Creating janky-bundles.tar.gz
[2019-08-24T10:53:09.354Z] Creating janky-bundles.tar.gz
[2019-08-24T10:53:09.354Z] + xargs tar -czf janky-bundles.tar.gz
[2019-08-24T10:53:09.354Z] + find bundles -path */root/*overlay2 -prune -o -type f ( -name *-report.json -o -name *.log -o -name *.prof -o -name *-report.xml ) -print
[2019-08-24T10:53:09.354Z] find: bundles: No such file or directory
[2019-08-24T10:53:09.354Z] tar: Cowardly refusing to create an empty archive
[2019-08-24T10:53:09.354Z] Try 'tar --help' or 'tar --usage' for more information.
Error when executing always post condition:
hudson.AbortException: script returned exit code 123
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.handleExit(DurableTaskStep.java:569)
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:515)
	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:461)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a76ff632a4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-31 13:27:29 +02:00
Sebastiaan van Stijn
22f6cfd4df
Jenkinsfile: use wildcards for artifacts, and don't fail on missing ones
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8b65e058be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-31 13:27:27 +02:00
Stefan Scherer
339261224f
Use new windows labels
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
(cherry picked from commit ca3e230b77)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-31 13:27:20 +02:00
Sebastiaan van Stijn
9b836acdd0
Jenkinsfile: run DCO check before everything else
This will run the DCO check in a lightweight alpine container, before
running other stages, and before building the development image/container
(which can take a long time).

A Jenkins parameter was added to optionally skip the DCO check (skip_dco)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d6f7909c76)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-31 13:27:16 +02:00
Sebastiaan van Stijn
83e7de55aa
Jenkinsfile: save docker-py artifacts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8b6da9d82f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:46 +02:00
Sebastiaan van Stijn
fb471aab26
Jenkinsfile: build dynamic binary for docker-py, to match makefile
This also makes sure that we can test all functionality of the
daemon, because some features are not available on static binaries.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4ddb40ee8a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:44 +02:00
Sebastiaan van Stijn
70303ded8e
docker-py: output junit.xml for test-results
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5969bbee79)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:42 +02:00
Sebastiaan van Stijn
75d217961e
Jenkinsfile: collect junit.xml for all architectures
Jenkins groups them per stage, so collecting them for all architectures
is possible (without them conflicting or becoming ambiguous)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e2f5b78e78)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:28 +02:00
Sebastiaan van Stijn
c243ffaa06
Jenkinsfile: send junit.xml in the stage that produced it
This will send the results directly after the tests complete,
and make the stage more atomic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7f9328ad2e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:26 +02:00
Andrew Hsu
e6b49956d8
fix bundles filenames in Jenkinsfile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit eb30f0ad84)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:18 +02:00
Andrew Hsu
4593b400f9
rename powerpc bundles in Jenkinsfile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit ad29f9e471)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:16 +02:00
Andrew Hsu
b81a2581ff
rename z bundles in Jenkinsfile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit a049ea1a93)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:14 +02:00
Andrew Hsu
9ccba2faf1
be more lenient on junit report gathering in Jenkinsfile
In case a job fails before even generating a report file.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 0cfc1ec2bd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:12 +02:00
Andrew Hsu
55b938cb98
use environment for z jobs in Jenkinsfile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 4e2f39cf14)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:10 +02:00
Andrew Hsu
46fa5a43ff
use environment for power jobs in Jenkinsfile
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 3564b03fbc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:08 +02:00
Andrew Hsu
75c408cb6c
set timeouts in Jenkinsfile to 2 hrs
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit bf70a5975d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:06 +02:00
Andrew Hsu
23b7bdf785
add z-master stage to Jenkinsfile
The z-master stage will just run the integration-cli tests. The
existing z stage will run the unit tests and the integration
tests. In this way, PR check jobs will be shorter, but all
integration tests will run after PR is merged to master.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit bdc1c1a02a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:05 +02:00
Andrew Hsu
10dd4a25ba
add powerpc-master stage to Jenkinsfile
The powerpc-master stage will just run the integration-cli tests. The
existing powerpc stage will run the unit tests and the integration
tests. In this way, PR check jobs will be shorter, but all integration
tests will run after PR is merged to master.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit c2f9d58375)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:03 +02:00
Tibor Vass
eee3f67571
Jenkinsfile: reduce time of integration tests by dividing tests into 3 parallel runs
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit e554fb23c8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:58:00 +02:00
Tibor Vass
34a8dcae17
Jenkinsfile: move static and cross compilation to unit-validate stage
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 251c8dca28)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:56 +02:00
Kir Kolyshkin
5c2e0c6f9b
Jenkinsfile: avoid errors from find
There are many errors like this one:

> 01:39:28.750 find: ‘bundles/test-integration/dbc77018d39a5/root/overlay2/f49953a883daceee60a481dd8e1e37b0f806d309258197d6ba0f6871236d3d47/work/work’: Permission denied

(probably caused by bad permissions)

These directories are not to be looked at when we search for logs, so
let's exclude them. It's not super easy to do in find, here is some
kind of an explanation for find arguments

```
PATTERN ACTION OR PATTERN                           ACTION
-path X -prune -o -type f [AND] (-name A -o name B) -print
```

(here -o means OR, while AND is implicit)

While at it,
 - let the find know we're only looking for files, not directories
 - remove a subshell and || true
 - remove `-name integration.test` (there are no such files)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b283dff3ff)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:48 +02:00
Sebastiaan van Stijn
0d0b1e77c0
Jenkinsfile: remove "experimental" stage
All tests that require experimental either spin up a separate daemon,
or use the main daemon if experimental is enabled.

This patch

- allows enabling "experimental" for stages through an environment variable
- enables experimental by default on all stages, so that some of these tests
  don't have to start a new daemon.
- removes the seaprate "experimental" stage, because it was running exactly
  the same tests as the "janky" stage.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e856b46cfb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:26 +02:00
Sebastiaan van Stijn
94d56428a6
Consistently use DOCKER_EXPERIMENTAL=1 instead or =y
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a43123cab1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:24 +02:00
Sebastiaan van Stijn
30549cdb4b
Jenkinsfile: move docker-py to separate stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ad28fec1c9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:12 +02:00
Sebastiaan van Stijn
62af652a5a
Jenkinsfile: inline experimental, power, z steps, and split Unit test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1e8ede514e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:10 +02:00
Sebastiaan van Stijn
63966dec02
Jenkinsfile: inline janky steps, and move validate to separate stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f411be2072)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:08 +02:00
Sebastiaan van Stijn
997037964e
Jenkinsfile: remove .git mount in stages that don't use it
The .git mount is only needed for the DCO check, and for building
the binaries if `DOCKER_GITCOMMIT` is not set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 47ac8a97de)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:06 +02:00
Sebastiaan van Stijn
7a82829520
Jenkinsfile: consistent indentation and order of env-vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f814e04652)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:04 +02:00
Sebastiaan van Stijn
678121ef05
Jenkinsfile: remove unused GIT_SHA1 env-var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0634816c0c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:57:01 +02:00
Sebastiaan van Stijn
970fb3c1df
Jenkinsfile: move building e2e image to "unit-vendor" stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit efacee1cdd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:59 +02:00
Sebastiaan van Stijn
04ca2e6b92
Jenkinsfile: extract DOCKER_GRAPHDRIVER as environment variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 781e79d1fa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:57 +02:00
Sebastiaan van Stijn
8dbb761fad
Jenkinsfile: use overlay2 for Power and s390x as well
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c75d7e0e22)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:55 +02:00
Sebastiaan van Stijn
0a5ea9d310
Jenkinsfile: run check-config.sh to print system configuration
Having this information can help debugging issues in CI (which could
be caused by missing/incorrect configuration of the machines).

We ping to a fixed version of the script, because this script is ran
directly on the host, and we don't want pull-requests modifying this
script to have direct access to the machines.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a2ad56dfad)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:53 +02:00
Sebastiaan van Stijn
c94dca16fa
Jenkinsfile: remove ip_vs modprobe for unit/vendor stage
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6523ced950)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:50 +02:00
Sebastiaan van Stijn
cbbff33086
Jenkinsfile: standardize cointainer names and fix s390x cleanup
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit f2e09afff4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-19 18:56:48 +02:00