Skip to content

Commit

Permalink
fix: husky pre-commit hooks, prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuslia committed May 15, 2024
1 parent 7344049 commit 24a9679
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 27 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ node_modules

.idea/

# for lambda layer built packages
src/lambda_layer/requests/python/*
# for the lambda layer I built myself
!src/lambda_layer/dpo/python/*.py
!src/lambda_layer/dpo/python/setup.py
!src/lambda_layer/dpo/python/mtl.py
!src/lambda_layer/requests/*
# CDK asset staging directory
.cdk.staging
cdk.out
Expand Down
5 changes: 0 additions & 5 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
#!/usr/bin/env sh
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0

. "$(dirname -- "$0")/_/husky.sh"

npm run commitlint ${1}
9 changes: 2 additions & 7 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/usr/bin/env sh
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0

. "$(dirname -- "$0")/_/husky.sh"

if [ -z $RUN_PRE_COMMIT_HOOKS ]; then exit 0; fi
if [ -z $AWS_REGION ] || [ -z $ACCOUNT_RES ] || [ -z $RES_ACCOUNT_AWS_PROFILE ] || [ -z $CDK_QUALIFIER ] || [ -z $GIT_REPOSITORY ]; then
echo "Run 'source export_vars.sh' to export the mandatory variables for building the project"
exit 1;
fi

./scripts/check-audit.sh
./scripts/check-deps.sh
./scripts/build.sh
./scripts/test.sh
./scripts/cdk-synth.sh
./scripts/cdk-synth.sh
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Released]

## [1.2.2] - 2024-05-15

This is a bugfix release. Please check below the fixed items.

### Added
- Pre-commit hook verifies existence of mandatory environment variables
### Changed
- Updated CDK version to 2.140.0
- Updated 3rd party NPM libraries version
### Fixed
- Docker builds to go through VPC Proxy properly when Proxy is bind behind the VPC (DPP Outbound Proxy)
- Fixed IAM Resource Policy of the KMS Key used in the MonitoringStack which is used for publishing alerts to SNS
- Fixed husky pre-commit hook to allow upgrade to its latest version 9.x.x

## [1.2.1] - 2024-03-06

In this release we introduced the ability to customize and extend the list of available deployment stages. On top of the existing stages, you are allowed to define other stages differently from each other to support use cases where stages are not unified. We have also enabled AWS SSM ParameterStore to lookup for VPC ids stored there instead of passing them as plain text. Various bugfixes were also applied. **Please make sure to manually deploy the PipelineStack in your RES account as the CodeBuild Synth phase shell was changed from `sh` to `bash`, you can always refer to the instructions present in the README.md on how to run the ```cdk deploy``` command locally.**
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -7539,7 +7539,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


cicd-boot 1.2.1
cicd-boot 1.2.2
MIT*
MIT No Attribution

Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-verification.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"package-lock.json": "1c0587f19cf31175b18cb25ff72e50626bc39d4ee195512de2aca579cf19144c",
"package-lock.json": "917d1cb0dde9446e1e41f8a1a99942926c2832efa43bf3a541fbf3699504f887",
"license": {
"package.json": "439bd17a60c8f65dba3666e14ce7db538cf83e7622f8cfe95a9e5a07827b06be",
"package.json": "b80c50079970669c25900379b6f634de32883b5b57c7bbb7ca95faefda6fe4ed",
"src/lambda-layer/common/Pipfile": "53333eca42637e4ed066308b8c6c5282fe39d10c112e16e02f29db45ddf07eb5",
"projectList": "24951410902869c872facab060c4533d42b1f47e5c3aed0acd572937d8ab9f15"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cicd-boot",
"version": "1.2.1",
"version": "1.2.2",
"bin": {
"pipeline": "bin/app.ts"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-code-scan-security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ function shellcheck_scan() {
# Execute shellcheck
if [[ -z "$JUNIT_REPORT" ]]; then
find $PROJECT_ROOT -type f \( -name '*.sh' -o -name '*.bash' -o -name '*.ksh' -o -name '*.bashrc' -o -name '*.bash_profile' -o -name '*.bash_login' -o -name '*.bash_logout' \) \
-not -path "*/node_modules/*" -not -path "*/cdk.out/*" \
-not -path "*/node_modules/*" -not -path "*/cdk.out/*" -not -path "*/.husky/_/*" \
| xargs shellcheck -x --severity="$SHELLCHECK_SEVERITY"
else
if ! find $PROJECT_ROOT -type f \( -name '*.sh' -o -name '*.bash' -o -name '*.ksh' -o -name '*.bashrc' -o -name '*.bash_profile' -o -name '*.bash_login' -o -name '*.bash_logout' \) \
-not -path "*/node_modules/*" -not -path "*/cdk.out/*" \
-not -path "*/node_modules/*" -not -path "*/cdk.out/*" -not -path "*/.husky/_/*" \
| xargs shellcheck -x --severity="$SHELLCHECK_SEVERITY" -f checkstyle > "${JUNIT_REPORT_FOLDER}/shellcheck-checkstyle-results.xml"; then
CHECK_FAILED=1;
fi
Expand Down

0 comments on commit 24a9679

Please sign in to comment.