-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade Rebuild on ECS * Create cloudformation template for resources * Create Pipeline Configs * Add string replacement function for environment.*.ts files * Update package-lock.json to include replace-in-file package. * Create new Dockerfile for cl builds. * creating beanstalk config so current build:prod command continues to work * add configurations to serve and e2e commands --------- Co-authored-by: danoswaltCL <[email protected]>
- Loading branch information
1 parent
4d6668e
commit 889fed0
Showing
15 changed files
with
1,023 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.dccache | ||
node_modules | ||
.vscode | ||
setup_upgrade.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
projectBuilderV5 ( | ||
buildAgent:[ | ||
image: "467155500999.dkr.ecr.us-east-1.amazonaws.com/jenkins-agent:default", | ||
cpu: 2048, | ||
memory: 4096 | ||
], | ||
|
||
projects: [ | ||
"upgrade-service":[ | ||
artifactType: "ecr", | ||
projectDir: "backend", | ||
runInProjectDir: true, | ||
versioning: "calendar", | ||
appInfrastructure: [ | ||
[file: "cloudformation/backend/app-infrastructure.yml"] | ||
], | ||
s3Context: [ | ||
glob: "backend/**/*,types/**/*,*.json" | ||
], | ||
fileFilter: [ | ||
include: ["types/.*","cloudformation/backend/app-infrastructure.yml"] | ||
], | ||
dockerConfig: [ | ||
dockerFile: "backend/cl.Dockerfile", | ||
requiresCodeArtifactToken: true, | ||
] | ||
], | ||
"upgrade":[ | ||
artifactType: 'codeartifact', | ||
projectDir: 'frontend', | ||
runInProjectDir: true, | ||
artifactDir: 'dist/upgrade', | ||
versioning: 'calendar', | ||
oneArtifactPerEnvironment: true, | ||
buildScripts: [ | ||
[ | ||
script: 'npm ci --no-audit', | ||
githubCheck: '${projectName} npm ci --no-audit', | ||
log: '${projectName}-npm-ci.log' | ||
], | ||
[ | ||
script: 'npm run build:project', | ||
log: '${projectName}-build.log', | ||
githubCheck: '${projectName}-build' | ||
] | ||
], | ||
envVars: [ | ||
API_BASE_URL: '@vault(secret/configs/upgrade/${environment}/API_BASE_URL)', | ||
BASE_HREF_PREFIX: '@vault(secret/configs/upgrade/${environment}/BASE_HREF_PREFIX)', | ||
GOOGLE_CLIENT_ID: '@vault(secret/configs/upgrade/${environment}/GOOGLE_CLIENT_ID)', | ||
], | ||
] | ||
], | ||
deployments: [ | ||
UpgradeService: [ | ||
projects: ["upgrade-service"], | ||
automated: [ | ||
[ | ||
type: "defaultBranch", | ||
environment: "qa" | ||
] | ||
], | ||
jobs: [ | ||
[ | ||
job: "Upgrade-Service-Deploy", | ||
type: "bluegreen" | ||
] | ||
] | ||
], | ||
Upgrade: [ | ||
projects: ["upgrade"], | ||
automated: [ | ||
[ | ||
type: "defaultBranch", | ||
environment: "qa" | ||
] | ||
], | ||
jobs: [ | ||
[ | ||
job: "Upgrade-Frontend-Deploy" | ||
] | ||
] | ||
], | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ARG IMAGE_REPO | ||
|
||
FROM ${IMAGE_REPO}node:18-alpine3.16 AS build | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN ls | ||
RUN npm ci --no-audit | ||
WORKDIR /usr/src/app/types | ||
RUN npm ci --no-audit | ||
RUN cp -R . ../backend/packages/Upgrade/types | ||
# ARG CODEARTIFACT_AUTH_TOKEN | ||
# ARG CODEARTIFACT_REGISTRY="//cli-467155500999.d.codeartifact.us-east-1.amazonaws.com/npm/cli-npm-artifacts/" | ||
# RUN npm config set '${CODEARTIFACT_REGISTRY}:_authToken=${CODEARTIFACT_AUTH_TOKEN}' | ||
WORKDIR /usr/src/app/backend/packages/Upgrade | ||
RUN npm ci --no-audit | ||
|
||
WORKDIR /usr/src/app/backend/ | ||
RUN npm ci --no-audit | ||
RUN ["npm", "run", "build:upgrade"] | ||
|
||
FROM ${IMAGE_REPO}node:18-alpine3.16 | ||
|
||
ENV NEW_RELIC_NO_CONFIG_FILE=true | ||
ENV NR_NATIVE_METRICS_NO_BUILD=true | ||
ENV NODE_OPTIONS=--max_old_space_size=4096 | ||
|
||
WORKDIR /usr/src/app | ||
COPY --from=build /usr/src/app/backend ./ | ||
EXPOSE 3030 | ||
CMD ["npm", "run", "--silent", "production:upgrade"] |
Oops, something went wrong.