Skip to content

Commit

Permalink
enable gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Nov 27, 2024
1 parent 19f9351 commit b620d25
Showing 1 changed file with 43 additions and 45 deletions.
88 changes: 43 additions & 45 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Store test timestamp
# run: echo "TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV
# - name: Setup test repository SSH key
# run: |
# mkdir -p ${{ env.SSH_PATH }}
# (base64 -d <<< ${{ secrets.E2E_REPO_PRIVATE_KEY }}) > ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }}
# chmod 600 ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }}
# eval "$(ssh-agent -s)"
# ssh-add ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }}
- name: Store test timestamp
run: echo "TIMESTAMP=$(date +'%s')" >> $GITHUB_ENV
- name: Setup test repository SSH key
run: |
mkdir -p ${{ env.SSH_PATH }}
(base64 -d <<< ${{ secrets.E2E_REPO_PRIVATE_KEY }}) > ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }}
chmod 600 ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }}
eval "$(ssh-agent -s)"
ssh-add ${{ env.VENOM_VAR_gitRepoPrivateKeyPath }}
# - name: Decode and save Google service account to a file/env var
# run: (base64 -d <<< ${{ secrets.E2E_GCP_SA_KEY }}) > ${{ env.E2E_GCP_SA_KEY_FILE }}
- name: GCloud Auth
Expand All @@ -55,44 +55,42 @@ jobs:
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 363.0.0'
- name: Use gcloud CLI
run: gcloud info
# - name: Setup Go
# uses: actions/[email protected]
# with:
# go-version-file: go.mod
# - name: Add GOBIN to PATH
# run: echo $GOBIN >> $GITHUB_PATH
# - name: Setup Venom
# run: |
# curl https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64 -L -o ${{ env.VENOM_PATH }}
# chmod +x ${{ env.VENOM_PATH }}
# venom version
# - name: Setup Plural CLI
# run: |
# make install-cli
# mkdir -p ${{ env.VENOM_VAR_pluralHome }}
# plural version
# - name: Print Terraform version
# run: terraform --version
# - name: Print Google Cloud CLI version
# run: gcloud --version
- name: Setup Go
uses: actions/[email protected]
with:
go-version-file: go.mod
- name: Add GOBIN to PATH
run: echo $GOBIN >> $GITHUB_PATH
- name: Setup Venom
run: |
curl https://github.com/ovh/venom/releases/download/v1.2.0/venom.linux-amd64 -L -o ${{ env.VENOM_PATH }}
chmod +x ${{ env.VENOM_PATH }}
venom version
- name: Setup Plural CLI
run: |
make install-cli
mkdir -p ${{ env.VENOM_VAR_pluralHome }}
plural version
- name: Print Terraform version
run: terraform --version
- name: Print Google Cloud CLI version
run: gcloud --version
- name: Create Google Project
run: gcloud -q projects create plural-e2e-ci-test --name="E2E Debug" --organization=${{ secrets.E2E_GCP_ORG_ID }} --labels=type=e2e
# - name: Run tests
# env:
# VENOM_VAR_provider: gcp
# VENOM_VAR_region: us-central1
# VENOM_VAR_gcpEmail: ${{ secrets.E2E_GCP_EMAIL }}
# # VENOM_VAR_gcpSAKeyFile: ${{ secrets.E2E_GCP_SA_KEY_FILE }}
# VENOM_VAR_gcpOrgID: ${{ secrets.E2E_GCP_ORG_ID }}
# VENOM_VAR_gcpBillingID: ${{ secrets.E2E_GCP_BILLING_ID }}
# VENOM_VAR_project: e2e-${{ env.TIMESTAMP }}
# VENOM_VAR_branch: e2e-${{ env.TIMESTAMP }}-gcp
# VENOM_VAR_username: ${{ secrets.E2E_GCP_SA_USERNAME }}
# VENOM_VAR_email: ${{ secrets.E2E_GCP_SA_EMAIL }}
# VENOM_VAR_token: ${{ secrets.E2E_GCP_SA_TOKEN }}
# run: venom run -vv --html-report --format=json --output-dir ${{ env.TESTOUT_PATH }} test/plural
- name: Run tests
env:
VENOM_VAR_provider: gcp
VENOM_VAR_region: us-central1
VENOM_VAR_gcpEmail: ${{ secrets.E2E_GCP_EMAIL }}
# VENOM_VAR_gcpSAKeyFile: ${{ secrets.E2E_GCP_SA_KEY_FILE }}
VENOM_VAR_gcpOrgID: ${{ secrets.E2E_GCP_ORG_ID }}
VENOM_VAR_gcpBillingID: ${{ secrets.E2E_GCP_BILLING_ID }}
VENOM_VAR_project: e2e-${{ env.TIMESTAMP }}
VENOM_VAR_branch: e2e-${{ env.TIMESTAMP }}-gcp
VENOM_VAR_username: ${{ secrets.E2E_GCP_SA_USERNAME }}
VENOM_VAR_email: ${{ secrets.E2E_GCP_SA_EMAIL }}
VENOM_VAR_token: ${{ secrets.E2E_GCP_SA_TOKEN }}
run: venom run -vv --html-report --format=json --output-dir ${{ env.TESTOUT_PATH }} test/plural
# - name: Post a slack message on finish
# uses: slackapi/[email protected]
# with:
Expand Down

0 comments on commit b620d25

Please sign in to comment.