From 764553f8a503e5ae0913518adf01c29e05f79373 Mon Sep 17 00:00:00 2001 From: Robin K Wilson Date: Fri, 20 Aug 2021 11:27:22 -0700 Subject: [PATCH] added uploads host --- Jenkinsfile | 3 +++ scripts/hab-build-and-push.sh | 2 ++ src/utils/configs.js | 3 ++- webpack.config.js | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b6471bfbc0..2f4e9c8974 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,6 +34,8 @@ pipeline { def disableDeploy = env.DISABLE_DEPLOY def showQAPromoteCommand = env.SHOW_QA_PROMOTE_COMMAND def qaBuildsSlackChannel = env.QA_BUILDS_SLACK_CHANNEL + def qaBuildsSlackChannel = env.QA_BUILDS_SLACK_CHANNEL + def uploadsHost = env.UPLOADS_HOST def habCommand = ( "/bin/bash scripts/hab-build-and-push.sh " @@ -49,6 +51,7 @@ pipeline { + "\\\"${buildNumber}\\\" " + "\\\"${gitCommit}\\\" " + "\\\"${disableDeploy}\\\" " + + "\\\"${uploadsHost}\\\" " ) runCommand(habCommand) diff --git a/scripts/hab-build-and-push.sh b/scripts/hab-build-and-push.sh index af16746f93..3b7f014753 100755 --- a/scripts/hab-build-and-push.sh +++ b/scripts/hab-build-and-push.sh @@ -12,6 +12,7 @@ export GA_TRACKING_ID=$9 export BUILD_NUMBER=${10} export GIT_COMMIT=${11} export DISABLE_DEPLOY=${12} +export UPLOADS_HOST=${13} export BUILD_VERSION="${BUILD_NUMBER} (${GIT_COMMIT})" # Build the package, upload it, and start the service so we deploy to staging target. @@ -53,6 +54,7 @@ cors_proxy_server = $CORS_PROXY_SERVER non_cors_proxy_domains = $NON_CORS_PROXY_DOMAINS sentry_dsn = $SENTRY_DSN ga_tracking_id = $GA_TRACKING_ID +uploads_host = $UPLOADS_HOST [deploy] type = "$DEPLOY_TYPE" diff --git a/src/utils/configs.js b/src/utils/configs.js index 5c7342c229..c7c7d646b9 100644 --- a/src/utils/configs.js +++ b/src/utils/configs.js @@ -16,7 +16,8 @@ let isAdmin = false; "SENTRY_DSN", "GA_TRACKING_ID", "SHORTLINK_DOMAIN", - "BASE_ASSETS_PATH" + "BASE_ASSETS_PATH", + "UPLOADS_HOST" ].forEach(x => { const el = document.querySelector(`meta[name='env:${x.toLowerCase()}']`); configs[x] = el ? el.getAttribute("content") : process.env[x]; diff --git a/webpack.config.js b/webpack.config.js index c656813cb5..a7aa942b50 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -229,7 +229,8 @@ module.exports = async (env, argv) => { BASE_ASSETS_PATH: "https://hubs.local:8080/", RETICULUM_SERVER: "hubs.local:4000", POSTGREST_SERVER: "", - ITA_SERVER: "" + ITA_SERVER: "", + UPLOADS_HOST: "https://hubs.local:4000" }); } } @@ -643,6 +644,7 @@ module.exports = async (env, argv) => { SENTRY_DSN: process.env.SENTRY_DSN, GA_TRACKING_ID: process.env.GA_TRACKING_ID, POSTGREST_SERVER: process.env.POSTGREST_SERVER, + UPLOADS_HOST: process.env.UPLOADS_HOST, APP_CONFIG: appConfig }) })