Skip to content

Commit

Permalink
ci(criu): add CRIU PPA for Podman dependency (backport #770) (#771)
Browse files Browse the repository at this point in the history
* ci(criu): add CRIU PPA for Podman dependency (#770)

* ci(criu): add CRIU PPA for Podman dependency

* use ubuntu-latest runner

(cherry picked from commit 19ffc04)

# Conflicts:
#	.github/workflows/pr-ci.yaml
#	.github/workflows/push-ci.yaml

* fixup! ci(criu): add CRIU PPA for Podman dependency (#770)

* fixup! fixup! ci(criu): add CRIU PPA for Podman dependency (#770)

---------

Co-authored-by: Andrew Azores <[email protected]>
Co-authored-by: Andrew Azores <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent a9a0828 commit e5052ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
types:
- created

env:
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/Release.key"
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04"

jobs:
check-before-build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -134,18 +130,12 @@ jobs:
cd src/main/webui
yarn install && yarn yarn:frzinstall
cd -
- name: Add CRIU PPA
run: sudo add-apt-repository ppa:criu/ppa && sudo apt update
- name: Install podman v4
run: |
echo "deb $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt -y purge podman
sudo apt update && sudo apt -y install podman
- name: Emulate docker with podman
run: |
mkdir -p $HOME/.bin
cat <(echo '#!/usr/bin/env bash') <(echo 'exec podman "$@"') > $HOME/.bin/docker
chmod +x $HOME/.bin/docker
echo "PATH=$HOME/.bin:$PATH" >> "$GITHUB_ENV"
sudo apt update && sudo apt -y satisfy "podman (>= 4.0), podman-docker"
- name: Set up testcontainers for podman
run: |
echo ryuk.container.privileged=true > ~/.testcontainers.properties
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/push-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ on:
- cryostat-v[0-9]+.[0-9]+

env:
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/Release.key"
OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04"
CI_USER: cryostat+bot
CI_REGISTRY: quay.io/cryostat
CI_IMG: quay.io/cryostat/cryostat
Expand Down Expand Up @@ -55,10 +53,12 @@ jobs:
contents: read
if: ${{ github.repository_owner == 'cryostatio' }}
steps:
- name: Install qemu
- name: Add CRIU PPA
run: sudo add-apt-repository ppa:criu/ppa && sudo apt update
- name: Install podman 4 and qemu
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
sudo apt -y satisfy "podman (>= 4.0), qemu-user-static, podman-docker"
- uses: actions/checkout@v3
with:
submodules: true
Expand All @@ -83,18 +83,6 @@ jobs:
cd src/main/webui
yarn install && yarn yarn:frzinstall
cd -
- name: Install podman v4
run: |
echo "deb $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_SOURCE_URL/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list
curl -fsSL $OPENSUSE_UNOFFICIAL_LIBCONTAINERS_KEY_URL | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null
sudo apt -y purge podman
sudo apt update && sudo apt -y install podman
- name: Emulate docker with podman
run: |
mkdir -p $HOME/.bin
cat <(echo '#!/usr/bin/env bash') <(echo 'exec podman "$@"') > $HOME/.bin/docker
chmod +x $HOME/.bin/docker
echo "PATH=$HOME/.bin:$PATH" >> "$GITHUB_ENV"
- name: Set up testcontainers for podman
run: |
echo ryuk.container.privileged=true > ~/.testcontainers.properties
Expand Down

0 comments on commit e5052ed

Please sign in to comment.