Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge Egress, AppStream and Account Update features #750

Merged
merged 245 commits into from
Oct 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
7c557d0
Add Egress Store Toggle Setting
Jun 7, 2021
f36f1ba
feat: Add iEgress Store Toggle Setting
Jun 7, 2021
fe10c3c
Merge branch 'zhaxan/GALI-932-EgressStoreToggleSetting' of https://gi…
Jun 7, 2021
1d4760e
feat: GALI-933 and GALI-934 add UI changes for egress store request s…
Jun 7, 2021
a4a11d6
minor comment fix
Jun 7, 2021
a4da7c9
fix: data-egress-controller lint issue
Jun 7, 2021
8e2df9c
docs: Update docs to specify Packer version 1.6.0 (#484)
nguyen102 May 13, 2021
1c56ab9
fix: adds 'stopped' filter for workspaces
ahl27 May 12, 2021
54732e3
bulkUserAdd API bugfix (#490)
ahl27 May 14, 2021
dc89e2b
fix: moved notification boxes to avoid blocking the top ribbon. (#483)
ahl27 May 14, 2021
bc1aa22
chore: Update UI to show 3.1 (#493)
rsmayda May 17, 2021
c4644bd
chore: Update issue templates (#487)
SanketD92 May 17, 2021
f2e2c62
fix: Redirect non admin users to "/" if they try to access "/users" (…
nguyen102 May 17, 2021
12d65cd
chore: update PR checklist (#494)
SanketD92 May 18, 2021
f21a346
chore: Add GH action to check for dependency vulnerabilities (#498)
nguyen102 May 20, 2021
2b96324
fix: react compilation error (#500)
nguyen102 May 20, 2021
b1246f2
docs: hyperlink corrections (#497)
shyogesh-sw May 20, 2021
dcc900c
feat: study permissions only shown to Study Admin (#501)
nguyen102 May 21, 2021
2c65cbe
fix: add termination status for non-found workspaces (#502)
rsmayda May 25, 2021
13117df
fix: Do not allow users to change root password (#503)
nguyen102 May 26, 2021
92c0774
chore: docs dependency fix (#505)
Bingjiling May 27, 2021
defdc00
chore(deps): bump dns-packet from 1.3.1 to 1.3.4 in /docs (#507)
dependabot[bot] May 27, 2021
755d35d
feat: Add warning that internal authentication shouldn't be used in p…
nguyen102 Jun 2, 2021
65acf5b
feat: Encrypt s3 buckets for EMR log bucket and CICD Artifact bucket …
nguyen102 Jun 3, 2021
091914c
chore: Disable EBS volume for storage gateway (#511)
nguyen102 Jun 3, 2021
a65af01
chore: Add encryption to CICD SNS topic (#512)
nguyen102 Jun 7, 2021
81b9423
Merge pull request #522 from awslabs/develop
MBtea Jun 9, 2021
7058129
fix: minor UI fix, add demo info
Jun 9, 2021
414b416
Merge branch 'feat-secure-workspace-egress' into zhaxan-GALI-933-Egre…
jn1119 Jun 10, 2021
b864b32
fix: remove console output and message update
Jun 11, 2021
25709a3
Merge branch 'zhaxan-GALI-933-EgressStoreUIRequestSubmission' of http…
Jun 11, 2021
fb5cf29
feat: App Stream vpc (#523)
nguyen102 Jun 11, 2021
ba2a734
feat: [feat-secure-workspace-egress] GALI-884 Backend Egress Store In…
MBtea Jun 15, 2021
c69c408
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-932-Egre…
Jun 16, 2021
7c4f28d
feat: addon-egress-store-stack-policy
Jun 16, 2021
80b8599
fix: lint in unit test
Jun 16, 2021
4da9f6b
fix: add enableEgressStore in setting file
Jun 16, 2021
d9820be
fix: store lint issue
Jun 16, 2021
c3be5a8
Merge pull request #516 from awslabs/zhaxan-GALI-933-EgressStoreUIReq…
MBtea Jun 17, 2021
ba2a024
feat: Extend account onboarding template to include AppStream resourc…
jn1119 Jun 17, 2021
78e826c
feat: Add image builder scripts (#541)
nguyen102 Jun 21, 2021
adba56b
fix: remove redundant policy code
Jun 21, 2021
549f525
fix: change addon name to general name and update config explanation
Jun 21, 2021
2124630
fix: update pnpm-lock file
Jun 22, 2021
11883fc
Minor changes to .defaults.yml
jn1119 Jun 22, 2021
212c2c9
docs: Minor doc changes to example.yml
jn1119 Jun 22, 2021
0a9c8f3
chore: delete terminate-egress-store.json
jn1119 Jun 22, 2021
c77c760
Merge pull request #514 from awslabs/zhaxan/GALI-932-EgressStoreToggl…
MBtea Jun 22, 2021
aa665f6
feat: add egress store termination
Jun 24, 2021
795f576
fix: update openapi
Jun 24, 2021
adcf56f
fix: update controller with no response for delete
Jun 24, 2021
12a9e89
fix: update codecov.yml
Jun 25, 2021
6156a24
fix: codecov.yml
Jun 25, 2021
9235edf
fix: add user test
Jun 25, 2021
5ce9480
fix: update openapi.yaml
Jun 25, 2021
3917dc0
fix: apply more test and user validation on calling ES termination fu…
Jun 29, 2021
160edb7
fix: update error msg
Jun 29, 2021
c33f405
fix: add lock for updating/write DDB item
Jun 29, 2021
1076076
fix: use workspace id as egress store id to aviod situation multiple …
Jun 29, 2021
8eccd37
fix: add s3-service test and update s3-service with error catch
Jun 29, 2021
4dfab24
fix: update pnpm-lock file
Jun 29, 2021
42470d3
fix: update high_vul_threshold to 4
Jun 29, 2021
ce0d9eb
fix: add test cases for s3 service
Jun 30, 2021
2605556
fix: fix lint issue of S3-service.test.js
Jun 30, 2021
70ccf74
fix: add list user test
Jun 30, 2021
deca425
fix: post deployment step check if egress store is enabled.
Jun 30, 2021
ee0e4d8
fix: shorten the workflowlooprunner role policy size
Jun 30, 2021
0c7ab9a
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-932-Egre…
Jun 30, 2021
40c63b9
fix: update uppercase in post deployment step
Jun 30, 2021
586aaca
fix: temp set high_vul_threshold to 4
Jun 30, 2021
98f61ff
fix: update test of cfn stack policy updater
Jun 30, 2021
8b73fd4
Merge pull request #561 from awslabs/zhaxan/GALI-932-EgressStoreToggl…
MBtea Jul 1, 2021
dea019a
fix: update stack policy from empty stack policy
Jul 1, 2021
d4d07b9
fix: resolve lint issue
Jul 1, 2021
9859ee0
fix: add unit test for updating stack policy
Jul 1, 2021
a60b3b3
Merge pull request #562 from awslabs/zhaxan/GALI-932-EgressStoreToggl…
MBtea Jul 1, 2021
384942f
Merge pull request #551 from awslabs/zhaxan/GALI-885-EgressStoreTermi…
MBtea Jul 6, 2021
c95a323
feat: Air gap EC2 and Sagemaker workspaces (#555)
nguyen102 Jul 7, 2021
9e5cb9e
feat: add object tagging functionality
Jul 8, 2021
d748dd1
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-887-Egre…
Jul 8, 2021
9632c5f
fix: clean up test
Jul 8, 2021
5e86bde
fix: add egress test
Jul 8, 2021
822c267
fix: add s3 tests
Jul 8, 2021
29efd1b
fix: fix s3 tests
Jul 8, 2021
a459eac
fix: add s3 service test and data-egress-serviice
Jul 8, 2021
3ff5183
feat: Allow creating new AppStream enabled account (#566)
nguyen102 Jul 13, 2021
a2b34bf
feat: Story update connect (#571)
SanketD92 Jul 13, 2021
a3706c8
fix: workspace provision error when egressStoreIAMPolicyDocument is null
Jul 14, 2021
1956798
fix: add compute-platform-service test
Jul 14, 2021
cba208d
Merge pull request #567 from awslabs/zhaxan/GALI-887-EgressObjectTagging
MBtea Jul 14, 2021
7e23095
feat: added backend code for connecting with Windows environments via…
jn1119 Jul 15, 2021
32ddbbd
fix: Provision environment pulls namespace value from stack id (#575)
nguyen102 Jul 15, 2021
f89d34c
feat: Appstream connection updates (#578)
SanketD92 Jul 15, 2021
c14ee87
fix: move egressStoreObjectHandler into postdeployment to avoid deplo…
Jul 15, 2021
74b1ca6
fix: test fix
Jul 15, 2021
d01e5fc
fix: add compute-*-service tests
Jul 15, 2021
3e251b4
fix: add compute-price-service test
Jul 15, 2021
eaf04f8
feat: appstream connect UI changes (#580)
SanketD92 Jul 15, 2021
a39cac9
fix: add egress service tests
Jul 16, 2021
c94dd64
Merge pull request #579 from awslabs/Fix/egressStoreBucket-trigger-la…
MBtea Jul 16, 2021
a8bd1b7
fix: serverless-plugin-ifelse dependency
Jul 16, 2021
55ee55a
Merge pull request #582 from awslabs/Fix/serverless-plugin-ifelse-dep…
MBtea Jul 16, 2021
9bf1486
feat: add notification
Jul 18, 2021
6eec31d
chore: Add provision account unit test (#572)
nguyen102 Jul 19, 2021
fe5ef44
feat: add object list for egress store
Jul 19, 2021
7d50028
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-888-Egre…
Jul 19, 2021
de01093
fix: add db access for role:RoleEgressStoreObjectsHandler in post-dep…
Jul 19, 2021
488a953
fix: remove unused function in store
Jul 19, 2021
e0efb2d
fix: fix data egress tests
Jul 19, 2021
c809c55
fix: remove used data in UI
Jul 19, 2021
09e24fb
fix: lint
Jul 19, 2021
4b42bf5
fix: lint
Jul 19, 2021
5d4a92d
fix: lint and clean code
Jul 19, 2021
5a5b2f8
fix: lint issue in service and test
Jul 19, 2021
021d1bb
fix: add data-egress service
Jul 19, 2021
2148970
fix: add s3 tests
Jul 20, 2021
2830c3b
fix: lint in test
Jul 20, 2021
6533d14
Update AppStream feat branch with latest code from develop (#585)
nguyen102 Jul 20, 2021
7bcc38f
feat: AppStream code hardening (#583)
SanketD92 Jul 20, 2021
d2ed99d
fix: deployment with config
Jul 21, 2021
18639d6
fix: data-egress service and tests
Jul 21, 2021
3a24404
fix: remove console.log
Jul 21, 2021
a4731a2
fix: test
Jul 22, 2021
2386c41
fix: lint
Jul 22, 2021
df569eb
fix: tests for s3 service and data egress service
Jul 23, 2021
dbc0f32
fix: s3-service tests
Jul 23, 2021
711025e
Merge pull request #584 from awslabs/zhaxan/GALI-888-EgressNotification
MBtea Jul 23, 2021
32f9f43
fix: s3 service to export api when init
Jul 26, 2021
d1c5717
Merge pull request #598 from awslabs/Fix/S3-service
MBtea Jul 26, 2021
42987bc
feat: workspace provisioning mgmt (#594)
SanketD92 Jul 26, 2021
650f26e
fix: await async methods (#599)
SanketD92 Jul 26, 2021
5aa556f
fix: prevent redundant looping (#600)
SanketD92 Jul 26, 2021
199bbb0
fix: unit test env connection & S3 service (#601)
SanketD92 Jul 26, 2021
64c6760
feat: add disable BYOB when egress store feature is enabled
Jul 26, 2021
ca26723
fix: add study service test
Jul 26, 2021
b06ab3f
fix: lint
Jul 27, 2021
e7a7160
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-886-BYOB…
Jul 27, 2021
816ba37
fix: using the string value of AppStream flag (#604)
SanketD92 Jul 27, 2021
bc3d6db
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-886-BYOB…
Jul 27, 2021
2a49deb
Fix: ui and backend egress logic while terminating workspace
Jul 27, 2021
944ee89
fix: data-egress service
Jul 27, 2021
0a6b6f8
fix: lint
Jul 28, 2021
2aa824f
feat: Restrict SageMaker presigned URL access to private VPC endpoint…
jn1119 Jul 29, 2021
8073172
Merge branch 'feat-secure-workspace-egress' into zhaxan/GALI-886-BYOB…
Jul 29, 2021
e9511af
Merge branch 'Fix/UI-fix-terminate-workspace-when-launching-error' in…
Jul 29, 2021
6240c53
fix: modify create-egress-store json validation
Jul 30, 2021
7682d64
fix: hot fix for enable egress store submission
Jul 30, 2021
17265d4
feat: post deploy appstream step (#612)
SanketD92 Jul 30, 2021
4c55220
feat: Update Account page to use cards for Accounts. Update Account
ahl27 Jul 30, 2021
70282f1
feat: Update APU feature to support onboarding and updating AppStream
Jul 30, 2021
b71a280
docs: onboarding account gali 1059
shyogesh-sw Jul 29, 2021
32d5783
docs: PR feedback addressed
shyogesh-sw Jul 30, 2021
aafb163
fix: egress button submission error
Aug 2, 2021
2a80047
fix: add egress store service tests
Aug 3, 2021
e50b566
fix: lint issue
Aug 3, 2021
41527a2
Merge pull request #602 from awslabs/zhaxan/GALI-886-BYOBsetting
MBtea Aug 3, 2021
74c206a
fix: get appstream setting optional bool (#633)
SanketD92 Aug 5, 2021
6d2793d
feat: Disable CIDR feature when AppStream is enabled (#632)
jn1119 Aug 6, 2021
5da1244
fix: egress store data access cross account
Aug 6, 2021
859d541
fix: add remove kms key policy unit test
Aug 6, 2021
5b8a0a1
Merge pull request #639 from awslabs/Fix/egressStorePermissionError
MBtea Aug 6, 2021
a296f88
fix: update kms policy when no study selected
Aug 8, 2021
5e88bef
fix: update method name to updateKMSPolicyForEgress
Aug 9, 2021
146406f
Merge pull request #643 from awslabs/Fix/egressStorePermissionError
MBtea Aug 9, 2021
e3b9eba
fix: Filter out empty CIDR blocks from security group details (#645)
jn1119 Aug 9, 2021
e998cee
fix: egress store should be terminated if it's not used after creation
Aug 9, 2021
d349eab
fix: add error msg when error occurs in putting bucket policy
Aug 9, 2021
1ce06ad
fix: lint issue
Aug 9, 2021
d5baede
fix: edit error message
Aug 9, 2021
e80070c
fix: lint
Aug 9, 2021
3482176
Merge pull request #646 from awslabs/Fix/egressStoreTermination
MBtea Aug 9, 2021
7dfb536
feat: Onboard instruction update (#647)
nguyen102 Aug 10, 2021
90c3fba
fix: edit bucket policy
Aug 10, 2021
23fbe3f
Merge pull request #649 from awslabs/Fix/egressStoreBucketPolicy
MBtea Aug 10, 2021
7b14b11
fix: Various TRE bugfixes (#642)
nguyen102 Aug 11, 2021
b1652ed
fix: add pre-deployment
Aug 12, 2021
36983bc
fix: add pre-deployment to delete environment
Aug 12, 2021
ac9b4d6
fix: lint
Aug 12, 2021
08ad5b7
fix: minor egress update
Aug 12, 2021
518b651
fix: egress error message
Aug 12, 2021
e791c31
Merge pull request #652 from awslabs/Fix/egress
MBtea Aug 12, 2021
03ebd37
Merge pull request #651 from awslabs/zhaxan/pre-deployment
MBtea Aug 12, 2021
b9c1a72
fix: fix BYOB studies to work with SageMaker and EC2 Linux when AppSt…
jn1119 Aug 13, 2021
aef9d1b
feat: Allow termination of non-appstream envs (#655)
SanketD92 Aug 13, 2021
f581a58
fix: remove unsed setting
Aug 13, 2021
75dc22c
Merge pull request #660 from awslabs/zhaxan/fix-pre-deployment
MBtea Aug 16, 2021
53dbeee
fix: update error message in util function
Aug 17, 2021
485611b
Merge pull request #661 from awslabs/Fix/egress
MBtea Aug 17, 2021
d0a85f0
fix: fix BYOB to work for EC2 Windows when AppStream is enabled (#662)
jn1119 Aug 17, 2021
ae2f8d6
doc: adding pre-requisite info for appstream (#664)
SanketD92 Aug 17, 2021
dd5f220
fix: lambda error (#670)
SanketD92 Aug 19, 2021
3c8503b
test: Split integration and E2E tests for AppStream/NonAppStream (#663)
nguyen102 Aug 20, 2021
df6ac22
test: connection url appstream (#673)
SanketD92 Aug 25, 2021
d5a1ab2
fix: Fix AccountOnboardingHandler to correctly check for non-AppStrea…
jn1119 Aug 27, 2021
d2ed59b
feat: adding Egress integ tests (#679)
SanketD92 Aug 27, 2021
b7670bb
test: Added appstream workspace tests (#671)
nguyen102 Aug 27, 2021
9e97aff
fix: Correct stage name for deploying TRE SWB (#681)
nguyen102 Aug 27, 2021
dcd05c8
fix: Enable AppStream and Egress Store (#682)
nguyen102 Aug 27, 2021
31231ae
fix: Run AppStream version of the tests (#683)
nguyen102 Aug 27, 2021
9a927b5
fix: Correct Appstream test command to pick up spec files (#684)
nguyen102 Aug 30, 2021
362647c
Rstudio AppStream integration (#678)
jn1119 Aug 31, 2021
1adca0a
fix: open data lambda in appstream env (#687)
SanketD92 Aug 31, 2021
9731ba1
chore: Merge mainline into feat-secure-workspace-egress (#659)
nguyen102 Aug 31, 2021
baf724f
fix: Use bucket region if available while mounting BYOB studies (#692)
jn1119 Sep 2, 2021
f871a3e
fix: Allow Sagemaker Appstream workspaces to autostop (#689)
nguyen102 Sep 2, 2021
8590859
test: Added infrastructure tests (#696)
nguyen102 Sep 10, 2021
4b9bba9
fix: member account share appstream bug (#712)
SanketD92 Sep 16, 2021
bf76faf
fix: externalId requirement for add account form (#713)
SanketD92 Sep 16, 2021
a1c7bdf
feat: swb main study role (#710)
nguyen102 Sep 21, 2021
e937d8b
fix: enableEgressStore flag is boolean, not string (#715)
maghirardelli Sep 21, 2021
a436e95
feat: Pull AppStream create connection test env id from config file (…
nguyen102 Sep 22, 2021
ab5e0c7
feat: remove egress bucket pol (#720)
SanketD92 Sep 24, 2021
1377f19
chore: Make Egress store function with roles and remove kms whitelist…
jn1119 Sep 27, 2021
e55f3be
fix: converting Egress flag from boolean to string bug (#730)
maghirardelli Oct 1, 2021
ed8f29d
fix: Disable public IP address for Linux, Windows, and RStudio when A…
nguyen102 Oct 6, 2021
be76a91
chore: Update aws-sdk to latest V2 version (#734)
nguyen102 Oct 6, 2021
301271a
Merge branch 'feat-egress-store-role' into feat-secure-workspace-egre…
Oct 6, 2021
e41e9d7
Merge branch 'develop' into feat-secure-workspace-egress-merged
Oct 7, 2021
8797d55
Update Cypress tests to match tests from develop
Oct 5, 2021
abe61a9
Update integration test to include isAppStreamEnabled flag
Oct 7, 2021
692f1ed
Bump axios version for integratio test
Oct 7, 2021
95c3325
Trigger notification
Oct 7, 2021
4c02267
fix linting issues
Oct 7, 2021
4b59e15
Update test
Oct 7, 2021
40d54e8
chore: Merge develop and feat-egress-store-role into feat-secure-work…
nguyen102 Oct 8, 2021
5655411
feat: Create dedicated SGs for environment and interface endpoints (#…
jn1119 Oct 8, 2021
5376d7d
Revert "chore: Merge develop and feat-egress-store-role into feat-sec…
Oct 11, 2021
da3902f
Merge branch 'feat-secure-workspace-egress-merged' into feat-secure-w…
Oct 11, 2021
129dc4c
Merge pull request #737 from nguyen102/feat-secure-workspace-egress-2
nguyen102 Oct 11, 2021
9502262
feat: Fetch egress store data by id instead of using a scan (#741)
jn1119 Oct 12, 2021
8b6be56
fix: Delete egress role in workflow instead of API (#740)
nguyen102 Oct 12, 2021
e56bcff
fix: Remove PolicyWorkflowLoopRunner DependsOn PermissionBoundaryPoli…
Oct 12, 2021
a95c680
WIP: Allow shareAppStreamImage for update accoutn request
Oct 12, 2021
b2524f5
Update tests
Oct 12, 2021
602b696
Merge pull request #743 from nguyen102/feat-secure-workspace-egress-f…
nguyen102 Oct 13, 2021
8b1477b
Fix typos
Oct 13, 2021
e782f2b
Update AppStream egress disabled tests
Oct 13, 2021
e879746
Merge pull request #746 from nguyen102/feat-secure-workspace-egress-c…
nguyen102 Oct 13, 2021
0b7437a
chore: update docs and script to reference
Oct 13, 2021
2ae16fb
Merge remote-tracking branch 'upstream/develop' into feat-secure-work…
jn1119 Oct 13, 2021
eecfcac
Merge pull request #748 from jn1119/feat-secure-workspace-egress-merg…
jn1119 Oct 13, 2021
0fe71e5
Merge pull request #749 from nguyen102/appstream-image-instruction
jn1119 Oct 13, 2021
3d2b406
docs: egress docs (#742)
shyogesh-sw Oct 14, 2021
7284713
docs: Minor comment updates and add copyright headers (#751)
jn1119 Oct 14, 2021
1c400ae
Merge branch 'develop' into feat-secure-workspace-egress
jn1119 Oct 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
130 changes: 130 additions & 0 deletions .github/workflows/deploy-integ-appstream-egress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#

name: Deploy & Integration Test (AppStream and Egress Enabled)
on:
push:
branches:
- feat-secure-workspace-egress
jobs:
pre-deployment-check:
name: Pre deployment check
runs-on: ubuntu-18.04
timeout-minutes: 10
steps:
- name: "Block Concurrent Deployments"
uses: softprops/turnstyle@v1
with:
poll-interval-seconds: 10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
name: Deploy to AppStream Dev
runs-on: ubuntu-18.04
needs: pre-deployment-check
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/setup-go@v2
with:
go-version: 1.13
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: ./scripts/install.sh
- name: Build all packages
run: ./scripts/build-all-packages.sh
- name: Deploy
env:
STAGE_NAME: tre
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_APPSTREAM_EGRESS}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_APPSTREAM_EGRESS }}
run: |
cp ./main/end-to-end-tests/e2eGitHubConfig.AppStreamEgress.yml ./main/config/settings/${STAGE_NAME}.yml
./scripts/environment-deploy.sh ${STAGE_NAME}
infrastructure-test:
name: Infrastructure test
runs-on: ubuntu-18.04
needs: deploy
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install pnpm and system libraries
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
working-directory: main/infrastructure-tests
- name: Run infrastructure tests
run: pnpm run testAppStreamEgressEnabled -- --stage=github
working-directory: ./main/infrastructure-tests
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_APPSTREAM_EGRESS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_APPSTREAM_EGRESS }}
INFRA_TESTS_HOSTING_ACCOUNT_ID: ${{ secrets.INFRA_TESTS_HOSTING_ACCOUNT_ID }}
INFRA_TESTS_HOSTING_ACCOUNT_STACK_NAME: ${{ secrets.INFRA_TESTS_HOSTING_ACCOUNT_STACK_NAME }}
integration-test:
name: Integration test
runs-on: ubuntu-18.04
needs: infrastructure-test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install pnpm and system libraries
run: |
npm install -g pnpm
sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- name: Install dependencies
run: pnpm install
working-directory: main/integration-tests
- name: Run integration tests
run: ./scripts/run-integration-tests.sh ${STAGE_NAME} AppStreamEgress
working-directory: ./
env:
DEPLOYMENT_BUCKET: ${{ secrets.DEPLOYMENT_BUCKET_APPSTREAM_EGRESS}}
STAGE_NAME: tre
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_APPSTREAM_EGRESS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_APPSTREAM_EGRESS }}
aws-region: us-east-1
cypress-test:
name: Cypress test
runs-on: ubuntu-18.04
needs: integration-test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install pnpm and system libraries
run: |
npm install -g pnpm
sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
- name: Install dependencies
run: pnpm install
working-directory: main/end-to-end-tests
- name: Run cypress test
run: pnpm run cypress:run-tests:github:appstream-egress-enabled
working-directory: main/end-to-end-tests
env:
# Env parameters for cypress tests need header 'CYPRESS_' or 'cypress_'
# Cypress will strip the header and pass it to the tests
CYPRESS_BASE_URL: ${{ secrets.CYPRESS_BASE_URL_APPSTREAM_EGRESS}}
CYPRESS_researcherEmail: ${{ secrets.CYPRESS_RESEARCHER_EMAIL_APPSTREAM_EGRESS}}
CYPRESS_researcherPassword: ${{ secrets.CYPRESS_RESEARCHER_PASSWORD_APPSTREAM_EGRESS}}
CYPRESS_adminEmail: ${{ secrets.CYPRESS_ADMIN_EMAIL_APPSTREAM_EGRESS}}
CYPRESS_adminPassword: ${{ secrets.CYPRESS_ADMIN_PASSWORD_APPSTREAM_EGRESS}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ docs/build
*/*/*/config/settings/*.yml
!*/*/*/config/settings/.defaults.yml
!*/*/*/config/settings/example*.yml
!main/infrastructure-tests/config/settings/github.yml

# rStudio specific
source/ServiceWorkbenchOnAWS/main/solution/machine-images/config/infra/files/rstudio/*
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,4 @@ We recommend to apply this patch as soon as possible

### Added

- Initial launch! :rocket:
- Initial launch! :rocket:
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"name": "@aws-ee/base-post-deployment",
"version": "1.0.0",
"private": true,
"description": "A library containing base set of post-deployment steps to be run with solutions based on <TODO-NAME> addons",
"description": "A library containing base set of post-deployment steps",
"author": "Amazon Web Services",
"license": "Apache-2.0",
"dependencies": {
"@aws-ee/base-api-services": "workspace:*",
"@aws-ee/base-services": "workspace:*",
"@aws-ee/base-services-container": "workspace:*",
"aws-sdk": "^2.647.0",
"aws-sdk": "^2.1000.0",
"generate-password": "^1.5.0",
"lodash": "^4.17.21"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": ["plugin:jest/recommended", "airbnb-base", "prettier"],
"plugins": ["jest", "prettier"],
"rules": {
"prettier/prettier": ["error"],
"no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_.+",
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"args": "after-used",
"ignoreRestSiblings": true
}
],
"prefer-destructuring": 0,
"no-underscore-dangle": 0,
"no-param-reassign": 0,
"class-methods-use-this": 0,
"no-use-before-define": 0
},
"env": {
"jest/globals": true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**/.class
**/.DS_Store
**/coverage
**/node_modules

**/npm-debug.log
**/pnpm-debug.log

# Serverless directories
.serverless

# Webpack generated directories
.webpack

# VisualStudioCode.gitignore
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# IntelliJ Idea Module Files
*.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"tabWidth": 2,
"printWidth": 120,
"singleQuote": true,
"quoteProps": "consistent",
"trailingComma": "all"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## To invoke pre deployment locally

After you run

```
$ pnpx sls deploy -s <stage>
```

You can invoke lambda locally

```
$ pnpx sls invoke local -f preDeployment -s <stage>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

// jest.config.js
module.exports = {
// verbose: true,
notify: false,
testEnvironment: 'node',
// testPathIgnorePatterns: ['service.test.js'],

// Configure JUnit reporter as CodeBuild currently only supports JUnit or Cucumber reports
// See https://docs.aws.amazon.com/codebuild/latest/userguide/test-reporting.html
reporters: ['default', ['jest-junit', { suiteName: 'jest tests', outputDirectory: './.build/test' }]],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

const Service = require('@aws-ee/base-services-container/lib/service');
const { runAndCatch } = require('@aws-ee/base-services/lib/helpers/utils');

const createOrUpdateSchema = require('./schema/deployment-item');

const settingKeys = {
tableName: 'dbDeploymentStore',
};

class DeploymentStoreService extends Service {
constructor() {
super();
this.dependency(['jsonSchemaValidationService', 'dbService']);
}

async init() {
await super.init();
const [dbService] = await this.service(['dbService']);
const table = this.settings.get(settingKeys.tableName);

this._getter = () => dbService.helper.getter().table(table);
this._updater = () => dbService.helper.updater().table(table);
this._query = () => dbService.helper.query().table(table);
this._deleter = () => dbService.helper.deleter().table(table);
}

async find({ type, id, fields = [] }) {
return this._getter()
.key({ type, id })
.projection(fields)
.get();
}

async mustFind({ type, id, fields = [] }) {
const result = await this.find({ type, id, fields });
if (!result) throw this.boom.notFound(`deployment item of type "${type}" and id "${id}" does not exist`, true);
return result;
}

async createOrUpdate(rawData) {
const [validationService] = await this.service(['jsonSchemaValidationService']);

// Validate input
await validationService.ensureValid(rawData, createOrUpdateSchema);

const { type, id } = rawData;

// Time to save the the db object
return this._updater()
.key({ type, id })
.item(rawData)
.update();
}

async delete({ type, id }) {
// Lets now remove the item from the database
const result = await runAndCatch(
async () => {
return this._deleter()
.condition('attribute_exists(type) and attribute_exists(id)') // yes we need this
.key({ type, id })
.delete();
},
async () => {
throw this.boom.notFound(`deployment item of type "${type}" and id "${id}" does not exist`, true);
},
);

return result;
}
}

module.exports = DeploymentStoreService;
Loading