From 2fb151e0258048ff3103bc7c64a403844f5a7117 Mon Sep 17 00:00:00 2001 From: artronics Date: Tue, 24 Jan 2023 12:07:11 +0000 Subject: [PATCH] AMB-000 run smoke tests --- azure/azure-release-pipeline.yml | 4 ++-- azure/templates/run-smoke-tests.yml | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 azure/templates/run-smoke-tests.yml diff --git a/azure/azure-release-pipeline.yml b/azure/azure-release-pipeline.yml index 92779aa..c312f72 100644 --- a/azure/azure-release-pipeline.yml +++ b/azure/azure-release-pipeline.yml @@ -51,10 +51,10 @@ extends: - environment: sandbox proxy_path: sandbox post_deploy: - - template: ./templates/run-integration-tests.yml + - template: ./templates/run-smoke-tests.yml - environment: int depends_on: - internal_qa - internal_qa_sandbox post_deploy: - - template: ./templates/run-integration-tests.yml + - template: ./templates/run-smoke-tests.yml diff --git a/azure/templates/run-smoke-tests.yml b/azure/templates/run-smoke-tests.yml new file mode 100644 index 0000000..c237fba --- /dev/null +++ b/azure/templates/run-smoke-tests.yml @@ -0,0 +1,24 @@ +steps: + - bash: | + make install-python + workingDirectory: $(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME) + displayName: Setup pytests + + - bash: | + export RELEASE_RELEASEID=$(Build.BuildId) + export SOURCE_COMMIT_ID=$(Build.SourceVersion) + export APIGEE_ENVIRONMENT="$(ENVIRONMENT)" + export SERVICE_BASE_PATH="$(SERVICE_BASE_PATH)" + export STATUS_ENDPOINT_API_KEY="$(status-endpoint-api-key)" + export APIGEE_API_TOKEN="$(secret.AccessToken)" + + poetry run pytest -v -m smoketest -o junit_logging=all --junitxml=smoke_tests_report.xml + workingDirectory: $(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/tests + displayName: run smoke tests + + - task: PublishTestResults@2 + displayName: 'Publish smoketest results' + condition: always() + inputs: + testResultsFiles: '$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/tests/smoke_tests_report.xml' + failTaskOnFailedTests: true