Tailor CI for ARM, skip legacy integration test.#39595
Tailor CI for ARM, skip legacy integration test.#39595michael2012z wants to merge 2 commits intomoby:masterfrom
Conversation
a6cc778 to
3d1c4a4
Compare
|
Could anybody give some comments? Thanks. |
psftw
left a comment
There was a problem hiding this comment.
A couple of nitpicks in the Jenkinsfile, but overall looks good to me. Note: we are turning on the Jenkinsfile integration today, which will have two key implications for this PR: 1. A new GitHub PR status with context continuous-integration/jenkins/pr-merge will replace the handful of existing statuses (which will continue for a short time as we transition). 2. In order for your changes to the Jenkinsfile to be reflected in your PR build job, you will need to have Collaborator status in the moby/moby repository (if not already) otherwise Jenkins will ignore your Jenkinsfile changes (for security).
Jenkinsfile
Outdated
There was a problem hiding this comment.
we've recently removed usage of withGithubStatus, so it can be dropped here as well.
Jenkinsfile
Outdated
There was a problem hiding this comment.
suggest aarch64 && packet to run on our powerful packet hosts and avoid accidentally running some tasks on ec2 instances due to ambiguity in label expression. Later if we parallelize the ARM tasks, we could swap this out for aarch64 && ubuntu-1804 && overlay2 to run on many a1.xlarge ec2 agents at once if that improves performance overall.
|
Thank you for reviewing the PR and sharing the update of CI.
|
3d1c4a4 to
dbe6fe4
Compare
|
Hi, is there any more comments on this? |
|
Seems reasonable to me, but I haven't been involved in Docker's CI setup much (so I'd defer to @psftw's opinion here). 👍 |
|
I think this also has some overlap with #39628? |
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
dbe6fe4 to
283bfc7
Compare
|
LGTM 👍 |
|
Hi, @thaJeztah , @psftw , |
thaJeztah
left a comment
There was a problem hiding this comment.
Thanks! I left some comments inline; I created a branch with those suggested changes, and will open a PR (that way Jenkins should also actually try to run the new version, so we can verify if it works 👍)
| beforeAgent true | ||
| expression { params.aarch64 } | ||
| } | ||
| agent { label 'aarch64 && packet' } |
There was a problem hiding this comment.
@psftw wondering if we need the packet label for filtering, or if just aarch64 would be enough
| } | ||
| agent { label 'aarch64 && packet' } | ||
| steps { | ||
| sh ''' |
There was a problem hiding this comment.
I made some enhancements in #39656 and #39661; we can probably make the same/similar changes here;
- use the
GIT_COMMITenvironment variable (instead of manually getting it throughgit rev-parse) - split the
buildstep to a separate stage - add a stage to print
docker version,docker info, and run thecontrib/check-config.shscript (helps when debugging issues as it would provide details about the machine that CI is running on) - inline the steps that are executed (instead of using
hack/ci/arm- I'm trying to get rid of thehack/ci/*scripts because those can now be described in the Jenkinsfiles itself (which makes it more transparent)
| docker rm -vf docker-pr-aarch64$BUILD_NUMBER || true | ||
|
|
||
| echo "Chowning /workspace to jenkins user" | ||
| docker run --rm -v "$WORKSPACE:/workspace" aarch64/busybox chown -R "$(id -u):$(id -g)" /workspace |
There was a problem hiding this comment.
the busybox image is multi-arch, so could be just busybox now (also see my other comment)
| -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ | ||
| --name docker-pr-aarch64$BUILD_NUMBER \ | ||
| -e DOCKER_GRAPHDRIVER=vfs \ | ||
| -e DOCKER_EXECDRIVER=native \ |
There was a problem hiding this comment.
This environment variable is no longer needed and can be removed
There was a problem hiding this comment.
Yes.
A lot of improvements had been made on master branch since I wrote the script in the new stage "aarch64".
Thanks for correcting them in the new PR.
| sh ''' | ||
| GITCOMMIT=$(git rev-parse --short HEAD) | ||
|
|
||
| docker build --rm --force-rm --build-arg APT_MIRROR=cdn-fastly.deb.debian.org -t docker-aarch64:$GITCOMMIT -f Dockerfile . |
There was a problem hiding this comment.
given that we don't run multiple architectures on a single machine, there's no chance on collision with a container from another test, so the -arch64 suffix can be removed
| docker run --rm -t --privileged \ | ||
| -v "$WORKSPACE/bundles:/go/src/github.com/docker/docker/bundles" \ | ||
| --name docker-pr-aarch64$BUILD_NUMBER \ | ||
| -e DOCKER_GRAPHDRIVER=vfs \ |
There was a problem hiding this comment.
vfs is probably ok for now (we can check what those machines support, and switch to (e.g.) overlay2 if supported
| } | ||
| } | ||
| } | ||
| stage('aarch64') { |
There was a problem hiding this comment.
Looks like this stage is not in the right place (it's currently at the same level as the top-level Build stage, which means it won't be run in parallel with the other tests, but after all the other tests are completed)
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Looks like there's too many closing brackets here
|
carrying in #39678 |
|
@thaJeztah Thank you for improving this PR and carrying it in #39678 so the modification can be verified. |
|
You're welcome! I was reviewing, and thought; might as well just make the changes (as it would be difficult to write them all down, haha); CI is running on that PR, and so far, it looks good! (even just enabled the legacy integration-cli tests to see how long they would take on those workers. |
Signed-off-by: Michael Zhao michael.zhao@arm.com
- What I did
This PR is trying to make a minimal test set (without legacy integration test cases) for ARM.
Introduce a new environment variable SKIP_LEGACY_INTEGRATION_TEST to control whether legacy integration test cases are ignored or not.
- How I did it
- How to verify it
Run "make test-integration" on an ARM machine.
- Description for the changelog
See the discussion in issue: #39479
Backgroud: CI on arm (32 and 64 bit) architecture took too long time to finish. So the CI for it was stopped. Now I am trying to bring it back, and try to set a minimal set in it to save time.
- A picture of a cute animal (not mandatory but encouraged)
