Skip to content

Commit

Permalink
Merge pull request #14 from IATI/develop
Browse files Browse the repository at this point in the history
fix: add missing deployment env var
  • Loading branch information
simon-20 authored Sep 13, 2024
2 parents 1b7a075 + 428086f commit cfc2e87
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ jobs:
DATA_REGISTRY_BASE_URL: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'DATA_REGISTRY_BASE_URL')] }}
DATA_REGISTRY_PUBLISHER_METADATA_URL: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'DATA_REGISTRY_PUBLISHER_METADATA_URL')] }}
DATA_REGISTRY_PUBLISHER_METADATA_REFRESH_AFTER_HOURS: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'DATA_REGISTRY_PUBLISHER_METADATA_REFRESH_AFTER_HOURS')] }}
WEB_BASE_URL: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'WEB_BASE_URL')] }}
NUMBER_DOWNLOADER_THREADS: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'NUMBER_DOWNLOADER_THREADS')] }}
FORCE_REDOWNLOAD_AFTER_HOURS: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'FORCE_REDOWNLOAD_AFTER_HOURS')] }}
REMOVE_LAST_GOOD_DOWNLOAD_AFTER_FAILING_HOURS: ${{ vars[format('{0}_{1}', env.TARGET_ENVIRONMENT_UPPER, 'REMOVE_LAST_GOOD_DOWNLOAD_AFTER_FAILING_HOURS')] }}
Expand Down
11 changes: 11 additions & 0 deletions azure-provision/add-default-config-to-github-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,20 @@ fi

TARGET_ENVIRONMENT="$1"

WEB_BASE_URL_PREFIX=$([[ "$TARGET_ENVIRONMENT" == "prod" ]] && echo "" || echo "${TARGET_ENVIRONMENT}-")

SUBDOMAIN="${WEB_BASE_URL_PREFIX}bulk-data"

CUSTOM_DOMAIN="${SUBDOMAIN}.iatistandard.org"

WEB_BASE_URL="https://${CUSTOM_DOMAIN}"

echo $WEB_BASE_URL

cp -f azure-provision/default-github-config-template.env azure-provision/default-github-config.env

sed -i "s/^/${TARGET_ENVIRONMENT^^}/g" azure-provision/default-github-config.env
sed -i "s/{{TARGET_ENVIRONMENT}}/${TARGET_ENVIRONMENT}/g" azure-provision/default-github-config.env
sed -i "s#{{WEB_BASE_URL}}#${WEB_BASE_URL}#g" azure-provision/default-github-config.env

gh variable set --env-file ./azure-provision/default-github-config.env
2 changes: 1 addition & 1 deletion azure-provision/default-github-config-template.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ _FORCE_REDOWNLOAD_AFTER_HOURS=24
_NUMBER_DOWNLOADER_THREADS=25
_REMOVE_LAST_GOOD_DOWNLOAD_AFTER_FAILING_HOURS=72
_ZIP_WORKING_DIR=/tmp/bulk-data-service-zip
_WEB_BASE_URL="https://{{TARGET_ENVIRONMENT}}-bulk-data.iatistandard.org"
_WEB_BASE_URL="{{WEB_BASE_URL}}"
_CHECKER_LOOP_WAIT_MINS=20

0 comments on commit cfc2e87

Please sign in to comment.