Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Jenkins parameters belong to Jenkinsfile#222

Merged
StefanScherer merged 1 commit into
docker:masterfrom
tiborvass:jenkinsfile_params
Mar 4, 2021
Merged

Jenkins parameters belong to Jenkinsfile#222
StefanScherer merged 1 commit into
docker:masterfrom
tiborvass:jenkinsfile_params

Conversation

@tiborvass

@tiborvass tiborvass commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

For some unknown reasons there are Jenkins parameters that are neither defined in Jenkins nor in Jenkinsfile.

ARCHIVE and CONTAINERD_REF were taken from the output of:
https://ci-next.docker.com/teams-core/job/containerd-packaging/job/master/configure

while RUNC_REF was added so we can build a version different from the vendored one in containerd.

Signed-off-by: Tibor Vass [email protected]

For some unknown reasons there are Jenkins parameters that are neither defined in Jenkins nor in Jenkinsfile.

ARCHIVE and CONTAINERD_REF were taken from the output of:
https://ci-next.docker.com/teams-core/job/containerd-packaging/job/master/configure

while RUNC_REF was added so we can build a version different from the vendored one in containerd.

Signed-off-by: Tibor Vass <[email protected]>
@tiborvass
tiborvass force-pushed the jenkinsfile_params branch from cc6e798 to 8c249ea Compare March 4, 2021 01:18

@StefanScherer StefanScherer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to put this into code! 🎉
LGTM

@StefanScherer
StefanScherer merged commit 7f9a733 into docker:master Mar 4, 2021

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some unknown reasons there are Jenkins parameters that are neither defined in Jenkins nor in Jenkinsfile.

@tiborvass I think these were not in this Jenkinsfile because the Jenkinsfile in this CI is only used to build "tip".

The Jenkinsfile in our release pipeline has the options to pass what versions to build from when we do a package release; https://github.com/docker/release-packaging/blob/containerd/Jenkinsfile#L96-L104

(copying the snippet here, as it's in a private repo);

    parameters {
        string(name: 'CONTAINERD_REF',    defaultValue: 'v1.4.2',                                     description: 'containerd reference to build (usually a tagged version)')
        string(name: 'CONTAINERD_REMOTE', defaultValue: '[email protected]:containerd/containerd',       description: 'repo containing containerd source code')
        string(name: 'PACKAGING_REF',     defaultValue: 'master',                                     description: 'release-packaging reference to build')
        string(name: 'PACKAGING_REMOTE',  defaultValue: '[email protected]:docker/containerd-packaging', description: 'repo containing code to package containerd')
        string(name: 'GO_VERSION',        defaultValue: '1.13.15',                                    description: 'Go version to use to build')
    }

Looking at that, I think we need to update that Jenkinsfile to allow overriding RUNC_REF (which, so far, we didn't do)

Comment thread Jenkinsfile
[
booleanParam(name: 'ARCHIVE', defaultValue: false, description: 'Archive the build artifacts by pushing to an S3 bucket.'),
string(name: 'CONTAINERD_REF', defaultValue: 'master', description: 'Git ref of containerd repo to build.'),
string(name: 'RUNC_REF', defaultValue: '', description: 'Git ref of runc repo to build.'),

@thaJeztah thaJeztah Mar 8, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause the default "automatic selection from upstream" to be skipped?

RUNC_REF?=$(shell grep "opencontainers/runc" "$(CONTAINERD_DIR)/vendor.conf" | awk '{print $$2}')
else
# TODO adjust GOVERSION and RUNC_REF macro to take CONTAINERD_REMOTE into account
GOVERSION?=$(shell curl -fsSL "https://raw.githubusercontent.com/containerd/containerd/$(REF)/contrib/Dockerfile.test" | grep "ARG GOLANG_VERSION" | awk -F'=' '{print $$2}')
RUNC_REF?=$(shell curl -fsSL "https://raw.githubusercontent.com/containerd/containerd/$(REF)/vendor.conf" | grep "opencontainers/runc" | awk '{print $$2}')

Comment thread Jenkinsfile
[
parameters(
[
booleanParam(name: 'ARCHIVE', defaultValue: false, description: 'Archive the build artifacts by pushing to an S3 bucket.'),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere in this repository? I know we have CREATE_ARCHIVE, but that's not related to pushing to s3;

sh "make CREATE_ARCHIVE=1 ${opts.image}"

(Couldn't find a reference to this parameter in our internal release repo either)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants