-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
const { awscdk } = require('projen'); | ||
const { JobPermission } = require('projen/lib/github/workflows-model'); | ||
const { UpgradeDependenciesSchedule } = require('projen/lib/javascript'); | ||
|
||
const AUTOMATION_TOKEN = 'PROJEN_GITHUB_TOKEN'; | ||
const project = new awscdk.AwsCdkTypeScriptApp({ | ||
cdkVersion: '2.68.0', | ||
defaultReleaseBranch: 'main', | ||
name: 'amazon-chime-sdk-meeting-with-live-connector', | ||
appEntrypoint: 'amazon-chime-sdk-meeting-with-live-connector.ts', | ||
workflowNodeVersion: '16.x', | ||
devDeps: ['esbuild'], | ||
deps: [ | ||
'fs-extra', | ||
'@types/fs-extra', | ||
'@aws-sdk/client-chime-sdk-media-pipelines', | ||
'@aws-sdk/client-chime-sdk-meetings', | ||
'@aws-sdk/client-dynamodb', | ||
'@aws-sdk/client-ivs', | ||
'@aws-sdk/lib-dynamodb', | ||
'aws-lambda', | ||
'@types/aws-lambda', | ||
], | ||
projenrcTs: true, | ||
autoApproveOptions: { | ||
secret: 'GITHUB_TOKEN', | ||
allowedUsernames: ['schuettc'], | ||
}, | ||
depsUpgradeOptions: { | ||
ignoreProjen: false, | ||
workflowOptions: { | ||
labels: ['auto-approve', 'auto-merge'], | ||
schedule: UpgradeDependenciesSchedule.WEEKLY, | ||
}, | ||
}, | ||
scripts: { | ||
launch: | ||
'yarn && yarn projen && yarn build && yarn cdk bootstrap && yarn cdk deploy && yarn configLocal', | ||
}, | ||
}); | ||
|
||
const upgradeSite = project.github.addWorkflow('upgrade-site'); | ||
upgradeSite.on({ schedule: [{ cron: '0 5 * * 1' }], workflowDispatch: {} }); | ||
upgradeSite.addJobs({ | ||
upgradeSite: { | ||
runsOn: ['ubuntu-latest'], | ||
name: 'upgrade-site', | ||
permissions: { | ||
actions: JobPermission.WRITE, | ||
contents: JobPermission.READ, | ||
idToken: JobPermission.WRITE, | ||
}, | ||
steps: [ | ||
{ uses: 'actions/checkout@v3' }, | ||
{ | ||
name: 'Setup Node.js', | ||
uses: 'actions/setup-node@v3', | ||
with: { | ||
'node-version': '18', | ||
}, | ||
}, | ||
{ | ||
run: 'yarn install --check-files --frozen-lockfile', | ||
workingDirectory: 'site', | ||
}, | ||
{ | ||
run: 'yarn upgrade', | ||
workingDirectory: 'site', | ||
}, | ||
{ | ||
name: 'Create Pull Request', | ||
uses: 'peter-evans/create-pull-request@v4', | ||
with: { | ||
'token': '${{ secrets.' + AUTOMATION_TOKEN + ' }}', | ||
'commit-message': 'chore: upgrade site', | ||
'branch': 'auto/projen-upgrade', | ||
'title': 'chore: upgrade site', | ||
'body': 'This PR upgrades site', | ||
'labels': 'auto-merge, auto-approve', | ||
'author': 'github-actions <[email protected]>', | ||
'committer': 'github-actions <[email protected]>', | ||
'signoff': true, | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
|
||
const common_exclude = [ | ||
'cdk.out', | ||
'cdk.context.json', | ||
'yarn-error.log', | ||
'dependabot.yml', | ||
'*.drawio', | ||
'.DS_Store', | ||
]; | ||
|
||
project.addTask('getBucket', { | ||
exec: "aws cloudformation describe-stacks --stack-name AmazonChimeSDKWithLiveConnector --query 'Stacks[0].Outputs[?OutputKey==`siteBucket`].OutputValue' --output text", | ||
}); | ||
|
||
project.addTask('configLocal', { | ||
exec: 'aws s3 cp s3://$(yarn run --silent getBucket)/config.json site/public/', | ||
}); | ||
|
||
project.gitignore.exclude(...common_exclude); | ||
project.synth(); |