Skip to content

Commit

Permalink
chore: e2e test kubechat
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook committed Nov 17, 2023
1 parent ff640e5 commit a6278ec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/kubechat-test-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ jobs:
--title "$test_title" \
--result "$TEST_RESULT"
terraform-destroy-k8s:
if: ${{ always() }}
needs: [ terraform-init-k8s, send-message ]
uses: ./.github/workflows/terraform-destroy.yml
with:
cloud-provider: ${{ inputs.CLOUD_PROVIDER }}
artifact-name: cicd-${{ inputs.CLOUD_PROVIDER }}-${{ github.sha }}
region: ${{ inputs.REGION }}
secrets: inherit
# terraform-destroy-k8s:
# if: ${{ always() }}
# needs: [ terraform-init-k8s, send-message ]
# uses: ./.github/workflows/terraform-destroy.yml
# with:
# cloud-provider: ${{ inputs.CLOUD_PROVIDER }}
# artifact-name: cicd-${{ inputs.CLOUD_PROVIDER }}-${{ github.sha }}
# region: ${{ inputs.REGION }}
# secrets: inherit
19 changes: 10 additions & 9 deletions .github/workflows/terraform-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,25 @@ jobs:
cmd="${cmd} --disk-size ${{ inputs.disk-size }} "
fi
echo "$cmd"
eval "$cmd"
# eval "$cmd"
K8S_CLUSTER_NAME=""
if [[ "${{ inputs.cloud-provider }}" == "eks" ]]; then
K8S_CLUSTER_NAME=$(cat terraform.tfstate | grep "\"EKS\":" | awk 'NR==1{print $2}' | sed 's/,//g;s/\"//g')
elif [[ "${{ inputs.cloud-provider }}" == "gke" ]]; then
K8S_CLUSTER_NAME=$(cat terraform.tfstate | grep "\"cluster\":" | awk 'NR==1{print $2}' | sed 's/,//g;s/\"//g')
fi
K8S_CLUSTER_NAME="cicd-gke-gpu"
echo "k8s-cluster-name:${K8S_CLUSTER_NAME}"
echo k8s-cluster-name=${K8S_CLUSTER_NAME} >> $GITHUB_OUTPUT
- name: upload artifact
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
if-no-files-found: error
name: ${{ inputs.artifact-name }}
path: ${{ steps.get_deploy_path.outputs.deploy-path }}
retention-days: 1
# - name: upload artifact
# uses: actions/upload-artifact@v3
# if: ${{ always() }}
# with:
# if-no-files-found: error
# name: ${{ inputs.artifact-name }}
# path: ${{ steps.get_deploy_path.outputs.deploy-path }}
# retention-days: 1

- name: Setup kubectl
if: ${{ inputs.cloud-provider == 'gke' && inputs.test-mode == 'kubechat' }}
Expand Down

0 comments on commit a6278ec

Please sign in to comment.