Skip to content

Commit 3652df9

Browse files
authored
Merge pull request #4787 from cloud-gov/fix-build-tasks-feature-flag
fix: Site build tasks feature flag
2 parents 79842e3 + 276548b commit 3652df9

File tree

5 files changed

+10
-32
lines changed

5 files changed

+10
-32
lines changed

ci/pipeline.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ do:
1414
params:
1515
APP_HOSTNAME: https://((((deploy-env))-pages-domain))
1616
PROXY_DOMAIN: sites.((((deploy-env))-pages-domain))
17-
FEATURE_BUILD_TASKS: "active"
1817
#@ if/end env != 'production':
1918
FEATURE_FILE_STORAGE_SERVICE: true
2019
#@ if/end env == 'production':

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ services:
4242
<<: *minioenv
4343
APP_HOSTNAME: http://localhost:1337
4444
DOMAIN: localhost:1337
45-
FEATURE_BUILD_TASKS: 'active'
4645
FEATURE_FILE_STORAGE_SERVICE: 'true'
4746
FEATURE_LOCAL_BUILD_REPORTS: 'active'
4847
FEATURE_LOCAL_S3_ENDPOINT: 'true'

frontend/hooks/useBuildTasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const useBuildTasks = (id) => {
1515
setResults({
1616
isLoading: false,
1717
buildTasks: data,
18-
hasBuildTasks: process.env.FEATURE_BUILD_TASKS === 'active' && data.length > 0,
18+
hasBuildTasks: data.length > 0,
1919
}),
2020
);
2121
}

frontend/pages/sites/$siteId/siteRoutes.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,13 @@ export default [
3939
title: 'Logs for build #',
4040
path: 'builds/:buildId/logs',
4141
},
42-
...(process.env.FEATURE_BUILD_TASKS === 'true'
43-
? [
44-
{
45-
Component: Reports,
46-
title: 'Report history',
47-
path: 'reports',
48-
icon: 'IconReport',
49-
showInSidebar: true,
50-
},
51-
]
52-
: []),
42+
{
43+
Component: Reports,
44+
title: 'Report history',
45+
path: 'reports',
46+
icon: 'IconReport',
47+
showInSidebar: true,
48+
},
5349
{
5450
Component: SiteSettings,
5551
title: 'Site settings',

frontend/pages/sites/$siteId/siteRoutes.test.jsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,16 @@ describe('siteRoutes', () => {
1818
});
1919

2020
describe('feature flags', () => {
21-
it('should include Reports when FEATURE_BUILD_TASKS is true', () => {
22-
process.env.FEATURE_BUILD_TASKS = 'true';
21+
it('should include Reports', () => {
2322
const routes = jest.requireActual('./siteRoutes').default;
2423
expect(routes.some((route) => route.path === 'reports')).toBe(true);
2524
});
2625

27-
it('should not include Reports when FEATURE_BUILD_TASKS is false', () => {
28-
process.env.FEATURE_BUILD_TASKS = 'false';
29-
const routes = jest.requireActual('./siteRoutes').default;
30-
expect(routes.some((route) => route.path === 'reports')).toBe(false);
31-
});
32-
33-
it('should include storage routes when FEATURE_FILE_STORAGE_SERVICE is true', () => {
34-
process.env.FEATURE_FILE_STORAGE_SERVICE = 'true';
26+
it('should include storage routes', () => {
3527
const routes = jest.requireActual('./siteRoutes').default;
3628
expect(routes.some((route) => route.path === 'storage')).toBe(true);
3729
expect(routes.some((route) => route.path === 'storage/logs')).toBe(true);
3830
});
39-
40-
// eslint-disable-next-line max-len
41-
it('should not include storage routes when FEATURE_FILE_STORAGE_SERVICE is false', () => {
42-
process.env.FEATURE_FILE_STORAGE_SERVICE = 'false';
43-
const routes = jest.requireActual('./siteRoutes').default;
44-
expect(routes.some((route) => route.path === 'storage')).toBe(true);
45-
expect(routes.some((route) => route.path === 'storage/logs')).toBe(false);
46-
});
4731
});
4832

4933
describe('each route Component', () => {

0 commit comments

Comments
 (0)