-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
165 additions
and
81 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
export ENVIRONMENT=feature | ||
npm run lint | ||
npm run husky:test | ||
if [ "$(git rev-parse --abbrev-ref HEAD)" != "prod" ]; then | ||
export ENVIRONMENT=feature | ||
npm run lint | ||
npm run husky:test | ||
fi |
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,17 @@ | ||
#!/bin/bash | ||
|
||
ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account) | ||
|
||
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin $ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com | ||
|
||
LOCALSTACK_VERSION=0.14.1 | ||
aws ecr create-repository --repository-name localstack || true | ||
docker tag localstack/localstack:$LOCALSTACK_VERSION $ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/localstack:$LOCALSTACK_VERSION | ||
docker push $ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/localstack:$LOCALSTACK_VERSION | ||
|
||
# Create buildimage to provide faster builds | ||
BUILD_IMAGE_VERSION=1.0.3 | ||
REPO_TAG=$ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/hassu-buildimage:$BUILD_IMAGE_VERSION | ||
aws ecr create-repository --repository-name hassu-buildimage || true | ||
docker tag hassu-buildimage:$BUILD_IMAGE_VERSION $REPO_TAG | ||
docker push $REPO_TAG |
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,41 @@ | ||
version: 0.2 | ||
|
||
env: | ||
parameter-store: | ||
ROCKET_CHAT_TOKEN: /RocketChatToken | ||
ROCKET_CHAT_USER_ID: /RocketChatUserId | ||
secrets-manager: | ||
GITHUB_TOKEN: github-token | ||
|
||
phases: | ||
install: | ||
runtime-versions: | ||
java: corretto11 | ||
nodejs: 14 | ||
commands: | ||
- ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account) | ||
- aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin "$ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com" | ||
|
||
- nohup docker pull "$ACCOUNT_ID.dkr.ecr.eu-west-1.amazonaws.com/hassu-buildimage:1.0.3" & | ||
|
||
- npm install -g npm@8.1.3 | ||
- npm ci | ||
|
||
- touch .env.test | ||
- npm run generate | ||
build: | ||
commands: | ||
- npm run get-next-version | ||
- npm run deploy:database | ||
- npm run deploy:backend | ||
- npm run deploy:frontend | ||
- npm run release | ||
post_build: | ||
on-failure: ABORT | ||
commands: | ||
- ./deployment/bin/reportBuildStatus.sh -t "$ROCKET_CHAT_TOKEN" -u "$ROCKET_CHAT_USER_ID" -r "$CODEBUILD_BUILD_SUCCEEDING" -m "$ENVIRONMENT build" -d "CodeBuild $CODEBUILD_BUILD_URL" | ||
cache: | ||
paths: | ||
- "/root/.cache/**/*" | ||
- "/root/.npm/**/*" | ||
- "/root/.gradle/**/*" |
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
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
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
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
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