Skip to content

Commit

Permalink
Merge branch 'main' into github
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhokhar committed May 17, 2022
2 parents 8259ad0 + 8e2ed13 commit 46e38e5
Show file tree
Hide file tree
Showing 270 changed files with 7,154 additions and 4,580 deletions.
42 changes: 15 additions & 27 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ variables:

.common-build-steps: &common-build-steps # install dependencies
- cd ${CI_PROJECT_DIR}/source
- rush update
- rush install
# build
- rush build

Expand Down Expand Up @@ -66,8 +66,7 @@ stages:
- deployStage
- integrationTest
- deployLive
- upload
- triggerCpp
- release

### not working at the moment, therefore using artifacts as a temp workaround
# cache:
Expand Down Expand Up @@ -138,6 +137,7 @@ branchTest:
- export RUSH_PARALLELISM=8
- cd ${CI_PROJECT_DIR}
- bash -c source/cicd/buildproject_postbuild.bash
#
<<: *common-artifacts

test:
Expand All @@ -158,8 +158,7 @@ deployStage:
<<: *staging-variables
script:
- pushd source
# rush install
- rush update --purge
- rush install --purge
- popd
# export the location of the config
- export CODEBUILD_SRC_DIR_source_infrastructure="${CI_PROJECT_DIR}/${APP_CONFIG_DIR}"
Expand All @@ -178,8 +177,7 @@ integrationTest:
<<: *staging-variables
script:
- pushd source
# rush install
- rush update --purge
- rush install --purge
- popd
# export the location of the config
- export CODEBUILD_SRC_DIR_source_infrastructure="${CI_PROJECT_DIR}/${APP_CONFIG_DIR}"
Expand All @@ -195,33 +193,23 @@ deployLive:
script:
# deploy to live environment
- pushd source
# rush install
- rush update --purge
- rush install --purge
- popd
- export CODEBUILD_SRC_DIR_source_infrastructure="${CI_PROJECT_DIR}/${APP_CONFIG_DIR}"
- bash -c source/cicd/deployproject_build.bash
after_script:
- bash -c source/cicd/deployproject_postbuild.bash

upload:
before_script:
- yum update -y
- yum install -y git
release:
image:
name: public.ecr.aws/amazonlinux/amazonlinux:2
name: public.ecr.aws/lambda/nodejs:14
entrypoint: [""]
stage: upload
stage: release
before_script:
- *common-install-deployment-dependencies
rules:
- if: ($CI_COMMIT_BRANCH == "feat_command_and_control")
- *default-run-condition
script:
# Create archive based on latest commit
- git archive --format=zip --output=cdf.zip $CI_COMMIT_SHA
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file cdf.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/aws-connected-device-framework/${CI_JOB_ID}/cdf.zip"'

triggerCpp:
stage: triggerCpp
rules:
- if: ($CI_COMMIT_BRANCH == "feat_command_and_control")
trigger:
project: robotics-and-engineering-gsp/cdf/aws-connected-product-platform
branch: main
# Create release package
- tar -cvf ../aws-connected-device-framework.tar --exclude=node_modules --exclude=.git --exclude=dist --exclude=deploy --exclude=.history --exclude=temp .
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ../aws-connected-device-framework.tar "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/aws-connected-device-framework/${CI_JOB_ID}/aws-connected-device-framework.tar"'
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ The CDF modules form a layer above the AWS building blocks as shown in the follo
- [Tech Stack](source/docs/development/tech-stack.md)
- [Dependency Injection](source/docs/development/dependency-injection.md)
- [Unit testing](source/docs/development/unit-testing.md)
- [Integration tests](source/packages/integration-tests/README.md)

## Deployment

Expand Down
4 changes: 1 addition & 3 deletions source/.gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
pnpm-lock.yaml merge=binary
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary
repo-state.json merge=binary

# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic
# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor
Expand Down
2 changes: 1 addition & 1 deletion source/cicd/buildproject_prebuild.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ echo buildproject_prebuild started on `date`
cd source

echo Installing...
rush update
rush install


2 changes: 1 addition & 1 deletion source/cicd/deployproject_prebuild.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ echo deployproject_prebuild started on `date`
cd source

echo Installing...
rush update --purge
rush install --purge
2 changes: 1 addition & 1 deletion source/cicd/integrationtestsproject_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export CONFIG_LOCATION="${CODEBUILD_SRC_DIR_source_infrastructure}/integration-t

sed -i.bak '/.*BASE_URL.*/ d' $CONFIG_LOCATION

echo "GREENGRASSPROVISIONING_BASE_URL=${greengrass_provisioning_invoke_url}" >> $CONFIG_LOCATION
echo "GREENGRASS2PROVISIONING_BASE_URL=${greengrass_provisioning_invoke_url}" >> $CONFIG_LOCATION
echo "NOTIFICATIONS_BASE_URL=${notifications_invoke_url}" >> $CONFIG_LOCATION
echo "PROVISIONING_BASE_URL=${provisioning_invoke_url}" >> $CONFIG_LOCATION
echo "DEVICE_PATCHER_BASE_URL=${devicepatcher_invoke_url}" >> $CONFIG_LOCATION
Expand Down
2 changes: 1 addition & 1 deletion source/cicd/integrationtestsproject_prebuild.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ echo integrationtestsproject_prebuild started on `date`
cd source

echo Installing...
rush update --purge
rush install --purge

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions source/common/changes/@cdf/assetlibrary/main_2022-03-29-17-16.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@cdf/greengrass2-provisioning-client",
"comment": "fix(greengrasss2-client): minor env var naming update",
"type": "none"
}
],
"packageName": "@cdf/greengrass2-provisioning-client",
"email": "[email protected]"
}

This file was deleted.

Loading

0 comments on commit 46e38e5

Please sign in to comment.