From 5351c009f252cf9b72cbea8faed890d2bc419b7a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 15 Sep 2022 10:05:25 -0400 Subject: [PATCH] ci: Add a flow that tests `ostree container commit` To verify our changes there too. --- .github/workflows/rust.yml | 18 ++++++++++++++++++ ci/container-build-integration.sh | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 ci/container-build-integration.sh diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 70074085..69afc132 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -160,3 +160,21 @@ jobs: run: install ostree-ext-cli /usr/bin && rm -v ostree-ext-cli - name: Integration tests run: ./ci/priv-integration.sh + container-build: + name: "Container build" + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Checkout coreos-layering-examples + uses: actions/checkout@v3 + with: + repository: coreos/coreos-layering-examples + path: coreos-layering-examples + - name: Download + uses: actions/download-artifact@v2 + with: + name: ostree-ext-cli + - name: Integration tests + run: ./ci/container-build-integration.sh diff --git a/ci/container-build-integration.sh b/ci/container-build-integration.sh new file mode 100755 index 00000000..cc5a9b83 --- /dev/null +++ b/ci/container-build-integration.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Verify `ostree container commit` +set -euo pipefail + +image=quay.io/coreos-assembler/fcos:stable +example=coreos-layering-examples/tailscale +set -x + +mv ostree-ext-cli ${example} +cd ${example} +chmod a+x ostree-ext-cli +sed -ie 's,ostree container commit,ostree-ext-cli container commit,' Dockerfile +sed -ie 's,^\(FROM .*\),\1\nADD ostree-ext-cli /usr/bin,' Dockerfile +git diff + +docker build -t localhost/fcos-tailscale . + +docker run --rm -ti localhost/fcos-tailscale rpm -q tailscale + +echo ok container image integration