Compare commits

..

No commits in common. "main" and "v20250206061445" have entirely different histories.

2 changed files with 38 additions and 12 deletions

View File

@ -1,12 +1,12 @@
env:
IMAGE_TAG: 41
IMAGE_TAG: 40
GITHUB_SERVER_URL: "https://github.com"
CIRRUS_SHELL: bash
IMAGE_SUFFIX: "c20250131t121915z-f41f40d13"
IMAGE_SUFFIX: "c20240821t171500z-f40f39d13"
FEDORA_AARCH64_AMI: "fedora-podman-aws-arm64-${IMAGE_SUFFIX}"
FEDORA_AMI: "fedora-aws-${IMAGE_SUFFIX}"
PCURL_RETRY: "curl --retry 5 --retry-delay 8 --retry-all-errors -L"
PACKAGE_LIST: "procps-ng openssh-server net-tools iproute dhcp-client crun-wasm wasmedge-rt qemu-user-static subscription-manager gvisor-tap-vsock-gvforwarder cifs-utils nfs-utils-coreos ansible-core iptables-nft"
PACKAGE_LIST: "procps-ng openssh-server net-tools iproute dhcp-client crun-wasm wasmedge-rt qemu-user-static subscription-manager gvisor-tap-vsock-gvforwarder cifs-utils nfs-utils-coreos ansible-core"
VER_PFX: "5.0"
aws_credentials: ENCRYPTED[d8df25d9f680ea7b046e9883851355574913eb4bf7b89acc4efe8e039a4fc0112ade4469ff98d6a9a22285d495034905]
@ -75,7 +75,7 @@ build_task:
podman start fedora-update
# podman exec -it fedora-update sh -c 'dnf -y install dnf-plugins-core; dnf -y copr enable rhcontainerbot/podman-next'
podman exec fedora-update sh -c 'rpm -qa --qf "%-30{name} %{version}-%{release}\n" | sort' > pre-update
podman exec fedora-update sh -c "dnf update -y && dnf -y install podman podman-docker $PACKAGE_LIST && dnf clean all && rm -rf /var/cache/yum"
podman exec -it fedora-update sh -c "dnf update -y && dnf -y install podman podman-docker $PACKAGE_LIST && dnf clean all && rm -rf /var/cache/yum"
podman exec fedora-update sh -c 'rpm -qa --qf "%-30{name} %{version}-%{release}\n" | sort' > post-update
diff -u pre-update post-update > delta || delta=1
@ -116,6 +116,7 @@ release_task:
only_if: $CIRRUS_BRANCH == 'main' && $CIRRUS_PR == "" && $CIRRUS_TAG == ""
execution_lock: podman-wsl-fedora-5-release
env:
GH_TOKEN: ENCRYPTED[8297ab7a306113a13517c34bfa60293c25b6f07ea8e0518eb0dbf13f6a4e94705fb875e6957558076d8ffcc73821f464]
QUAY_PODMAN_USERNAME: ENCRYPTED[61302bbc5de3e9a51dde72807c2d6c4e5834aab5f9e00db61c1e8b43a83d08e4dfdc61ca81eb6af0d60739f378be647a]
QUAY_PODMAN_PASSWORD: ENCRYPTED[55580283bbbf7d9b5fca46bef2deef30b10d9191981965addc2ab5d48ef3515740e464a82caf416d2fba4aa47233d855]
IMAGE_REGISTRY: "quay.io"
@ -123,7 +124,7 @@ release_task:
IMAGE_NAME: "machine-os-wsl"
IMAGE_TAG_LATEST: "5.4"
IMAGE_TAG_NEXT: "5.5"
IMAGE_TAG_DEV: "5.6"
IMAGE_TAG_DEV: "5.5"
depends_on:
- build
ec2_instance:
@ -132,7 +133,9 @@ release_task:
region: us-east-1
architecture: amd64
setup_script: |
dnf install -y git
dnf install 'dnf-command(config-manager)'
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf install -y gh git
release_script: |
set +o verbose
HTTP_PREFIX="$GITHUB_SERVER_URL/$CIRRUS_REPO_FULL_NAME/releases/latest/download"
@ -162,6 +165,26 @@ release_task:
test -z "$FETCH1" || $PCURL_RETRY -LO "$FETCH1"
test -z "$FETCH2" || $PCURL_RETRY -LO "$FETCH2"
# temporary 5.1, 5.2 and 5.3 clone until divergance occurs
for arch in amd64 arm64; do
cp $VER_PFX-rootfs-$arch.tar.zst 5.1-rootfs-$arch.tar.zst
cp $VER_PFX-rootfs-$arch.tar.zst 5.2-rootfs-$arch.tar.zst
cp $VER_PFX-rootfs-$arch.tar.zst 5.3-rootfs-$arch.tar.zst
cp $VER_PFX-latest-$arch 5.1-latest-$arch
cp $VER_PFX-latest-$arch 5.2-latest-$arch
cp $VER_PFX-latest-$arch 5.3-latest-$arch
done
STAMP=`date -u '+%Y%m%d%H%M%S'`
NEXT_RELEASE="v${STAMP}"
echo $NEXT_RELEASE > version
echo "Releasing $NEXT_RELEASE"
sha256sum *rootfs*.tar.zst > shasums
set -o verbose
gh release create $NEXT_RELEASE -t $NEXT_RELEASE -d -F changes
gh release upload $NEXT_RELEASE *latest* *rootfs*.tar.zst shasums version
gh release edit $NEXT_RELEASE --draft=false
# Package the WSL zst compressed disks as an OCI artifact
FULL_IMAGE_NAME=$IMAGE_REGISTRY/$IMAGE_REPO/$IMAGE_NAME:$IMAGE_TAG_LATEST
FULL_IMAGE_NAME_NEXT=$IMAGE_REGISTRY/$IMAGE_REPO/$IMAGE_NAME:$IMAGE_TAG_NEXT

