Commit 73ff1aa2 authored by harshit aggarwal's avatar harshit aggarwal
Browse files

init

parent 48836725
Pipeline #54792 passed with stage
in 39 seconds
......@@ -45,31 +45,15 @@ azure_test_dag:
stage: integration
needs: ["compile-and-unit-test"]
variables:
AZURE_SERVICE: csv-parser
AZURE_TENANT_ID: $AZURE_TENANT_ID
KEYVAULT_URI: $AZURE_KEYVAULT_URI
partition_service_endpoint: https://${AZURE_DNS_NAME}/api/partition/v1
storage_service_endpoint: https://${AZURE_DNS_NAME}/api/storage/v2
schema_service_endpoint: https://${AZURE_DNS_NAME}/api/schema-service/v1
search_service_endpoint: https://${AZURE_DNS_NAME}/api/search/v2
unit_service_endpoint: https://${AZURE_DNS_NAME}/api/unit/v2/unit/symbol
legal_service_endpoint: https://${AZURE_DNS_NAME}/api/legal/v1
file_service_endpoint: https://${AZURE_DNS_NAME}/api/file/v2
DMS_KIND: opendes:testcsv:wellbore:1.0.0
DMS_ACL: data.default.viewers@opendes.contoso.com
DMS_LEGAL_TAG: opendes-public-usa-dataset-7643990
aad_client_id: $AZURE_APP_ID
AZURE_AD_TENANT_ID: $AZURE_TENANT_ID
AZURE_CLIENT_ID: $AZURE_PRINCIPAL_ID
AZURE_CLIENT_SECRET: $AZURE_PRINCIPAL_SECRET
AZURE_AD_APP_RESOURCE_ID: $AZURE_APP_ID
DATA_PARTITION_ID: opendes
extends:
- .azure_variables
docker_image: ${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}:${CI_COMMIT_SHA}
before_script:
- |
build_args=$(echo "--build-arg AZURE_TENANT_ID=$AZURE_TENANT_ID --build-arg AZURE_AD_APP_RESOURCE_ID=$AZURE_APP_ID --build-arg AZURE_CLIENT_ID=$AZURE_PRINCIPAL_ID --build-arg AZURE_CLIENT_SECRET=$AZURE_PRINCIPAL_SECRET --build-arg aad_client_id=$AZURE_APP_ID --build-arg KEYVAULT_URI=$AZURE_KEYVAULT_URI --build-arg AZURE_DNS_NAME=$AZURE_DNS_NAME --build-arg DMS_KIND=opendes:testcsv:wellbore:1.0.0 --build-arg DMS_ACL=data.default.viewers@opendes.contoso.com --build-arg DMS_LEGAL_TAG=opendes-public-usa-dataset-7643990 --build-arg DATA_PARTITION_ID=opendes --build-arg partition_service_endpoint=https://$AZURE_DNS_NAME/api/partition/v1 --build-arg storage_service_endpoint=https://$AZURE_DNS_NAME/api/storage/v2 --build-arg schema_service_endpoint=https://$AZURE_DNS_NAME/api/schema-service/v1 --build-arg search_service_endpoint=https://$AZURE_DNS_NAME/api/search/v2 --build-arg unit_service_endpoint=https://$AZURE_DNS_NAME/api/unit/v2/unit/symbol --build-arg legal_service_endpoint=https://$AZURE_DNS_NAME/api/legal/v1 --build-arg file_service_endpoint=https://$AZURE_DNS_NAME/api/file/v2" )
script:
- mvn clean install -pl $AZURE_PARSER_BUILD_SUBDIR -am
- mvn clean verify -f $AZURE_TEST_SUBDIR/pom.xml
- |
# This will execute the maven tests
docker build -t $docker_image --file $AZURE_DEPLOYMENTS_SCRIPTS_SUBDIR/dockerFolder/run_standalone_tests_dockerfile $build_args .
only:
variables:
- $AZURE == 'true'
......@@ -94,11 +78,11 @@ azure_create_dag:
extends:
- .azure_variables
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- az --version
- az login --service-principal -u $AZURE_PRINCIPAL_ID -p $AZURE_PRINCIPAL_SECRET --tenant $AZURE_TENANT_ID
script:
- |
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
az --version
az login --service-principal -u $AZURE_PRINCIPAL_ID -p $AZURE_PRINCIPAL_SECRET --tenant $AZURE_TENANT_ID
# Generating environment file to be passed while running the docker container
cat > .env << EOF
CI_REGISTRY_USER=${CI_REGISTRY_USER}
......@@ -119,6 +103,7 @@ azure_create_dag:
AZURE_DNS_NAME=$AZURE_DNS_NAME
EOF
script:
- docker build -t $CI_REGISTRY_IMAGE/$PARSER_IMAGE-orchestrator --file $AZURE_DEPLOYMENTS_SCRIPTS_SUBDIR/dockerFolder/output_dags_dockerfile .
- |
......@@ -358,7 +343,7 @@ azure_dag_end_to_end_test:
needs: ["azure_register_dag"]
variables:
IMAGE_NAME: ${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}:${CI_COMMIT_SHA}
script:
before_script:
- |
# Generating environment file to be passed while running the docker container
cat > .env << EOF
......@@ -373,6 +358,8 @@ azure_dag_end_to_end_test:
AZURE_TEST_SCHEMA_FILE_PATH=${AZURE_TEST_SCHEMA_FILE_PATH}
EOF
script:
- |
docker build -t $IMAGE_NAME-run-tests --file $AZURE_DEPLOYMENTS_SCRIPTS_SUBDIR/dockerFolder/end_to_end_tests_dockerfile .
docker run --env-file .env $IMAGE_NAME-run-tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment