diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index e6888be3..fd59b5c6 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -45,6 +45,7 @@ jobs: team: ${{secrets.HEROKU_TEAM}} appdir: server env: + HD_FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HD_ADO_PRINCIPAL: ${{ secrets.ADO_PRINCIPAL }} HD_AUTHORITY_HOST_URL: ${{ secrets.AUTHORITY_HOST_URL }} HD_CITYPAY_AGENCYID: ${{ secrets.CITYPAY_AGENCYID }} @@ -91,6 +92,7 @@ jobs: url: https://applicants.planninglabs.nyc runs-on: ubuntu-latest env: + FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HOST: ${{ vars.ZAP_API_HOST }} MAINTENANCE_START: ${{ vars.MAINTENANCE_START }} MAINTENANCE_END: ${{ vars.MAINTENANCE_END }} @@ -130,6 +132,7 @@ jobs: url: https://applicants.planning.nyc.gov runs-on: ubuntu-latest env: + FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HOST: ${{ vars.ZAP_API_HOST }} MAINTENANCE_START: ${{ vars.MAINTENANCE_START }} MAINTENANCE_END: ${{ vars.MAINTENANCE_END }} diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index d50f5785..5f6e1ef2 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -45,6 +45,7 @@ jobs: team: ${{secrets.HEROKU_TEAM}} appdir: server env: + HD_FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HD_ADO_PRINCIPAL: ${{ secrets.ADO_PRINCIPAL }} HD_AUTHORITY_HOST_URL: ${{ secrets.AUTHORITY_HOST_URL }} HD_CITYPAY_AGENCYID: ${{ secrets.CITYPAY_AGENCYID }} @@ -87,6 +88,7 @@ jobs: url: https://qa.applicant-portal.planninglabs.nyc runs-on: ubuntu-latest env: + FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HOST: ${{ vars.ZAP_API_HOST }} MAINTENANCE_START: ${{ vars.MAINTENANCE_START }} MAINTENANCE_END: ${{ vars.MAINTENANCE_END }} diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 401fad52..b2326ace 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -49,6 +49,7 @@ jobs: team: ${{ secrets.HEROKU_TEAM }} appdir: server env: + HD_FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HD_ADO_PRINCIPAL: ${{ secrets.ADO_PRINCIPAL }} HD_AUTHORITY_HOST_URL: ${{ secrets.AUTHORITY_HOST_URL }} HD_CLIENT_ID: ${{ secrets.CLIENT_ID }} @@ -78,6 +79,7 @@ jobs: url: https://staging.applicant-portal.planninglabs.nyc runs-on: ubuntu-latest env: + FEATURE_FLAG_SELF_SERVICE: ${{ vars.FEATURE_FLAG_SELF_SERVICE }} HOST: ${{ vars.ZAP_API_HOST }} MAINTENANCE_START: ${{ vars.MAINTENANCE_START }} MAINTENANCE_END: ${{ vars.MAINTENANCE_END }} diff --git a/client/config/environment.js b/client/config/environment.js index 5dc02313..cd98d15c 100644 --- a/client/config/environment.js +++ b/client/config/environment.js @@ -1,13 +1,15 @@ module.exports = function(environment) { const ENV = { - modulePrefix: 'client', + modulePrefix: "client", environment, - rootURL: '/', - locationType: 'auto', + rootURL: "/", + locationType: "auto", host: getHost(environment), NYCIDDomain: getOAuthDomain(environment), NYCIDLocation: getOAuthLoginEndpoint(environment), maintenanceTimes: getMaintenanceTimes(), + featureFlagSelfService: getFeatureFlagSelfService(), + EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build @@ -20,9 +22,9 @@ module.exports = function(environment) { }, fontawesome: { icons: { - 'free-brands-svg-icons': 'all', - 'free-regular-svg-icons': 'all', - 'free-solid-svg-icons': 'all', + "free-brands-svg-icons": "all", + "free-regular-svg-icons": "all", + "free-solid-svg-icons": "all", }, }, @@ -31,10 +33,10 @@ module.exports = function(environment) { // when it is created }, - 'labs-search': { - host: 'https://search-api-production.herokuapp.com', - route: 'search', - helpers: ['geosearch-v2', 'bbl'], + "labs-search": { + host: "https://search-api-production.herokuapp.com", + route: "search", + helpers: ["geosearch-v2", "bbl"], }, }; @@ -139,3 +141,7 @@ function getMaintenanceTimes() { return [MAINTENANCE_START, MAINTENANCE_END]; } + +function getFeatureFlagSelfService() { + return process.env.FEATURE_FLAG_SELF_SERVICE === "ON"; +} diff --git a/server/src/config/config.service.ts b/server/src/config/config.service.ts index 1acbf92d..f4a9d218 100644 --- a/server/src/config/config.service.ts +++ b/server/src/config/config.service.ts @@ -33,4 +33,10 @@ export class ConfigService { get(key: string): any { return this.envConfig[key]; } + + get featureFlag() { + return { + selfService: this.envConfig["FEATURE_FLAG_SELF_SERVICE"] === "ON" + } + } }