View File

@ -1,7 +1,3 @@
# Deprecated
This repository is deprecated. The WSL podman machine image builds have been merged into our main [podman-machine-os](https://github.com/containers/podman-machine-os) repository starting with v5.6 images. Please report new issues there instead.
[![Cirrus CI - Default Branch Build Status](https://img.shields.io/cirrus/github/containers/podman-machine-wsl-os)](https://cirrus-ci.com/github/containers/podman-machine-wsl-os)
# Podman Machine WSL OS
@ -13,6 +9,7 @@ The image is distributed as a [zstd compressed](https://facebook.github.io/zstd/
The CI is triggered every 3 hours **and** at every push to the main branch.
At every update of the disk image:
- a new [GitHub release](https://github.com/containers/podman-machine-wsl-os/releases) is created and the new zstd-compressed disk images is added.
- a new OCI artifact is pushed to [quay.io/podman/machine-os-wsl](https://quay.io/repository/podman/machine-os-wsl?tab=tags)
## Build Process Details
@ -28,19 +25,25 @@ After that, if the are no changes compared to the last time the CI has been exec
- Remove the content of the file `/etc/resolv.conf` in `rootfs.tar` and compress it using zstd
If at least one of the 2 images (`amd64` and `arm64`) has been updated then the CI publishes a new release:
- Creates [a new GitHub release](https://github.com/containers/podman-machine-wsl-os/releases), using the build timestamp as version, and uploads the
- Creates [a new GitHub release](https://github.com/containers/podman-machine-wsl-os/releases), using the build timestamp as version, and uploads the
- Push the OCI artifact to [quay.io/podman/machine-os-wsl](https://quay.io/repository/podman/machine-os-wsl?tab=tags) using the next version of Podman as the image tag
That's done for both `amd64` and `arm64` architectures. And v5.1 and v5.2 zstd files are identical.
## The Delay with Podman Releases
WSL disk images build is disconnected to Podman release process.
WSL disk images build is disconnected to Podman release process.
The WSL disk image build is triggered every 3 hours and it looks for a new version of Podman. But it looks for an update on Fedora stable and that's usually updated a few days after a Podman release.
For example [Podman v5.2.2 has been released on the 2024-08-21](https://github.com/containers/podman/releases/tag/v5.2.2) but [has been included in Fedora 40 stable](https://bodhi.fedoraproject.org/updates/FEDORA-2024-435a743cf7) one week after that, and the updated WSL disk image [has been released on the 2024-08-27](https://github.com/containers/podman-machine-wsl-os/releases/tag/v20240827181401).
## Always publish current and old version of the disk on GitHub
Podman `v5.y.z` downloads `v5.y` of the WSL OS image from the **latest** release on this GitHub repository. For example Podman `v5.1.2` downloads the file `5.1-rootfs-amd64.tar.zst` (or the arm64 equivalent) from the latest release.
That means that every GitHub release needs to include WSL disk images for old and new versions of Podman 5.
## When a new dev version of Podman is bumped on main branch
Before bumping the version of Podman in c/podman, the corresponding WSL image should be pushed to quay.io: