Skip to content

Commit

Permalink
chore: test kubechat
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook committed Nov 17, 2023
1 parent 6889bda commit 122148b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 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 @@ -290,12 +290,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
17 changes: 1 addition & 16 deletions .github/workflows/terraform-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,25 +225,10 @@ jobs:
cmd="${cmd} --disk-size ${{ inputs.disk-size }} "
fi
echo "$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: Setup kubectl
if: ${{ inputs.cloud-provider == 'gke' && inputs.test-mode == 'kubechat' }}
uses: azure/setup-kubectl@v3
Expand Down

0 comments on commit 122148b

Please sign in to comment.