Skip to content

Commit 48b36cc

Browse files
authored
Revert "TT-610-Time-Tracker-Keys-Pipeline-ENV (#845)" (#848)
This reverts commit 947f45f.
1 parent 947f45f commit 48b36cc

File tree

4 files changed

+14
-23
lines changed

4 files changed

+14
-23
lines changed

.github/workflows/CI-time-tracker-ui.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
STACK_EXCHANGE_ACCESS_TOKEN: ${{ secrets.STACK_EXCHANGE_ACCESS_TOKEN }}
4949
AZURE_APP_CONFIGURATION_CONNECTION_STRING: ${{ secrets.AZURE_APP_CONFIGURATION_CONNECTION_STRING }}
5050
run: |
51-
chmod +x ./scripts/populate-var-file.sh
52-
sh ./scripts/populate-var-file.sh
51+
chmod +x ./scripts/populate-keys.sh
52+
sh ./scripts/populate-keys.sh
5353
5454
- name: Running tests
5555
run: npm run ci-test --if-present

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cleanup: ## Delete image timetracker_ui
1919

2020
.PHONY: run
2121
run: ## Execute timetracker_ui docker containe.
22-
docker-compose up -d
22+
docker-compose --env-file ./.env up -d
2323

2424
.PHONY: logs
2525
logs: ## Show logs of timetracker_ui.
@@ -40,12 +40,12 @@ remove: ## Delete container timetracker_ui.
4040

4141
.PHONY: test
4242
test: ## Run all tests on docker container timetracker_ui at the CLI.
43-
docker-compose -f docker-compose.yml up -d
43+
docker-compose -f docker-compose.yml --env-file ./.env up -d
4444
docker exec timetracker_ui bash -c "npm run ci-test"
4545

4646
.PHONY: testdev
4747
testdev: ## Run all tests on docker container timetracker_ui at the Dev
48-
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
48+
docker-compose -f docker-compose.yml -f docker-compose.dev.yml --env-file ./.env up -d
4949
docker exec timetracker_ui bash -c "npm run ci-test"
5050

5151
.PHONY: publish

scripts/populate-var-file.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

scripts/setenv.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
const { writeFile } = require('fs');
2+
require('dotenv').config();
23

34
const pathJs = `./src/environments/keys.ts`
4-
const contentKeys =
5-
`export const AUTHORITY = '${process.env["AUTHORITY"]}';
6-
export const CLIENT_ID = '${process.env["CLIENT_ID"]}';
7-
export const SCOPES = ['${process.env["SCOPES"]}'];
8-
export const STACK_EXCHANGE_ID = '${process.env["STACK_EXCHANGE_ID"]}';
9-
export const STACK_EXCHANGE_ACCESS_TOKEN = '${process.env["STACK_EXCHANGE_ACCESS_TOKEN"]}';
10-
export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = '${process.env["AZURE_APP_CONFIGURATION_CONNECTION_STRING"]}';
5+
const contentKeys =
6+
`export const AUTHORITY = '${process.env.AUTHORITY}';
7+
export const CLIENT_ID = '${process.env.CLIENT_ID}';
8+
export const SCOPES = ['${process.env.SCOPES}'];
9+
export const STACK_EXCHANGE_ID = '${process.env.STACK_EXCHANGE_ID}';
10+
export const STACK_EXCHANGE_ACCESS_TOKEN = '${process.env.STACK_EXCHANGE_ACCESS_TOKEN}';
11+
export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = '${process.env.AZURE_APP_CONFIGURATION_CONNECTION_STRING}';
1112
`;
1213

1314
writeFile(pathJs, contentKeys, function (err) {
@@ -18,7 +19,7 @@ writeFile(pathJs, contentKeys, function (err) {
1819
});
1920

2021
const pathJson = `./src/environments/.keys.json`
21-
const contentKeysJson =
22+
const contentKeysJson =
2223
`{
2324
"authority": "${process.env.AUTHORITY_JSON}",
2425
"client_id": "${process.env.CLIENT_ID_JSON}",

0 commit comments

Comments
 (0)