Skip to content

Commit

Permalink
enable google secrets in helm chart e2e workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
  • Loading branch information
daisy-ycguo committed Jul 30, 2024
1 parent 868103b commit 27e7192
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/chart-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: E2E test with helm charts

on:
pull_request:
pull_request_target:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Get test matrix
id: get-test-matrix
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Set variables
run: |
Expand All @@ -97,7 +97,6 @@ jobs:
echo "CHART_FOLDER=$CHARTS_DIR/${{ matrix.example }}" >> $GITHUB_ENV
fi
- name: Initialize chart testing
run: |
# Replace values for CI test environment
Expand All @@ -117,6 +116,9 @@ jobs:
- name: Helm install
id: install
env:
GOOGLE_CSE_ID: ${{ secrets.GOOGLE_CSE_ID }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
run: |
set -xe
echo "should_cleanup=true" >> $GITHUB_ENV
Expand All @@ -128,6 +130,8 @@ jobs:
if ! helm install --create-namespace --namespace $NAMESPACE --wait \
--timeout "$ROLLOUT_TIMEOUT_SECONDS" \
--set autodependency.enabled=true \
--set GOOGLE_API_KEY=${{ env.GOOGLE_API_KEY}} \
--set GOOGLE_CSE_ID=${{ env.GOOGLE_CSE_ID}} \
--values ${{ env.CHART_FOLDER}}/${value_file} \
$RELEASE_NAME ${{ env.CHART_FOLDER}} ; then
echo "Failed to install chart ${{ matrix.example }}"
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/scripts/e2e/chart_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ function dump_pod_log() {
function dump_pods_status() {
namespace=$1
echo "-----DUMP POD STATUS in NS $namespace------"

# get pod status
outputs=$(kubectl get pods -n $namespace -owide)
echo $outputs
kubectl get pods -n $namespace -o wide
echo "-----------------------------------"

# Get all pods in the namespace and their statuses
Expand Down

0 comments on commit 27e7192

Please sign in to comment.