-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jobs/build-podman-os.Jenkinsfile: get podman version from main #1040
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ def generate_diskvar_json(shortcommit, arch, artifacts, staging_repo, repo) { | |
"container-tag": "${arch}-${shortcommit}", | ||
"extra-kargs-string": "", | ||
"image-type": "${artifact["platform"]}", | ||
"container-imgref": "ostree-remote-registry:fedora:${repo}:5.1", | ||
"container-imgref": "ostree-remote-registry:fedora:${repo}:${version}", | ||
"metal-image-size": "3072", | ||
"cloud-image-size": "10240", | ||
"deploy-via-container": "true", | ||
|
@@ -71,10 +71,18 @@ properties([ | |
description: 'Space-separated list of target architectures', | ||
defaultValue: "x86_64 aarch64", | ||
trim: true), | ||
string(name: 'PODMAN_GIT_URL', | ||
description: 'Podman git repo', | ||
defaultValue: "https://github.com/containers/podman", | ||
trim: true), | ||
string(name: 'PODMAN_MACHINE_GIT_URL', | ||
description: 'Override the coreos-assembler git repo to use', | ||
defaultValue: "https://github.com/containers/podman-machine-os", | ||
trim: true), | ||
string(name: 'PODMAN_VERSION', | ||
description: 'Podman version', | ||
defaultValue: "main", | ||
trim: true), | ||
string(name: 'PODMAN_MACHINE_GIT_REF', | ||
description: 'Override the coreos-assembler git ref to use', | ||
defaultValue: "main", | ||
|
@@ -123,6 +131,22 @@ def ncpus = ((cosa_memory_request_mb - 512) / 1536) as Integer | |
|
||
|
||
node { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is already a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just me being a groovy noob :| . btw, there's another one below as well. Should I look at reusing either one or do you have a preference? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm weird. yeah, just re-use the one below There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now we have two There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, thinking about this further, I should grab podman version and upstream commit from the podman-next copr rpm that's fetched in the build process https://github.com/containers/podman-machine-os/blob/main/podman-image-daily/Containerfile#L31 |
||
change = checkout( | ||
changelog: true, | ||
poll: false, | ||
scm: [ | ||
$class: 'GitSCM', | ||
branches: [[name: "origin/main"]], | ||
userRemoteConfigs: [[url: params.PODMAN_GIT_URL]], | ||
extensions: [[$class: 'CloneOption', | ||
noTags: true, | ||
reference: '', | ||
shallow: true]] | ||
] | ||
) | ||
|
||
def version = shwrapCapture("grep '^const RawVersion' version/rawversion/version.go | cut -d\" -f2") | ||
|
||
change = checkout( | ||
changelog: true, | ||
poll: false, | ||
|
@@ -254,7 +278,7 @@ lock(resource: "build-podman-os") { | |
} | ||
withCredentials([file(credentialsId: 'podman-push-registry-secret', variable: 'REGISTRY_SECRET')]) { | ||
stage("Push Manifest") { | ||
def manifest = "${params.CONTAINER_REGISTRY_STAGING_REPO}:5.1-${shortcommit}" | ||
def manifest = "${params.CONTAINER_REGISTRY_STAGING_REPO}:${version}-${shortcommit}" | ||
def cmds = "/usr/bin/buildah manifest create ${manifest}" | ||
parallel archinfo.keySet().collectEntries{arch -> [arch, { | ||
def image = "docker://${params.CONTAINER_REGISTRY_STAGING_REPO}:${arch}-${shortcommit}" | ||
|
@@ -286,8 +310,8 @@ lock(resource: "build-podman-os") { | |
// Release the manifest and container images | ||
shwrap(""" | ||
skopeo copy --all --authfile \$REGISTRY_SECRET \ | ||
docker://${params.CONTAINER_REGISTRY_STAGING_REPO}:5.1-${shortcommit} \ | ||
docker://${params.CONTAINER_REGISTRY_REPO}:5.1 | ||
docker://${params.CONTAINER_REGISTRY_STAGING_REPO}:${version}-${shortcommit} \ | ||
docker://${params.CONTAINER_REGISTRY_REPO}:${version} | ||
""") | ||
} | ||
} | ||
|
@@ -298,7 +322,7 @@ lock(resource: "build-podman-os") { | |
shwrap(""" | ||
export STORAGE_DRIVER=vfs # https://github.com/coreos/fedora-coreos-pipeline/issues/723#issuecomment-1297668507 | ||
skopeo delete --authfile=\$REGISTRY_SECRET \ | ||
docker://${params.CONTAINER_REGISTRY_STAGING_REPO}:5.1-${shortcommit} | ||
docker://${params.CONTAINER_REGISTRY_STAGING_REPO}:${version}-${shortcommit} | ||
""") | ||
} | ||
parallel archinfo.keySet().collectEntries{arch -> [arch, { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably going to want to pass in version as an argument to this function?