-
Notifications
You must be signed in to change notification settings - Fork 0
Ci #19
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
Merged
Merged
Ci #19
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
1dfe822
initial work, hopefully this exists when merging over the weekend
HoustonBoston 807f5c7
file whitespace cleanup
HoustonBoston deec723
almost done
HoustonBoston b3d7435
Made a separate folder for dev and prod stacks. Need to get rid of so…
HoustonBoston 2699b1c
Change into right directory for CI/CD
HoustonBoston ad16a7d
Can't use run and uses on the same step. Fixed that issue.
HoustonBoston 895f34a
Typo on one of the actions.
HoustonBoston 4687e59
file cleanup
HoustonBoston 73a467c
Added pipeline for master branch
HoustonBoston 7aaaeb3
Update master-branch.yaml
Gurpranked a9b139e
Update dev-branch.yaml
Gurpranked 66f389b
Added STS Assume Role ARN
HoustonBoston 4624a22
Co-authored-by: Nick Bottari <nbottari9@gmail.com>
HoustonBoston 595614a
Added STS assume role for dev branch pipeline
HoustonBoston 60cd3ab
Changed role-to-assume to secrets.<name>
HoustonBoston d7e42a2
Added permissions for id-token in the pipeline
HoustonBoston 25f0ecf
Added correct commands to deploy to AWS
HoustonBoston 0b940a0
changed single quote to double quote
HoustonBoston 4f27a34
changed single quote to double quote in all of the formatted strings …
HoustonBoston a407b92
changed single quote to double quote on line 58
HoustonBoston 5fd03d7
changed single quote to double quote on lines 69 and 79
HoustonBoston 61d7d69
replace os.getenv functions with the environment var name
HoustonBoston 16d0e69
Need to replace all the os.getenv with the variable names at the top.
HoustonBoston 9bb1113
Merge branch 'master' of github.com:UMLCloudComputing/immersion into ci
cjcocokrisp e6f02a4
Replaced all the os.getenv functions with just the variable names def…
HoustonBoston 1fcdb20
os.exit() -> os._exit()
HoustonBoston cd027c6
Copied contents of dev CF Stack to prod CF Stack, need to change the …
HoustonBoston 08e2171
File cleanup & will make a PR if CI/CD works for the dev CF stack
HoustonBoston 0df217d
Hopefully this provides the right context for AWS CDK deploy commands
HoustonBoston e9114f8
Added aws account id as a secret to gh actions
HoustonBoston 1d0a77b
Fixed failure to find Docker image (wrong directory specified)
HoustonBoston 1b7542a
Removed the os._exit function
HoustonBoston 40e8eae
Perhaps this fixes the unable to deserialize error?
HoustonBoston 8971f22
Extracts the string value from the secure string from SSM parameter s…
HoustonBoston e8d18c4
ecs task definitions have a constant string for the name, hoping that…
HoustonBoston 26a2b6c
aws_cdk not found, so removed that
HoustonBoston 5d6f1e5
Runtime python3.13 not found, changed to python_3_10 as suggested by …
HoustonBoston dad4200
Fixed directory issues
HoustonBoston c02baac
Wrong functions were used to retrieve SSM parameter values
HoustonBoston 5bf4f37
Changed to value_from_lookup
HoustonBoston 385483e
Removed .string_value attribute
HoustonBoston b7d6a1c
Created a CI/CD pipeline for deploying to AWS CDK.
HoustonBoston c0f0ea6
Merge branch 'ci' of https://github.com/UMLCloudComputing/immersion i…
HoustonBoston 0a90ad9
Fixed indentation
HoustonBoston 6e3994c
Fixed indenting in the prod stack env
HoustonBoston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: dev-branch-deployment | ||
| on: | ||
| push: | ||
| branches-ignore: | ||
| - main | ||
| - master | ||
| jobs: | ||
| dev-deploy-to-aws: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| CICD_ACCOUNT_ID: ${{ secrets.CICD_ACCOUNT_ID }} | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| name: Set up python | ||
| with: | ||
| python-version: 3.11 | ||
|
|
||
| - name: Install python dependencies | ||
| run: pip install -r requirements.txt | ||
|
|
||
| - name: Configure AWS profile | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: ${{ secrets.STS_ASSUME_ROLE_ARN }} | ||
| role-session-name: github-actions-cfn-deploy | ||
| aws-region: ${{ vars.AWS_REGION }} | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| name: Install nodejs | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: Install CDK CLI with nodejs | ||
| run: | | ||
| npm install -g aws-cdk | ||
|
|
||
| - name: Build the CDK stack using the aws profile | ||
| run: | | ||
| cd immersion/environments/dev | ||
| cdk deploy --app "python3 app.py" --require-approval never |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: dev-branch-deployment | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
| jobs: | ||
| prod-deploy-to-aws: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| CICD_ACCOUNT_ID: ${{ secrets.CICD_ACCOUNT_ID }} | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| name: Set up python | ||
| with: | ||
| python-version: 3.11 | ||
|
|
||
| - name: Install python dependencies | ||
| run: pip install -r requirements.txt | ||
|
|
||
| - name: Configure AWS profile | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: ${{ secrets.STS_ASSUME_ROLE_ARN }} | ||
| role-session-name: github-actions-cfn-deploy | ||
| aws-region: ${{ vars.AWS_REGION }} | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| name: Install nodejs | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: Install CDK CLI with nodejs | ||
| run: | | ||
| npm install -g aws-cdk | ||
|
|
||
| - name: Build the CDK stack using the aws profile | ||
| run: | | ||
| cd immersion/environments/dev | ||
| cdk deploy --app "python3 app.py" --require-approval never |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from immersion_stack import ImmersionStack | ||
| import aws_cdk as cdk | ||
| import os | ||
|
|
||
| app = cdk.App() | ||
| ImmersionStack(app, "ImmersionStackDev", | ||
| env = { | ||
| "account": os.getenv('CICD_ACCOUNT_ID'), # Assuming it's only being deployed with GH Actions | ||
| "region": "us-east-1" | ||
| } | ||
| ) | ||
|
|
||
| app.synth() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from immersion_stack import ImmersionStack | ||
| import aws_cdk as cdk | ||
| import os | ||
|
|
||
| app = cdk.App() | ||
| ImmersionStack(app, "ImmersionStackDev", | ||
| env = { | ||
| "account": os.getenv('CICD_ACCOUNT_ID'), # Assuming it's only being deployed with GH Actions | ||
| "region": "us-east-1" | ||
| } | ||
| ) | ||
|
|
||
| app.synth() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we change versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason it's invalid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok