Skip to content
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

.github/workflows: Publish the Arch Linux image at quay.io/toolbx/... #1308

Merged

Conversation

debarshiray
Copy link
Member

Until now, the Arch Linux image was being published at quay.io/toolbx-images/archlinux-toolbox:latest. This renames the image to arch-toolbox [1] to match the os-release(5) ID on Arch, and changes the location to quay.io/toolbx/arch-toolbox:latest.

Build and push when there are changes in the 'images/arch' directory or in the GitHub workflow itself, as well as every other week (7th and 21st days of a month to be precise).

[1] Commit 2568528
#861

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 8, 2023
Until now, the Arch Linux image was being published at
quay.io/toolbx-images/archlinux-toolbox:latest.  This renames the image
to arch-toolbox [1] to match the os-release(5) ID on Arch, and changes
the location to quay.io/toolbx/arch-toolbox:latest.

Build and push when there are changes in the 'images/arch' directory
or in the GitHub workflow itself, as well as every other week (7th and
21st days of a month to be precise).

[1] Commit 2568528
    containers#861

containers#1308
@debarshiray debarshiray force-pushed the wip/rishi/arch-publish-images branch from 4aac4b0 to f13d2a5 Compare June 8, 2023 17:57
@debarshiray
Copy link
Member Author

debarshiray commented Jun 8, 2023

I noticed that we are not using permissions: read-all like github.com/toolbx-images. Does that make a difference? It wasn't obvious to me from reading the documentation and I don't want to casually fiddle with the permissions and break things.

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 8, 2023
This reflects the value of the 'maintainer' LABELs of the images.

containers#1308
@debarshiray
Copy link
Member Author

/cc @Foxboron @travier

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://softwarefactory-project.io/zuul/t/local/buildset/1237c2c7d0584cb289b7a65cece0e483

✔️ unit-test SUCCESS in 10m 48s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 5m 39s
✔️ unit-test-restricted SUCCESS in 8m 26s
✔️ system-test-fedora-rawhide SUCCESS in 24m 54s
✔️ system-test-fedora-38 SUCCESS in 22m 59s
✔️ system-test-fedora-37 SUCCESS in 23m 25s
✔️ system-test-fedora-36 SUCCESS in 23m 41s

.github/CODEOWNERS Outdated Show resolved Hide resolved
@travier
Copy link
Member

travier commented Jun 9, 2023

Note that this is missing the PR workflow, like the ubuntu one, which lets us validate change to the images on PRs while making sure that the images are not pushed.

@travier
Copy link
Member

travier commented Jun 9, 2023

@debarshiray
Copy link
Member Author

Note that this is missing the PR workflow, like the ubuntu one, which lets us validate change to the images on PRs while making sure that the images are not pushed.

Yes, I was trying to limit my copy-paste cargo cult to the minimum. :)

For example, I was a bit suspicious that the actual cron schedule is every Monday at 00:00, not every other week as in the original commit message from #483 I had to re-read the crontab manual to be sure. Did I get that right?

Did you see my question about permissions: read-all above?

Anyway, let me try to add a PR workflow.

@travier
Copy link
Member

travier commented Jun 9, 2023

About read-all, I'm not sure how that works exactly 😕

For the cron syntax, you can use https://crontab.guru/ (linked in https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) to validate your config

@travier
Copy link
Member

travier commented Jun 9, 2023

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

I had added it as a precaution. Not sure how much that matters here.

@debarshiray
Copy link
Member Author

About read-all, I'm not sure how that works exactly

Okay. I will leave it alone since it seems to be working as is.

For the cron syntax, you can use https://crontab.guru/ (linked in https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) to validate your config

Thanks, https://crontab.guru/ is amazing. I think my understanding of the schedule above was correct.

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
Until now, the Arch Linux image was being published at
quay.io/toolbx-images/archlinux-toolbox:latest.  This renames the image
to arch-toolbox [1] to match the os-release(5) ID on Arch, and changes
the location to quay.io/toolbx/arch-toolbox:latest.

Build and push when there are changes in the 'images/arch' directory
or in the GitHub workflow itself, as well as at 00:00 every Monday.

[1] Commit 2568528
    containers#861

containers#1308
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
... when there are changes in the 'images/arch' directory or in the
GitHub workflow itself.

containers#1308
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
This reflects the value of the 'maintainer' LABELs of the images.

containers#1308
@debarshiray debarshiray force-pushed the wip/rishi/arch-publish-images branch from 448ad63 to 2b114a2 Compare June 9, 2023 10:34
@debarshiray
Copy link
Member Author

Note that this is missing the PR workflow, like the ubuntu one, which lets us validate change to the images on PRs while making sure that the images are not pushed.

Anyway, let me try to add a PR workflow.

Done.

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
... when there are changes in the 'images/arch' directory or in the
GitHub workflow itself.

