Skip to content

Commit

Permalink
added uploads host
Browse files Browse the repository at this point in the history
  • Loading branch information
robinkwilson committed Aug 20, 2021
1 parent f62b568 commit 764553f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -49,6 +51,7 @@ pipeline {
+ "\\\"${buildNumber}\\\" "
+ "\\\"${gitCommit}\\\" "
+ "\\\"${disableDeploy}\\\" "
+ "\\\"${uploadsHost}\\\" "
)
runCommand(habCommand)

Expand Down
2 changes: 2 additions & 0 deletions scripts/hab-build-and-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/utils/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
});
}
}
Expand Down Expand Up @@ -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
})
})
Expand Down

1 comment on commit 764553f

@michellebuzick06

This comment was marked as off-topic.

Please sign in to comment.