chore(ui): Upgrade UI dependencies #214
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: infra/cluster-init | |
on: | |
# Automatically run CI on Release and Pre-Release tags and main branch | |
# (only if there are changes to relevant paths) | |
push: | |
tags: | |
- "cluster-init/v[0-9]+.[0-9]+.[0-9]+*" | |
branches: | |
- main | |
paths: | |
- ".github/workflows/cluster-init.yaml" | |
- "infra/cluster-init/**" | |
# Automatically run CI on branches, that have active PR opened | |
pull_request: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/cluster-init.yaml" | |
- "infra/cluster-init/**" | |
# To make it possible to trigger e2e CI workflow for any arbitrary git ref | |
workflow_dispatch: | |
jobs: | |
release-rules: | |
runs-on: ubuntu-latest | |
outputs: | |
release-type: ${{ steps.release-rules.outputs.release-type }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: release-rules | |
uses: ./.github/actions/release-rules | |
with: | |
prefix: cluster-init/ | |
build-cluster-init: | |
runs-on: ubuntu-latest | |
outputs: | |
cluster-init-version: ${{ steps.build-cluster-init.outputs.cluster-init-version }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Run action build-cluster-init | |
id: build-cluster-init | |
uses: ./.github/actions/build-cluster-init | |
test-e2e: | |
runs-on: ubuntu-latest | |
env: | |
CLUSTER_INIT_VERSION: ${{ needs.build-cluster-init.outputs.cluster-init-version }} | |
CLUSTER_NAME: turing-e2e | |
ISTIO_VERSION: 1.9.9 | |
KNATIVE_VERSION: 1.7.4 | |
KNATIVE_ISTIO_VERSION: 1.7.1 | |
LOCAL_REGISTRY: registry.localhost:5000 | |
needs: | |
- build-cluster-init | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Download Cluster Init Docker tar archieve | |
uses: actions/download-artifact@v4 | |
with: | |
name: cluster-init.${{ env.CLUSTER_INIT_VERSION }}.tar | |
- name: Run action cluster-init | |
uses: ./.github/actions/run-cluster-init | |
with: | |
cluster_name: ${{ env.CLUSTER_NAME}} | |
istio_version: ${{ env.ISTIO_VERSION}} | |
knative_version: ${{ env.KNATIVE_VERSION}} | |
knative_istio_version: ${{ env.KNATIVE_ISTIO_VERSION}} | |
local_registry: ${{ env.LOCAL_REGISTRY}} | |
cluster_init_version: ${{ env.CLUSTER_INIT_VERSION }} | |
- name: Smoke Test | |
run: | | |
# Create hello world knative service | |
tee service.yaml <<EOF | |
apiVersion: serving.knative.dev/v1 | |
kind: Service | |
metadata: | |
name: helloworld-go | |
namespace: default | |
spec: | |
template: | |
spec: | |
containers: | |
- image: gcr.io/knative-samples/helloworld-go | |
env: | |
- name: TARGET | |
value: "Hello Knative Serving is up and running!!" | |
EOF | |
kubectl apply -f service.yaml | |
# wait till service is up | |
timeout --foreground 120 bash -c 'until kubectl get service.serving.knative.dev/helloworld-go --output=jsonpath='{.status.conditions[1]}' | grep "True"; do : ; done' | |
kubectl get ksvc | |
curl -f http://helloworld-go.default.127.0.0.1.nip.io/ | |
kubectl delete service helloworld-go | |
# Invoke helm hooks on delete | |
- name: Tear down infrastructure job | |
run: helm delete --namespace infrastructure turing-init --timeout 15m | |
publish: | |
# Automatically publish release and pre-release artifacts. | |
# | |
# As for dev releases, make it possible to publish artifacts | |
# manually by approving 'deployment' in the 'manual' environment. | |
# | |
# Dev build can be released either from the 'main' branch or | |
# by running this workflow manually with `workflow_dispatch` event. | |
if: >- | |
contains('release,pre-release', needs.release-rules.outputs.release-type) | |
|| ( github.event_name != 'pull_request' ) | |
|| ( github.event.pull_request.head.repo.full_name == github.repository ) | |
environment: ${{ needs.release-rules.outputs.release-type == 'dev' && 'manual' || '' }} | |
runs-on: ubuntu-latest | |
needs: | |
- release-rules | |
- build-cluster-init | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download Cluster Init Docker tar archieve | |
uses: actions/download-artifact@v4 | |
with: | |
name: cluster-init.${{ needs.build-cluster-init.outputs.cluster-init-version }}.tar | |
- name: Publish Cluster Init Docker Image | |
env: | |
DOCKER_REPOSITORY: ghcr.io/${{ github.repository }} | |
run: | | |
docker image load --input cluster-init.${{ needs.build-cluster-init.outputs.cluster-init-version }}.tar | |
docker tag \ | |
cluster-init:${{ needs.build-cluster-init.outputs.cluster-init-version }} \ | |
${{ env.DOCKER_REPOSITORY }}/cluster-init:${{ needs.build-cluster-init.outputs.cluster-init-version }} | |
docker push ${{ env.DOCKER_REPOSITORY }}/cluster-init:${{ needs.build-cluster-init.outputs.cluster-init-version }} | |