Skip to content

Commit

Permalink
Use skopeo sync to export/import images, use ubuntu-24.04 runners
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <medgar@redhat.com>
  • Loading branch information
MikeEdgar committed Dec 2, 2024
1 parent 30bf7ca commit 4a6abb0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 40 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
build-images:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
services:
registry:
image: registry:2
Expand Down Expand Up @@ -169,31 +169,24 @@ jobs:
- name: Save [UI, API, Operator, Operator-Bundle, Operator-Catalog] Images To Files
run: |
docker pull localhost:5000/streamshub/console-ui:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-api:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-operator:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-operator-bundle:${{ env.PROJECT_VERSION }}
docker pull localhost:5000/streamshub/console-operator-catalog:${{ env.PROJECT_VERSION }}
docker save -o console-ui-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-ui:${{ env.PROJECT_VERSION }}
docker save -o console-api-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-api:${{ env.PROJECT_VERSION }}
docker save -o console-operator-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-operator:${{ env.PROJECT_VERSION }}
docker save -o console-operator-bundle-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-operator-bundle:${{ env.PROJECT_VERSION }}
docker save -o console-operator-catalog-${{ env.PROJECT_VERSION }}.tar localhost:5000/streamshub/console-operator-catalog:${{ env.PROJECT_VERSION }}
mkdir streamshub-images
for img in console-ui console-api console-operator console-operator-bundle console-operator-catalog ; do
skopeo sync --all --scoped --src docker --src-tls-verify=false --dest dir \
localhost:5000/streamshub/${img}:${{ env.PROJECT_VERSION }} \
$(pwd)/streamshub-images
done
tar -czf streamshub-images.tgz -C streamshub-images .
- name: Archive [UI, API, Operator-Bundle, Operator, Operator-Catalog] Image Files
uses: actions/upload-artifact@v4
with:
name: streamshub-images
path: |
console-ui-${{ env.PROJECT_VERSION }}.tar
console-api-${{ env.PROJECT_VERSION }}.tar
console-operator-${{ env.PROJECT_VERSION }}.tar
console-operator-bundle-${{ env.PROJECT_VERSION }}.tar
console-operator-catalog-${{ env.PROJECT_VERSION }}.tar
path: streamshub-images.tgz

test-storybook:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
34 changes: 13 additions & 21 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ env:

jobs:
Test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download Images
uses: actions/download-artifact@v4
with:
name: streamshub-images

- name: Start minikube
id: minikube
uses: medyagh/setup-minikube@latest
Expand All @@ -36,12 +41,6 @@ jobs:
echo "CLUSTER_DOMAIN=$(minikube ip).nip.io" >> $GITHUB_ENV
echo "CONSOLE_URL=https://example-console.$(minikube ip).nip.io" >> $GITHUB_ENV
- name: Download Images
uses: actions/download-artifact@v4
with:
name: streamshub-images
path: streamshub-images

- name: Prepare minikube
run: |
set -x
Expand All @@ -50,12 +49,13 @@ jobs:
socat TCP-LISTEN:5000,reuseaddr,fork TCP:$(minikube ip):5000 &
SOCAT_PID=${!}
mkdir streamshub-images
tar -xzf streamshub-images.tgz -C streamshub-images
# Load images
for img in console-ui console-api console-operator console-operator-bundle console-operator-catalog ; do
skopeo copy --dest-tls-verify=false \
docker-archive:streamshub-images/${img}-${{ env.PROJECT_VERSION }}.tar \
docker://localhost:5000/streamshub/${img}:${{ env.PROJECT_VERSION }}
done
skopeo sync --all --scoped --src dir --dest docker --dest-tls-verify=false \
streamshub-images/localhost:5000/streamshub \
localhost:5000/streamshub
kill ${SOCAT_PID}
Expand Down Expand Up @@ -99,15 +99,7 @@ jobs:
sourceNamespace: olm' | kubectl apply -n operators -f -
# Install Console Operator
yq ea '.spec.sourceNamespace = "olm", .spec.config = {
"env": [{
"name": "CONSOLE_DEPLOYMENT_DEFAULT_API_IMAGE",
"value": "localhost:5000/streamshub/console-api:${{ env.PROJECT_VERSION }}"
}, {
"name": "CONSOLE_DEPLOYMENT_DEFAULT_UI_IMAGE",
"value": "localhost:5000/streamshub/console-ui:${{ env.PROJECT_VERSION }}"
}]
}' ./install/operator-olm/020-Subscription-console-operator.yaml \
yq ea '.spec.sourceNamespace = "olm"' ./install/operator-olm/020-Subscription-console-operator.yaml \
| kubectl apply -n operators -f -
wait_operator() {
Expand Down

0 comments on commit 4a6abb0

Please sign in to comment.