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

feat(e2e): add e2e test suite with installation validation #172

Merged
merged 1 commit into from
Apr 30, 2022
Merged
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
76 changes: 74 additions & 2 deletions .github/workflows/build-kube-fledged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ on:
push_image:
description: 'whether or not to push built images to dockerhub'
required: true
type: boolean
type: boolean
release_version:
description: 'kube-fledged release version'
required: true
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.golang_version }}

Expand Down Expand Up @@ -169,3 +169,75 @@ jobs:
platforms: ${{ inputs.operator_target_platforms }}
push: ${{ inputs.push_image }}
tags: ${{ inputs.operator_image_repo }}:${{ inputs.release_version }},${{ inputs.operator_image_repo }}:latest

e2e_test_kube_fledged:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.golang_version }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build kubefledged-controller image
uses: docker/build-push-action@v2
with:
context: .
file: ${{ inputs.dockerfile_controller }}
build-args: |
ALPINE_VERSION=${{ inputs.alpine_version }}
GOLANG_VERSION=${{ inputs.golang_version }}
platforms: linux/amd64
push: false
load: true
tags: ${{ inputs.controller_image_repo }}:${{ inputs.release_version }}

- name: Build kubefledged-webhook-server image
uses: docker/build-push-action@v2
with:
context: .
file: ${{ inputs.dockerfile_webhook_server }}
build-args: |
ALPINE_VERSION=${{ inputs.alpine_version }}
GOLANG_VERSION=${{ inputs.golang_version }}
platforms: linux/amd64
push: false
load: true
tags: ${{ inputs.webhook_server_image_repo }}:${{ inputs.release_version }}

- name: Build kubefledged-cri-client image
uses: docker/build-push-action@v2
with:
context: .
file: ${{ inputs.dockerfile_cri_client }}
build-args: |
ALPINE_VERSION=${{ inputs.alpine_version }}
CRICTL_VERSION=${{ inputs.crictl_version }}
DOCKER_VERSION=${{ inputs.docker_version }}
platforms: linux/amd64
push: false
load: true
tags: ${{ inputs.crictl_image_repo }}:${{ inputs.release_version }}

- name: Build kubefledged-operator image
uses: docker/build-push-action@v2
with:
context: ./deploy/kubefledged-operator
file: ${{ inputs.dockerfile_operator }}
build-args: |
OPERATORSDK_VERSION=${{ inputs.operatorsdk_version }}
platforms: linux/amd64
push: false
load: true
tags: ${{ inputs.operator_image_repo }}:${{ inputs.release_version }}

- name: E2e test
env:
IMAGE_TAG: ${{ inputs.release_version }}
run: make e2e-test

3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,6 @@ remove-webhook-server-using-operator:
sed -i "s|enable: true|enable: false|g" deploy/kubefledged-operator/deploy/crds/charts.helm.kubefledged.io_v1alpha2_kubefledged_cr.yaml
kubectl apply -f deploy/kubefledged-operator/deploy/crds/charts.helm.kubefledged.io_v1alpha2_kubefledged_cr.yaml

.PHONY: e2e-test
e2e-test:
@go test -v ./e2etest
Loading