Skip to content

Commit 5ead17e

Browse files
author
Mladen Rusev
committed
automate the e2e script to run in CI
1 parent 7b58625 commit 5ead17e

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,56 @@ jobs:
6363
key: downloaded-${{ runner.os }}-${{ hashFiles('klone.yaml') }}-test-unit
6464

6565
- run: make -j test-unit test-helm
66+
67+
test-e2e:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
with:
72+
fetch-depth: 0
73+
74+
- uses: ./.github/actions/repo_access
75+
with:
76+
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: ${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}
77+
- name: Authenticate to Google Cloud
78+
id: auth
79+
uses: google-github-actions/auth@v2
80+
with:
81+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
82+
83+
- name: Set up gcloud
84+
id: setup-gcloud
85+
uses: google-github-actions/setup-gcloud@v2
86+
with:
87+
project_id: machineidentitysecurity-jsci-e
88+
89+
- name: Configure Docker for Google Artifact Registry
90+
run: gcloud auth configure-docker europe-west1-docker.pkg.dev
91+
92+
- name: Install dependencies
93+
run: |
94+
gcloud components install gke-gcloud-auth-plugin
95+
curl -sSfL https://dl.venafi.cloud/venctl/latest/installer.sh | bash
96+
echo "/home/runner/.venafi/bin" >> $GITHUB_PATH
97+
curl -LO https://github.com/smallstep/cli/releases/latest/download/step-cli_amd64.deb
98+
sudo apt-get install ./step-cli_amd64.deb
99+
helm plugin install https://github.com/databus23/helm-diff
100+
101+
- id: go-version
102+
run: |
103+
make print-go-version >> "$GITHUB_OUTPUT"
104+
105+
- uses: actions/setup-go@v5
106+
with:
107+
go-version: ${{ steps.go-version.outputs.result }}
108+
- run: make -j test-e2e-gke
109+
env:
110+
VEN_API_KEY: ${{ secrets.VEN_API_KEY_PULL }}
111+
VEN_API_KEY_PULL: ${{ secrets.VEN_API_KEY_PULL }}
112+
OCI_BASE: europe-west1-docker.pkg.dev/machineidentitysecurity-jsci-e/js-agent-ci-repo
113+
VEN_API_HOST: api.venafi.cloud
114+
VEN_ZONE: mladen-test\Default
115+
VEN_VCP_REGION: us
116+
CLOUDSDK_CORE_PROJECT: machineidentitysecurity-jsci-e
117+
CLOUDSDK_COMPUTE_ZONE: europe-west1-b
118+
CLUSTER_NAME: test-secretless

hack/e2e/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
set -o nounset
2727
set -o errexit
2828
set -o pipefail
29-
set -o xtrace
29+
# Commenting out for CI, uncomment for local debugging
30+
#set -o xtrace
3031

3132
script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
3233
root_dir=$(cd "${script_dir}/../.." && pwd)
@@ -115,6 +116,7 @@ fi
115116

116117
export VENAFI_KUBERNETES_AGENT_CLIENT_ID="not-used-but-required-by-venctl"
117118
venctl components kubernetes apply \
119+
--no-prompts \
118120
--region $VEN_VCP_REGION \
119121
--cert-manager \
120122
--venafi-enhanced-issuer \

0 commit comments

Comments
 (0)