-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable GMC helm installation test in CI (#250)
Signed-off-by: Yingchun Guo <[email protected]>
- Loading branch information
1 parent
af47b3c
commit 497ff61
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: GMC Helm Installation Test on Xeon | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped | ||
paths: | ||
- manifests/common/** | ||
- microservices-connector/config/crd/bases/gmc.opea.io_gmconnectors.yaml | ||
- microservices-connector/config/gmcrouter/gmc-router.yaml | ||
- microservices-connector/helm/** | ||
- "!**.md" | ||
- "!**.txt" | ||
- "!**.png" | ||
workflow_dispatch: | ||
|
||
# If there is a new commit, the previous jobs will be canceled | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-xeon | ||
cancel-in-progress: true | ||
|
||
env: | ||
GOSRC_DIR: "microservices-connector" | ||
|
||
jobs: | ||
image-build: | ||
uses: ./.github/workflows/reuse-gmc-image-build.yaml | ||
with: | ||
image_tag: ${{ github.event.pull_request.head.sha }} | ||
runner_label: 'docker-build-xeon' | ||
|
||
go-e2e: | ||
runs-on: kind-xeon | ||
needs: image-build | ||
steps: | ||
- name: Checkout out Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set variables | ||
run: | | ||
echo "RELEASE_NAME=gmc$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV | ||
echo "SYSTEM_NAMESPACE=opea-system-helm" >> $GITHUB_ENV | ||
echo "APP_NAMESPACE=opea-app" >> $GITHUB_ENV | ||
echo "DOCKER_REGISTRY=${{ needs.image-build.outputs.image_repo }}" >> $GITHUB_ENV | ||
echo "VERSION=${{ needs.image-build.outputs.image_tag }}" >> $GITHUB_ENV | ||
echo "should_cleanup=false" >> $GITHUB_ENV | ||
echo "skip_validate=false" >> $GITHUB_ENV | ||
echo "KIND_MOUNT_DIR=/mnt/huggingface/hub" >> $GITHUB_ENV | ||
echo "ROLLOUT_TIMEOUT_SECONDS=600s" >> $GITHUB_ENV | ||
- name: Install GMC | ||
run: | | ||
echo "should_cleanup=true" >> $GITHUB_ENV | ||
## IMPORTANT NOTICE: need to replace gmc images with {{env.DOCKER_REGISTRY}} and {{env.VERSION}} | ||
cd microservices-connector | ||
if ! helm install --create-namespace --namespace {{ env.SYSTEM_NAMESPACE}} --wait \ | ||
--timeout "$ROLLOUT_TIMEOUT_SECONDS" \ | ||
$RELEASE_NAME helm ; then | ||
echo "Failed to install GMC by helm" | ||
echo "skip_validate=true" >> $GITHUB_ENV | ||
.github/workflows/scripts/e2e/chart_test.sh dump_pods_status {{ env.SYSTEM_NAMESPACE}} | ||
exit 1 | ||
fi | ||
- name: Run e2e tests | ||
run: | | ||
if $skip_validate; then | ||
echo "Skip validate" | ||
else | ||
.github/workflows/scripts/e2e/gmc_xeon_test.sh validate_gmc | ||
fi | ||
- name: Cleanup modules | ||
if: always() | ||
run: | | ||
if $should_cleanup; then | ||
.github/workflows/scripts/e2e/gmc_xeon_test.sh cleanup_apps | ||
helm uninstall $RELEASE_NAME --namespace {{ env.SYSTEM_NAMESPACE}} | ||
fi |
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
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