containers#1308
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
This reflects the value of the 'maintainer' LABELs of the images.

containers#1308
@debarshiray debarshiray force-pushed the wip/rishi/arch-publish-images branch from 2b114a2 to 28dc704 Compare June 9, 2023 10:41
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://softwarefactory-project.io/zuul/t/local/buildset/a517a7ed8dc44d429eddc20b85b3f48a

✔️ unit-test SUCCESS in 8m 23s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 2m 48s
✔️ unit-test-restricted SUCCESS in 8m 14s
✔️ system-test-fedora-rawhide SUCCESS in 20m 09s
✔️ system-test-fedora-38 SUCCESS in 20m 06s
✔️ system-test-fedora-37 SUCCESS in 19m 32s
✔️ system-test-fedora-36 SUCCESS in 19m 20s

@debarshiray
Copy link
Member Author

debarshiray commented Jun 9, 2023

At least the workflow for PRs seems to keep failing with:

Invalid workflow file: .github/workflows/arch-images-pr.yaml#L17
The workflow is not valid. .github/workflows/arch-images-pr.yaml (Line: 17, Col: 11): Unrecognized named-value: 'env'. Located at position 1 within expression: env.distro_pretty

... and I am getting lost in the documentation about whether this is meant to be a valid syntax or not:

name: Build the ${{ env.distro }}-toolbox image for PRs

At this point, I want to ditch the variables and keep it simple, and leave it to somebody more knowledgeable to parametrize things.

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
Until now, the Arch Linux image was being published at
quay.io/toolbx-images/archlinux-toolbox:latest.  This renames the image
to arch-toolbox [1] to match the os-release(5) ID on Arch, and changes
the location to quay.io/toolbx/arch-toolbox:latest.

Build and push when there are changes in the 'images/arch' directory
or in the GitHub workflow itself, as well as at 00:00 every Monday.

[1] Commit 2568528
    containers#861

containers#1308
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
... when there are changes in the 'images/arch' directory or in the
GitHub workflow itself.

containers#1308
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 9, 2023
This reflects the value of the 'maintainer' LABELs of the images.

containers#1308
@debarshiray debarshiray force-pushed the wip/rishi/arch-publish-images branch from 28dc704 to c23ec5b Compare June 9, 2023 11:20
Until now, the Arch Linux image was being published at
quay.io/toolbx-images/archlinux-toolbox:latest.  This renames the image
to arch-toolbox [1] to match the os-release(5) ID on Arch, and changes
the location to quay.io/toolbx/arch-toolbox:latest.

Build and push when there are changes in the 'images/arch' directory
or in the GitHub workflow itself, as well as at 00:00 every Monday.

[1] Commit 2568528
    containers#861

containers#1308
... when there are changes in the 'images/arch' directory or in the
GitHub workflow itself.

containers#1308
This reflects the value of the 'maintainer' LABELs of the images.

containers#1308
@debarshiray debarshiray force-pushed the wip/rishi/arch-publish-images branch from c23ec5b to 28913fa Compare June 9, 2023 11:34
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://softwarefactory-project.io/zuul/t/local/buildset/7de9a37275504c73ab4e4b3d97503f71

✔️ unit-test SUCCESS in 9m 07s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 2m 58s
✔️ unit-test-restricted SUCCESS in 8m 15s
✔️ system-test-fedora-rawhide SUCCESS in 20m 39s
✔️ system-test-fedora-38 SUCCESS in 20m 27s
✔️ system-test-fedora-37 SUCCESS in 19m 45s
✔️ system-test-fedora-36 SUCCESS in 19m 52s

@debarshiray debarshiray merged commit 28913fa into containers:main Jun 9, 2023
2 checks passed
@debarshiray debarshiray deleted the wip/rishi/arch-publish-images branch June 9, 2023 12:01
@debarshiray
Copy link
Member Author

Let's hope the arch-toolbox image shows up at quay.io/toolbx/arch-toolbox:latest. Fingers crossed. :)

debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jun 12, 2023
The VERSION_ID field in os-release(5) is optional [1].  It's absent on
Arch Linux, which follows a rolling-release model and uses the BUILD_ID
field instead:
  BUILD_ID=rolling

A subsequent commit will add built-in support for Arch Linux.  Hence,
the code to get the default release from the host operating system can
no longer assume the presence of the VERSION_ID field in os-release(5).

Note that the arch-toolbox image is tagged with 'latest', in accordance
with OCI conventions, not 'rolling' [2,3], which is the os-release(5)
BUILD_ID.  Therefore, it will be wise to use 'latest' as the default
release on Arch Linux, to simplify how the default release matches with
the default image's tag.  This means that a os-release(5) field can't be
used for the default release on Arch.

[1] https://www.freedesktop.org/software/systemd/man/os-release.html

[2] Commit 2568528
    containers#861

[3] Commit a4e5861
    containers#1308

containers#1303
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants