Skip to content

[Snyk] Security upgrade python from 3.9-slim to 3.14.0a1-slim #1092

[Snyk] Security upgrade python from 3.9-slim to 3.14.0a1-slim

[Snyk] Security upgrade python from 3.9-slim to 3.14.0a1-slim #1092

name: Charmed Katib
on:
- push
- pull_request
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
set -eux
sudo apt update
sudo apt install python3-setuptools
sudo pip3 install black flake8
- name: Check black
run: black --check operators/*/src
- name: Check flake8
run: cd operators && flake8 ./katib*/src
build:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- uses: balchua/microk8s-actions@v0.2.2
with:
channel: "1.21/stable"
addons: '["dns", "storage", "rbac"]'
- name: Install dependencies
run: |
set -eux
sudo apt update
sudo apt install -y python3-pip
sudo snap install juju --classic
sudo snap install juju-bundle --classic
sudo snap install juju-wait --classic
sudo pip3 install charmcraft==1.3.1
- name: Build Docker images
run: |
set -eux
images=("katib-controller" "katib-ui" "katib-db-manager")
folders=("katib-controller" "ui" "db-manager")
for idx in {0..2}; do
docker build . \
-t docker.io/kubeflowkatib/${images[$idx]}:latest \
-f cmd/${folders[$idx]}/v1beta1/Dockerfile
docker save docker.io/kubeflowkatib/${images[$idx]} > ${images[$idx]}.tar
microk8s ctr image import ${images[$idx]}.tar
done
- name: Deploy Katib
env:
CHARMCRAFT_DEVELOPER: "1"
run: |
set -eux
cd operators/
git clone git://git.launchpad.net/canonical-osm
cp -r canonical-osm/charms/interfaces/juju-relation-mysql mysql
sg microk8s -c 'juju bootstrap microk8s uk8s'
juju add-model kubeflow
juju bundle deploy --build --destructive-mode --serial
juju wait -wvt 600
- name: Test Katib
run: kubectl apply -f examples/v1beta1/hp-tuning/random.yaml
- name: Get pod statuses
run: kubectl get all -A
if: failure()
- name: Get juju status
run: juju status
if: failure()
- name: Get katib-controller workload logs
run: kubectl logs --tail 100 -nkubeflow -lapp.kubernetes.io/name=katib-controller
if: failure()
- name: Get katib-controller operator logs
run: kubectl logs --tail 100 -nkubeflow -loperator.juju.is/name=katib-controller
if: failure()
- name: Get katib-ui workload logs
run: kubectl logs --tail 100 -nkubeflow -lapp.kubernetes.io/name=katib-ui
if: failure()
- name: Get katib-ui operator logs
run: kubectl logs --tail 100 -nkubeflow -loperator.juju.is/name=katib-ui
if: failure()
- name: Get katib-db-manager workload logs
run: kubectl logs --tail 100 -nkubeflow -lapp.kubernetes.io/name=katib-db-manager
if: failure()
- name: Get katib-db-manager operator logs
run: kubectl logs --tail 100 -nkubeflow -loperator.juju.is/name=katib-db-manager
if: failure()
- name: Upload charmcraft logs
uses: actions/upload-artifact@v2
with:
name: charmcraft-logs
path: /tmp/charmcraft-log-*
if: failure()