Skip to content

Install the podman-mac-helper agent #53

Install the podman-mac-helper agent

Install the podman-mac-helper agent #53

Workflow file for this run

name: CI Build
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
os: [macos-13, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew on Linux
if: matrix.os == 'ubuntu-latest'
uses: Homebrew/actions/setup-homebrew@master
- if: matrix.os == 'ubuntu-latest'
name: Remove old executable of crun and stop docker service
run: |
# Remove the old crun executable to let brew to install a newer one ...
sudo apt-get remove crun
sudo systemctl stop docker.socket
sudo systemctl stop docker
- name: Install podman v5 using homebrew
run: |
# What brew will install: https://ghcr.io/v2/homebrew/core/podman/manifests/5.3.2_1
brew install podman
- name: Install and launch podman service
if: matrix.os == 'ubuntu-latest'
run: brew services start podman
- name: Create linux's vm on macos
if: matrix.os == 'macos-13'
run: |
podman machine init
# By default, the podman-mac-helper agent is not started and we could not use the following sock path: /var/run/docker.sock
# which is a symbolic link pointing to the VM's internal path: /var/folders/28/g86pgjxj0wl1nkd_85c2krjw0000gn/T/podman/podman-machine-default.sock
# This is why it is needed to install it using the following help (enabled by default using podman desktop)
sudo podman-mac-helper install
podman machine start --log-level debug
- name: Expose the podman API and podman.socket
if: matrix.os == 'ubuntu-latest'
run: |
podman system service --time=0 &
systemctl --user enable --now podman.socket
- name: Podman service status on Linux
if: matrix.os == 'ubuntu-latest'
run: |
systemctl status podman &
systemctl --user status podman.socket &
- name: Podman information
run: |
echo "Podman version: " $(podman info -f json | jq -r .version.Version)
echo "Podman rootless: " $(podman info -f json | jq -r .host.security.rootless)
echo "Podman sock path: " $(podman info -f json | jq -r .host.remoteSocket.path)
- uses: actions/checkout@v4
with:
repository: ch007m/fork-kindcontainer.git
ref: enable-featuregate
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build kindcontainer testcontainer project
id: build-kindcontainer
run: |
export SNAPSHOT_VERSION=$(gradle publishToMavenLocal --console=plain | grep 'Publishing to maven local' | awk -F':' '{print $NF}')
echo "SNAPSHOT_VERSION=$SNAPSHOT_VERSION" >> "$GITHUB_OUTPUT"
- run: |
echo Snapshot version of kind container: ${{ steps.build-kindcontainer.outputs.SNAPSHOT_VERSION }}
- uses: actions/checkout@v4
with:
repository: quarkiverse/quarkus-argocd.git
ref: main
- name: Build quarkus-argocd as not yet released with Maven
run: |
mvn -B clean install -Dno-format -DskipTests
- uses: actions/checkout@v4
- name: Build this project
run: |
mvn -B clean install \
-Dno-format \
-DskipTests \
-Dquarkus-argocd.version="999-SNAPSHOT" \
-Dtestcontainer.version=${{ steps.build-kindcontainer.outputs.SNAPSHOT_VERSION }}
- name: Set DOCKER_HOST for linux
if: matrix.os == 'ubuntu-latest'
run: |
echo "Podman sock path: unix://${XDG_RUNTIME_DIR}/podman/podman.sock"
echo "PODMAN_SOCK_PATH=unix://${XDG_RUNTIME_DIR}/podman/podman.sock" >> $GITHUB_ENV
- name: Set DOCKER_HOST for macos
if: matrix.os == 'macos-13'
run: |
echo "Podman sock path: $(podman info -f json | jq -r .host.remoteSocket.path)"
echo "PODMAN_SOCK_PATH=$(podman info -f json | jq -r .host.remoteSocket.path)" >> $GITHUB_ENV
- name: Perform CI test
env:
PODMAN_SOCK_PATH: ${{ env.PODMAN_SOCK_PATH }}
run: |
export TESTCONTAINERS_RYUK_DISABLED=true
export DOCKER_HOST=$PODMAN_SOCK_PATH
echo "DOCKER_HOST is: $PODMAN_SOCK_PATH"
mvn -B test -Dtest=ArgoCDDeployTest \
-Dquarkus-argocd.version="999-SNAPSHOT" \
-Dtestcontainer.version=${{ steps.build-kindcontainer.outputs.SNAPSHOT_VERSION }}