Skip to content

Commit

Permalink
Added support for int project
Browse files Browse the repository at this point in the history
  • Loading branch information
tysseng committed Mar 20, 2024
1 parent bb61de9 commit a51abc3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .env.int
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ENVIRONMENT=int
KAFKA_BROKER=entur-kafka-test-int-entur-test.aivencloud.com:11877
KAFKA_SCHEMA_REGISTRY=https://entur-kafka-test-int-entur-test.aivencloud.com:11867

KAFKA_TOPICS=payment-events-dev,ticket-distribution-group-events-dev,customer-changed-dev

ENTUR_POS_NATIVE = Entur App Int
ENTUR_POS_WEB = Entur Web Int
4 changes: 4 additions & 0 deletions app-int.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
runtime: nodejs16
service: bff-kafka
manual_scaling:
instances: 1
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"build:staging": "tsc && npm run populate-env-vars staging",
"build:prod": "tsc && npm run populate-env-vars prod",
"build:beta": "tsc && npm run populate-env-vars beta",
"build:int": "tsc && npm run populate-env-vars int",
"deploy": "./scripts/deploy.sh",
"ts": "tsc --noEmit",
"transpile": "tsc",
Expand Down
4 changes: 3 additions & 1 deletion scripts/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

ENV="${1:-dev}"

if ! [[ "$ENV" =~ ^(dev|staging|prod|beta)$ ]]; then
if ! [[ "$ENV" =~ ^(dev|staging|prod|beta|int)$ ]]; then
echo -e "🙈 Invalid ENV: $ENV\n"
exit 1
fi
Expand All @@ -16,6 +16,8 @@ elif [[ $ENV = "beta" ]]; then
PROJECT="ent-enturbeta-prd"
elif [[ $ENV = "prod" ]]; then
PROJECT="entur-prod"
elif [[ $ENV = "int" ]]; then
PROJECT="ent-enturint-dev"
fi

# path to environment specific credential keys used when looking up secrets
Expand Down
4 changes: 3 additions & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
function deploy {
ENV="${1:-dev}"

if ! [[ "$ENV" =~ ^(dev|staging|prod|beta)$ ]]; then
if ! [[ "$ENV" =~ ^(dev|staging|prod|beta|int)$ ]]; then
echo -e "🙈 Invalid ENV: $ENV\n"
exit 1
fi
Expand All @@ -27,6 +27,8 @@ function deploy {
PROJECT="ent-enturbeta-prd"
elif [[ $ENV = "prod" ]]; then
PROJECT="entur-prod"
elif [[ $ENV = "int" ]]; then
PROJECT="ent-enturint-dev"
fi

echo " 🧵 Linting ..."
Expand Down
2 changes: 2 additions & 0 deletions src/utils/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export const getProjectId = (): string => {
return 'ent-enturbeta-prd'
} else if (ENVIRONMENT === 'prod') {
return 'entur-prod'
} else if (ENVIRONMENT === 'int') {
return 'ent-enturint-dev'
} else {
return 'ent-enturapp-dev'
}
Expand Down

0 comments on commit a51abc3

Please sign in to comment.