Skip to content

Commit

Permalink
test: test all flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir David authored and Tamir David committed Oct 20, 2024
1 parent 53b5baa commit a3e7640
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
57 changes: 28 additions & 29 deletions .github/workflows/cross-cloud-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ jobs:
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
# - name: Build and Tag Docker Images
# env:
# COMMIT_HASH: ${{ github.sha }}
# run: |
# # Build images
# make build-images TAG=${COMMIT_HASH}
# # Tag images for public ECR
# docker tag keyval/odigos-collector:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-collector:${COMMIT_HASH}
# docker tag keyval/odigos-instrumentor:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-instrumentor:${COMMIT_HASH}
# docker tag keyval/odigos-ui:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-ui:${COMMIT_HASH}
# docker tag keyval/odigos-scheduler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-scheduler:${COMMIT_HASH}
# docker tag keyval/odigos-autoscaler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-autoscaler:${COMMIT_HASH}
# docker tag keyval/odigos-odiglet:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-odiglet:${COMMIT_HASH}

# docker push public.ecr.aws/y2v0v6s7/keyval/odigos-collector:${COMMIT_HASH}
# docker push public.ecr.aws/y2v0v6s7/keyval/odigos-instrumentor:${COMMIT_HASH}
# docker push public.ecr.aws/y2v0v6s7/keyval/odigos-ui:${COMMIT_HASH}
# docker push public.ecr.aws/y2v0v6s7/keyval/odigos-scheduler:${COMMIT_HASH}
# docker push public.ecr.aws/y2v0v6s7/keyval/odigos-autoscaler:${COMMIT_HASH}
# docker push public.ecr.aws/y2v0v6s7/keyval/odigos-odiglet:${COMMIT_HASH}
- name: Build and Tag Docker Images
env:
COMMIT_HASH: ${{ github.sha }}
run: |
# Build images
make build-images TAG=${COMMIT_HASH}
# Tag images for public ECR
docker tag keyval/odigos-collector:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-collector:${COMMIT_HASH}
docker tag keyval/odigos-instrumentor:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-instrumentor:${COMMIT_HASH}
docker tag keyval/odigos-ui:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-ui:${COMMIT_HASH}
docker tag keyval/odigos-scheduler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-scheduler:${COMMIT_HASH}
docker tag keyval/odigos-autoscaler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-autoscaler:${COMMIT_HASH}
docker tag keyval/odigos-odiglet:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-odiglet:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-collector:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-instrumentor:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-ui:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-scheduler:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-autoscaler:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-odiglet:${COMMIT_HASH}
test:
permissions:
Expand Down Expand Up @@ -189,27 +189,26 @@ jobs:
- name: Run E2E Tests
run: |
# This uses in chainsaw to split e2e tests from cross cloud tests
export MODE=cross-cloud-tests
# This uses in chainsaw to verify the odigos version is equal to the commit version
# export COMMIT_HASH=${{ github.sha }}
export COMMIT_HASH=3885bfa0213d47e49b90ca00e9a0e1e7ab58688d
export COMMIT_HASH=${{ github.sha }}
chainsaw test tests/e2e/${{ matrix.test-scenario }}
# - name: Destroy Resources
# if: always() # Ensures this runs even if earlier steps fail
# run: |
# tofu -chdir=$TF_DIR destroy -auto-approve
- name: Destroy Resources
if: always() # Ensures this runs even if earlier steps fail
run: |
tofu -chdir=$TF_DIR destroy -auto-approve
# Notify Slack on Failure or Cancellation
- name: Notify Slack on Failure or Cancellation
if: ${{ failure() || cancelled() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }}
SLACK_WEBHOOK_URL: ${{ secrets.CLOUD_PROVIDERS_TESTS_WEBHOOK_URL }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
Expand All @@ -221,7 +220,7 @@ jobs:
- name: Notify Slack on Success
if: ${{ success() }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ODIGOS_RELEASE_STATUS_WEBHOOK_URL }}
SLACK_WEBHOOK_URL: ${{ secrets.CLOUD_PROVIDERS_TESTS_WEBHOOK_URL }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/helm-chart/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
# "build" complete helm chart by copying CRDs into the template folder
cp -r $P/api/config/crd/bases/* $P/helm/odigos/templates/crds/
if [ "$MODE" = "cross-cloud-tests" ]; then
helm upgrade --install odigos $P/helm/odigos --create-namespace --namespace odigos-test-ns --set image.tag=3885bfa0213d47e49b90ca00e9a0e1e7ab58688d --set imagePrefix=public.ecr.aws/y2v0v6s7
helm upgrade --install odigos $P/helm/odigos --create-namespace --namespace odigos-test-ns --set image.tag="$COMMIT_HASH" --set imagePrefix=public.ecr.aws/y2v0v6s7
else
helm upgrade --install odigos $P/helm/odigos --create-namespace --namespace odigos-test-ns --set image.tag=e2e-test
fi
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/multi-apps/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
- script:
content: |
if [ "$MODE" = "cross-cloud-tests" ]; then
../../../cli/odigos install --version 3885bfa0213d47e49b90ca00e9a0e1e7ab58688d --image-prefix=public.ecr.aws/y2v0v6s7
../../../cli/odigos install --version "$COMMIT_HASH" --image-prefix=public.ecr.aws/y2v0v6s7
else
../../../cli/odigos install --version e2e-test
fi
Expand Down

0 comments on commit a3e7640

Please sign in to comment.