-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add org id remove unused step save output fix try again fix add tracetest cli step; test run other tests add env id upadte path add variableset tests fix revert run all suites; test each feature individually run all, one by one disable disable
- Loading branch information
Showing
6 changed files
with
115 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ jobs: | |
TRACETEST_LICENSE: ${{ secrets.TRACETEST_ONPREM_TEST_LICENSE }} | ||
AGENT_API_KEY: ${{ secrets.AGENT_API_KEY }} | ||
AGENT_ENV_ID: ${{ secrets.AGENT_ENV_ID }} | ||
TESTS_REPO_DIR: "/tmp/tests" | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -18,21 +19,93 @@ jobs: | |
uses: helm/kind-action@v1 | ||
with: | ||
cluster_name: tracetest | ||
# install_only: true | ||
install_only: true | ||
|
||
- name: Test public images | ||
run: | | ||
kubectl config get-contexts | ||
./scripts/setup_kind_cluster.sh --ci --build-deps --install-demo --force-setup | ||
kind get kubeconfig --name tracetest > ~/.kube/config | ||
helm install cloudagent -n default ./charts/tracetest-agent --set agent.apiKey="$AGENT_API_KEY" --set agent.environmentId="$AGENT_ENV_ID" | ||
helm upgrade --install cloudagent ./charts/tracetest-agent \ | ||
-n default \ | ||
--set agent.apiKey="$AGENT_API_KEY" \ | ||
--set agent.environmentId="$AGENT_ENV_ID" | ||
kubectl wait --for=condition=available --timeout=60s deployment/cloudagent-tracetest-agent | ||
echo "Cloudagent deployed" | ||
kubectl wait --for=condition=available --timeout=60s deployment/tt-tracetest-core-api | ||
kubectl logs deployment/tt-tracetest-core-api | ||
kubectl logs deployment/cloudagent-tracetest-agent | ||
kubectl get cm tt-tracetest-core -o yaml | ||
- name: Configure Custom DNS | ||
run: | | ||
# setup custom DNS resolve | ||
sudo echo "127.0.0.1 tracetest.localdev" | sudo tee -a /etc/hosts | ||
sudo echo "127.0.0.1 pokeshop.localdev" | sudo tee -a /etc/hosts | ||
- name: Install Playwright | ||
run: | | ||
npx playwright install --with-deps | ||
- name: Configure intial org and env | ||
env: | ||
TRACETEST_TEST_REPO_CLONE_PAT: ${{ secrets.TRACETEST_TEST_REPO_CLONE_PAT }} | ||
TRACETEST_TEST_REPO: ${{ secrets.TRACETEST_TEST_REPO }} | ||
GH_USERNAME: ${{ secrets.TRACETEST_USER_GH_USERNAME }} | ||
GH_PASSWORD: ${{ secrets.TRACETEST_USER_GH_PASSWORD }} | ||
GH_SECRET: ${{ secrets.TRACETEST_USER_GH_SECRET }} | ||
TRACETEST_ENDPOINT: https://tracetest.localdev:30000/ | ||
OUTPUT_TOKEN_FILE: "/tmp/token.json" | ||
run: | | ||
BASEDIR=$(pwd) | ||
# sparse checkout of the testing directory | ||
git clone --depth 1 --filter=blob:none --sparse https://[email protected]/$TRACETEST_TEST_REPO.git $TESTS_REPO_DIR | ||
cd $TESTS_REPO_DIR | ||
git sparse-checkout init --cone | ||
git sparse-checkout set testing | ||
cd testing/e2e-tracetesting | ||
npm install | ||
npx playwright test tests/setup/extract-default-token.manual.ts --grep '@manual' | ||
############################################ | ||
############################################ | ||
cd $BASEDIR | ||
# run script for initial configuration | ||
export VARS_TOKEN=$(cat $OUTPUT_TOKEN_FILE | jq -r '.token') | ||
sed -i 's/%TOKEN_PLACEHOLDER%/'"$VARS_TOKEN"'/g' tests/vars/ci.yaml | ||
export VARS_ORG_ID=$(cat $OUTPUT_TOKEN_FILE | jq -r '.orgId') | ||
sed -i 's/%ORG_ID_PLACEHOLDER%/'"$VARS_ORG_ID"'/g' tests/vars/ci.yaml | ||
export VARS_ENV_ID=$(cat $OUTPUT_TOKEN_FILE | jq -r '.envId') | ||
sed -i 's/%ENV_ID_PLACEHOLDER%/'"$VARS_ENV_ID"'/g' tests/vars/ci.yaml | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: test-output | ||
path: /tmp/tests/ | ||
|
||
- name: Configure Tracetest CLI | ||
uses: kubeshop/tracetest-github-action@v1 | ||
with: | ||
token: ${{secrets.TRACETEST_CLI_TOKEN}} | ||
|
||
- name: run tracetests | ||
run: | | ||
# tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features --vars ./tests/vars/ci.yaml | ||
sleep 600 | ||
#tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/enviromment_tokens --vars ./tests/vars/ci.yaml | ||
#tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/environment_members --vars ./tests/vars/ci.yaml | ||
tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/environments --vars ./tests/vars/ci.yaml | ||
tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/organization_invites --vars ./tests/vars/ci.yaml | ||
tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/organizations --vars ./tests/vars/ci.yaml | ||
tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/polling_profiles --vars ./tests/vars/ci.yaml | ||
tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/tests --vars ./tests/vars/ci.yaml | ||
tracetest run testsuite -f $TESTS_REPO_DIR/testing/server-tracetesting/features/variable_sets --vars ./tests/vars/ci.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
**/*/Chart.lock | ||
**/*/charts/* | ||
cluster.env | ||
tracetest.kubeconfig | ||
*.env | ||
*tracetest.kubeconfig | ||
*.bkp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,4 @@ nodes: | |
- containerPort: 30000 | ||
hostPort: 30000 | ||
protocol: TCP | ||
- role: worker | ||
- role: worker | ||
- role: worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
type: VariableSet | ||
spec: | ||
id: helm-ci | ||
name: Helm CI | ||
values: | ||
- key: BASE_URL | ||
value: https://tracetest.localdev:30000 | ||
type: raw | ||
- key: TOKEN | ||
value: "%TOKEN_PLACEHOLDER%" | ||
type: raw | ||
- key: ORG_ID | ||
value: "%ORG_ID_PLACEHOLDER%" | ||
type: raw | ||
- key: ENV_ID | ||
value: "%ENV_ID_PLACEHOLDER%" | ||
type: raw | ||
- key: POKESHOP_URL | ||
value: https://pokeshop.localdev:30000 | ||
type: raw | ||
# This placeholder exists because when we try to run the tests testsuite, | ||
# the cli will ask for the | ||
- key: CREATED_TEST_ID | ||
value: PLACEHOLDER | ||
type: raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters