From 8e4b28d17ebbeb0858a8f5f6d57d2b6ec36cc11d Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Wed, 4 Aug 2021 17:29:17 -0400 Subject: [PATCH] build(dev,proxy): ent-3643 activate chrome2 for local run (#757) * build, custom release, unused params, dev branches * docs, release process expanded --- .env | 3 --- .env.development | 3 +-- .env.proxy | 2 +- .travis/custom_release.sh | 5 +++-- CONTRIBUTING.md | 1 + config/webpack.dev.config.js | 2 +- config/webpack.proxy.config.js | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.env b/.env index 66042da92..1ca1dfb26 100644 --- a/.env +++ b/.env @@ -31,9 +31,6 @@ REACT_APP_CONFIG_SERVICE_LOCALES=${UI_DEPLOY_PATH_PREFIX}/apps/subscriptions/loc REACT_APP_CONFIG_SERVICE_LOCALES_PATH=${UI_DEPLOY_PATH_PREFIX}/apps/subscriptions/locales/{{lng}}.json REACT_APP_CONFIG_SERVICE_LOCALES_EXPIRE=604800000 -REACT_APP_INCLUDE_CONTENT_HEADER= -REACT_APP_INCLUDE_CONTENT_BODY= - REACT_APP_SERVICES_RHSM_VERSION=/api/rhsm-subscriptions/v1/version REACT_APP_SERVICES_RHSM_REPORT=/api/rhsm-subscriptions/v1/tally/products/ REACT_APP_SERVICES_RHSM_CAPACITY=/api/rhsm-subscriptions/v1/capacity/products/ diff --git a/.env.development b/.env.development index 529cb1cba..838cd0cd5 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,7 @@ DEV_PORT=3000 -DEV_BRANCH=prod-stable +DEV_BRANCH=ci-beta REACT_APP_ENV=development -REACT_APP_UI_DEPLOY_PATH_PREFIX=/beta REACT_APP_CONFIG_SERVICE_LOCALES=/locales/locales.json REACT_APP_CONFIG_SERVICE_LOCALES_PATH=/locales/{{lng}}.json diff --git a/.env.proxy b/.env.proxy index 90f731ab4..7a3d22db4 100644 --- a/.env.proxy +++ b/.env.proxy @@ -1,5 +1,5 @@ DEV_PORT=443 -DEV_BRANCH=ci-stable +DEV_BRANCH=ci-beta REACT_APP_ENV=review diff --git a/.travis/custom_release.sh b/.travis/custom_release.sh index 0599eb0cf..28c3e0236 100755 --- a/.travis/custom_release.sh +++ b/.travis/custom_release.sh @@ -1,13 +1,14 @@ #!/bin/bash # # -# Release a branch +# Release a branch. APP_BUILD_DIR should be updated at the Travis configuration level. release() { local DEPLOY_BRANCH=$1 + local BUILD_DIR=$APP_BUILD_DIR printf "${YELLOW}PUSHING ${DEPLOY_BRANCH}${NOCOLOR}\n" - rm -rf ./dist/.git + rm -rf "./${BUILD_DIR}/.git" .travis/release.sh "${DEPLOY_BRANCH}" printf "${GREEN}COMPLETED ${DEPLOY_BRANCH}${NOCOLOR}\n" } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0fc547c0..ee3e8053a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -102,6 +102,7 @@ It is required that all work is handled through GitHub's fork and pull workflow. ### Releases and Tagging 1. Merging a PR into `master` is considered production ready. 1. Merging a PR into `master` doesn't require tagging and [CHANGELOG.md](./CHANGELOG.md) updates. +1. Running `$ yarn release` after commits are merged into `master` generates the release commit and [CHANGELOG.md](./CHANGELOG.md). You may need to update/pull tags prior to running this command. This commit should be pushed towards `master`. This release commit is currently used as a purposeful block and may be automated in the future. [The commit message is recognized in the release script](./.travis/custom_release.sh#L41). This commit format controls when files are pushed towards production stable, and gives development a fallback when something goes wrong. 1. Tagging and `CHANGELOG.md` updates should be coordinated against a consistent release cycle, and can take place at an independent time. 1. Tagging should make use of semver. 1. Manipulating tags against commits directly should be avoided in favor of a semantic version increment, iteration. diff --git a/config/webpack.dev.config.js b/config/webpack.dev.config.js index 4e0bf7820..332d4cc8a 100644 --- a/config/webpack.dev.config.js +++ b/config/webpack.dev.config.js @@ -13,7 +13,7 @@ const { config: webpackConfig, plugins } = config({ env: (/(prod|qa|ci)(-stable|-beta)$/.test(DEV_BRANCH) && DEV_BRANCH) || 'prod-stable', port: Number.parseInt(DEV_PORT, 10), rootFolder: _BUILD_RELATIVE_DIRNAME, - skipChrome2: true, + skipChrome2: false, standalone: true, useProxy: false, htmlPlugin: setHtmlPlugin(), diff --git a/config/webpack.proxy.config.js b/config/webpack.proxy.config.js index cf8653956..892e2051d 100644 --- a/config/webpack.proxy.config.js +++ b/config/webpack.proxy.config.js @@ -21,7 +21,7 @@ const { config: webpackConfig, plugins } = config({ port: Number.parseInt(DEV_PORT, 10), rootFolder: _BUILD_RELATIVE_DIRNAME, routes: setProxyRoutes({ DEV_PORT, BETA_PREFIX }), - skipChrome2: true, + skipChrome2: false, standalone: false, useCloud: (!/prod-(beta|stable)$/.test(DEV_BRANCH) && true) ?? false, useProxy: true,