Skip to content

Commit 3d1dfdf

Browse files
committed
chore: cleanup and prereq
cleanup step and better prereq for operator testing
1 parent 589a451 commit 3d1dfdf

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

.github/cisetup.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ sudo apt-get -y install curl wget jq
2222
mkdir -p "$HOME/.local/bin"
2323
export PATH="$HOME/.local/bin:$PATH"
2424

25-
# add ops bin (~/.ops/<os>-<arch>/bin). os is uname -s lowercase, map common arch names
2625
os="$(uname -s | tr '[:upper:]' '[:lower:]')"
2726
arch="$(uname -m)"
2827
case "$arch" in
@@ -39,8 +38,15 @@ URL="https://raw.githubusercontent.com/apache/openserverless-cli/refs/tags/v$VER
3938
curl -sL $URL | VERSION="$VER" bash ;\
4039
echo -e '#!/bin/bash\nops -wsk "$@"' >$HOME/.local/bin/wsk ; chmod +x $HOME/.local/bin/wsk ;\
4140
curl -sL https://taskfile.dev/install.sh | sh -s -- -d -b $HOME/.local/bin; \
42-
task --version && ops -t
41+
task --version; \
42+
echo "Installing ops prereq from $HOME" && ops -t
43+
44+
# install prerequisites to run operator tests
45+
cd $GITHUB_WORKSPACE
46+
echo "Installing operator prereq from $GITHUB_WORKSPACE" && ops -t
4347

4448
# Persist ops path for GitHub Actions steps
4549
echo "$RESOLVED_OPS_BIN" >> "$GITHUB_PATH"
4650
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
51+
52+

.github/workflows/check.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ on:
2626
jobs:
2727
check:
2828
name: Check OpenServerless Operator
29+
#runs-on: [ self-hosted, Linux, X64 ]
2930
runs-on: ubuntu-22.04
3031
steps:
3132
- name: Checkout
@@ -54,9 +55,8 @@ jobs:
5455
run: bash .github/cisetup.sh
5556
- name: Kind
5657
run: |
57-
cd $HOME && \
58-
ops setup docker create &&
59-
kind export kubeconfig --name nuvolaris
58+
cd $HOME && ops setup docker create && \
59+
kind export kubeconfig --name nuvolaris
6060
- name: Install
6161
run: task setup
6262
- name: BuildAndLoad
@@ -74,5 +74,9 @@ jobs:
7474
run: task utest
7575
continue-on-error: false
7676
- name: Integration Test
77-
run: task itest
77+
run: ops -t && task itest
7878
continue-on-error: false
79+
- name: Cleanup cluster
80+
if: always()
81+
run: |
82+
kind delete cluster --name nuvolaris

.github/workflows/image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ on:
2727
jobs:
2828
image:
2929
name: Build OpenServerless Operator Image
30-
#runs-on: ubuntu-22.04
31-
runs-on: [ self-hosted, Linux, X64 ]
30+
runs-on: ubuntu-22.04
31+
#runs-on: [ self-hosted, Linux, X64 ]
3232
steps:
3333
- name: Remove unnecessary files
3434
run: |
@@ -92,4 +92,4 @@ jobs:
9292
- name: Set up Docker Buildx
9393
uses: docker/setup-buildx-action@v3
9494
- name: Image
95-
run: task buildx-and-push TAG="$IMG_TAG"
95+
run: task buildx-and-push TAG="$IMG_TAG"

clusters/kind/opsfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ version: '3'
1919

2020
vars:
2121
NAME: "nuvolaris"
22-
KUBEFILE: "{{.OPS_TMP}}/kind-dev.kubeconfig"
22+
KUBEFILE: "{{.OPS_TMP}}/kind.kubeconfig"
2323
DRY: ""
2424

2525
env:

0 commit comments

Comments
 (0)