Commit f4be446c authored by Vadzim Kulyba (EPAM)'s avatar Vadzim Kulyba (EPAM)
Browse files

feat(azure): add after script for azure_copy_dag stage v.3

parent 942df58f
Pipeline #84592 failed with stages
in 9 minutes and 2 seconds
......@@ -146,7 +146,18 @@ azure_build_dag:
azure_copy_dag:
needs: ["azure_build_dag"]
after_script:
- echo "Preparing variables for generate SAS token"
- EXPIRE=$(date -u -d "59 minutes" '+%Y-%m-%dT%H:%M:%SZ')
- START=$(date -u -d "-1 minute" '+%Y-%m-%dT%H:%M:%SZ')
- accountKey=$(kubectl get secret airflow -n osdu -o jsonpath='{.data.azurestorageaccountkey}' | base64 -d)
- accountName=$(kubectl get secret airflow -n osdu -o jsonpath='{.data.azurestorageaccountname}' | base64 -d)
- AZURE_STORAGE_SAS_TOKEN=$(az storage account generate-sas --account-name $accountName --account-key $accountKey --start $START --expiry $EXPIRE --https-only --resource-types sco --services f --permissions cwdlur -o tsv)
- echo "Preparing k8s operator config for WITSML parser"
- configPath="https://${accountName}.file.core.windows.net/airflowdags/dags/witsml_parser_airflow_configs.yaml?${AZURE_STORAGE_SAS_TOKEN}"
- echo $configPath
- sed -i "s|IMAGE|$OSDU_AZURE_BASE_IMAGE_TAG|" devops/$OSDU_AZURE_POSTFIX/airflow_configs.yaml
......
Supports Markdown
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