@@ -12,46 +12,68 @@ lint:
1212 poetry run flake8 scripts/* .py --config .flake8
1313 shellcheck scripts/* .sh
1414
15- test :
16- poetry run scripts/download_dependencies.py
15+ test : download-dependencies
1716 mvn test
1817
1918check-licences :
2019 scripts/check_python_licenses.sh
2120 mvn validate
2221
2322clean-packages :
24- rm -f src/main/resources/* .tgz
23+ rm -f src/main/resources/package/ * .tgz
2524
2625clean : clean-packages
2726 rm -rf target
2827 mvn clean
28+ rm -rf .aws-sam
2929
3030update-manifest :
3131 poetry run scripts/update_manifest.py
3232
33- build :
34- poetry run scripts/download_dependencies.py
33+ build : download-dependencies
3534 mvn package
3635
3736build-latest : clean-packages update-manifest build
3837
3938run :
4039 mvn spring-boot:run
4140
41+ download-dependencies :
42+ poetry run scripts/download_dependencies.py
43+
4244sam-validate :
4345 sam validate --template-file SAMtemplates/main_template.yaml --region eu-west-2
4446 sam validate --template-file SAMtemplates/lambda_resources.yaml --region eu-west-2
4547
46-
47- sam-build : sam-validate
48+ sam-build : sam-validate download-dependencies
4849 sam build --template-file SAMtemplates/main_template.yaml --region eu-west-2
4950
50- sam-sync : guard-AWS_DEFAULT_PROFILE guard-stack_name
51+ sam-sync : guard-AWS_DEFAULT_PROFILE guard-stack_name download-dependencies
5152 sam sync \
5253 --stack-name $$ stack_name \
5354 --watch \
5455 --template-file SAMtemplates/main_template.yaml
5556
57+ sam-deploy-package : guard-artifact_bucket guard-artifact_bucket_prefix guard-stack_name guard-template_file guard-cloud_formation_execution_role guard-VERSION_NUMBER guard-COMMIT_ID guard-LOG_LEVEL guard-LOG_RETENTION_DAYS
58+ sam deploy \
59+ --template-file $$ template_file \
60+ --stack-name $$ stack_name \
61+ --capabilities CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND \
62+ --region eu-west-2 \
63+ --s3-bucket $$ artifact_bucket \
64+ --s3-prefix $$ artifact_bucket_prefix \
65+ --config-file samconfig_package_and_deploy.toml \
66+ --no-fail-on-empty-changeset \
67+ --role-arn $$ cloud_formation_execution_role \
68+ --no-confirm-changeset \
69+ --force-upload \
70+ --tags " version=$$ VERSION_NUMBER" \
71+ --parameter-overrides \
72+ EnableSplunk=true \
73+ VersionNumber=$$ VERSION_NUMBER \
74+ CommitId=$$ COMMIT_ID \
75+ LogLevel=$$ LOG_LEVEL \
76+ LogRetentionDays=$$ LOG_RETENTION_DAYS
77+
5678aws-login :
5779 aws sso login --sso-session sso-session
0 commit comments