From fbfa3baa5358449b96bc0360e640f6e114e23ec8 Mon Sep 17 00:00:00 2001 From: Liam Beckman Date: Thu, 24 Oct 2024 10:30:02 -0700 Subject: [PATCH] Add initial K8s Github Actions workflow --- .github/workflows/k8s.yaml | 31 ++++++++++++++++++++++++ config/kubernetes-executor-template.yaml | 2 +- config/kubernetes-template.yaml | 3 ++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/k8s.yaml diff --git a/.github/workflows/k8s.yaml b/.github/workflows/k8s.yaml new file mode 100644 index 000000000..d3fb31edb --- /dev/null +++ b/.github/workflows/k8s.yaml @@ -0,0 +1,31 @@ +# Optionally debug via SSH +# Ref: https://fleetdm.com/engineering/tips-for-github-actions-usability +# +# To use this step uncomment and place anywhere in the build steps. The build will pause on this step and +# output a ssh address associated with the Github action worker. Helpful for debugging build steps and +# and intermediary files/artifacts. +# +# - name: Setup tmate session +# uses: mxschmitt/action-tmate@v3 + +name: K8s Test + +on: + push: + pull_request: + +jobs: + build: + uses: ./.github/workflows/build.yml + + test: + # needs: build + runs-on: ubuntu-latest + steps: + - name: Install k3d + run: | + wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash + # kubectl get nodes + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 diff --git a/config/kubernetes-executor-template.yaml b/config/kubernetes-executor-template.yaml index 277fdad85..ab41fe16b 100644 --- a/config/kubernetes-executor-template.yaml +++ b/config/kubernetes-executor-template.yaml @@ -15,7 +15,7 @@ spec: containers: - name: funnel-worker-{{.TaskId}} # TODO: Should this be configurable? - image: development + image: quay.io/ohsu-comp-bio/funnel:development imagePullPolicy: Always command: ["/bin/sh", "-c"] args: {{.Command}} diff --git a/config/kubernetes-template.yaml b/config/kubernetes-template.yaml index 305ae577b..e832fac79 100644 --- a/config/kubernetes-template.yaml +++ b/config/kubernetes-template.yaml @@ -13,7 +13,8 @@ spec: restartPolicy: Never containers: - name: funnel-worker-{{.TaskId}} - image: quay.io/ohsu-comp-bio/funnel:{{.Image}} + # TODO: Should this be configurable? + image: quay.io/ohsu-comp-bio/funnel:development imagePullPolicy: Always args: - "worker"