Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: CI action for generating artifacts for an airgapped release #887

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/airgap-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Create Airgapped Artifacts

on:
workflow_dispatch:
inputs:
bundle:
description: 'Path to bundle file in the repo'
required: true
type: string
default: releases/1.7/stable/kubeflow/bundle.yaml
pull_request:

env:
bundle: releases/1.7/stable/kubeflow/bundle.yaml

jobs:
self-hosted:
name: Create images
# runs-on: [self-hosted, linux, X64, jammy, two-xlarge]
runs-on: [self-hosted, linux, X64, jammy, large]
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install prerequisites
run: |
./scripts/airgapped/prerequisites.sh
# pip3 install -r scripts/airgapped/requirements.txt
# sudo apt install pigz
# sudo snap install docker
# sudo snap install yq
# sudo snap install jq

- name: Create images.txt
run: |
./scripts/airgapped/get-all-images.sh ${{ env.bundle }} > images.txt
echo -e "/nCreated images list:"
cat ./images.txt

- name: Create charms.tar.gz
run: |
python3 scripts/airgapped/save-charms-to-tar.py ${{ env.bundle }}

- name: Upload images.txt
uses: actions/upload-artifact@v3
with:
name: images-list
path: images.txt
7 changes: 0 additions & 7 deletions releases/1.8/stable/kubeflow/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,6 @@ applications:
series: focal
_github_repo_name: pvcviewer-operator
_github_repo_branch: track/1.8
seldon-controller-manager:
charm: seldon-core
channel: 1.17/stable
scale: 1
trust: true
_github_repo_name: seldon-core-operator
_github_repo_branch: track/1.17
tensorboard-controller:
charm: tensorboard-controller
channel: 1.8/stable
Expand Down
18 changes: 12 additions & 6 deletions scripts/airgapped/prerequisites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ echo "Installing dependencies..."
pip3 install -r $SCRIPT_DIR/requirements.txt
sudo apt update

echo "Installing Docker"
sudo snap install docker
sudo groupadd docker
sudo usermod -aG docker $USER
sudo snap disable docker
sudo snap enable docker
if ! command -v docker
then
echo "Installing Docker"
sudo snap install docker
sudo groupadd docker
sudo usermod -aG docker $USER
sudo snap disable docker
sudo snap enable docker
fi

echo "Installing parsers"
sudo snap install yq
sudo snap install jq

echo "Installing Juju"
sudo snap install juju --channel=$JUJU_CHANNEL --classic

echo "Installing pigz for compression"
sudo apt install pigz
Loading