-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support Platform CLI #763
Merged
Merged
Support Platform CLI #763
Changes from all commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
8aee09e
Add copier files
lorenyu a44b003
Templatize app_name
lorenyu 2811ba0
Rename e2e/app to e2e/{{app_name}}
lorenyu f7661c4
Merge branch 'main' into lorenyu/platform-cli
lorenyu 3f649ef
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 10eea5b
Update cd-{{app_name}}.yml to parameterize job name
doshitan 37cc0d1
Parameterize workflows/ci-{{app_name}}* content for app_name
doshitan c1aa4cb
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 58bd26f
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 11076e5
WIP try local port setting
doshitan 1120558
Have app vuln scans run on any changes to underlying action (as was o…
doshitan 9252220
Support conditional blocks based on if dev env is available
doshitan 0097c5b
Make infra service checks per-app?
doshitan fcff0d1
Dummy change for updating
doshitan 0733d96
Use `/health` endpoint for check in infra_test.go
doshitan f2d5e34
Disable TLS checks in infra_test.go
doshitan dd8a1c7
Update docs for broken links and consistently use <APP_NAME>
doshitan a023ba3
Update decision docs for template usage
doshitan 81f514d
More broken doc link updates
doshitan 37a2962
More broken doc link updates
doshitan b6f626e
Update template-infra's infra check to install example project to run…
doshitan 46a4114
Merge branch 'main' into lorenyu/platform-cli
doshitan 25904e1
Pull infra/project-config/main.tf into template
doshitan 4ad924a
Fix doc link lint due to project-config templating
doshitan f968f02
Fix IMAGE_TAG when not in a git repo
doshitan c44ae5a
template_infra_test.go: Build the IMAGE_TAG specified
doshitan 536a572
bin/check-github-actions-auth: be explicit about the repo to check
doshitan 2e39545
template_infra_test.go: comment on not using /health
doshitan c53219c
Prefix all copier variables with template part name (base or app)
doshitan 5ab08b3
Only ask relevant questions for different template
doshitan c5f90fa
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 4c61efd
misc. doc updates
doshitan aba8076
move app/ to template-only-app/
doshitan 46b5777
Fix documented update commands
doshitan a602c81
app_is_dev_env_setup -> app_has_dev_env_setup
doshitan 3f86171
Question tweaks
doshitan 5532b10
fixes for app/ -> template-only-app/
doshitan 6ad105d
More app -> <APP_NAME> doc updates
doshitan de5a358
Template-ize infra/networks/main.tf
doshitan 7ab97e1
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 306b1a6
Ignore broken link for networks/main.tf that will exist for installed…
doshitan e8436f5
Update example app in platform-test in CD
doshitan 35a5004
misc. doc fix
doshitan d15e09c
doc updates
doshitan 1cbab23
Update template CI/CD stuff to not checkout lorenyu/platform-cli
doshitan a666a9c
Reduce some duplication on platform-cli install
doshitan a0a33b4
Remove TODO from non-template-only docs
doshitan cddd7db
Fix a couple template-only CI things from recent change
doshitan 66b4f27
Specify `--version` in CI for platform-cli
doshitan 370470a
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 6e771c4
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 8741639
More doc updates
doshitan a56021a
bin/update-pr-environment: Support multiple apps in comments
doshitan 4336bd0
Clean up older single-app section of PR Env info if present
doshitan 50de31c
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 9f20240
Merge branch 'main' into lorenyu/platform-cli
doshitan 856e8aa
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 4902094
remove feature flags due to evidently deprecation
coilysiren ccc8cab
remove feature flags due to evidently deprecation (part 2)
coilysiren 7053f3d
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 697aac4
resolve merge conflicts against main
coilysiren 383a253
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 2693314
Build out docs/release.md a little bit
doshitan 494f7c3
Exclude template-only files that aren't tagged as such in the name
doshitan 82ec64a
Remove old install/update scripts
doshitan e61b207
Fix destroy-pr-environment for multi-app PR env setup
doshitan 88164a5
e2e doc fixes/consistency
doshitan 035ef09
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 43b79c6
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 68a122d
Merge branch 'main' into lorenyu/platform-cli
lorenyu 7fb0495
Fix custom setup-terraform usage in `template-only-ci-infra.yml`
doshitan 4c38ade
adds: infra/{{app_name}}/service/identity_provider.tf
coilysiren b68e666
Merge remote-tracking branch 'origin' into lorenyu/platform-cli
coilysiren 5b21001
Merge branch 'main' into lorenyu/platform-cli
lorenyu 93fc8de
Print generated project name in `template-only-ci-infra.yml`
doshitan e4f9cec
Support per-app vulnerability scan configs
doshitan 455e4b3
Fix template-only-app install in CI
doshitan 29c4ede
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 2df9304
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 73405d2
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 0a90604
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot 72a9f11
Merge branch 'main' into lorenyu/platform-cli
lorenyu f6d2e6c
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot b3ea89f
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot c7b79d2
Update docs to recommend `infra update --answers-only`
doshitan 4df7757
platform-cli supports remote infra repos, don't recommend cloning
doshitan 94f22c1
Fix terraform CLI script example arguments
doshitan 4c1d974
Merge remote-tracking branch 'origin/main' into lorenyu/platform-cli
nava-platform-bot fd380bc
Update doc links to main in prep for merge
doshitan 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 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,58 @@ | ||
name: Return first file that exists | ||
description: Check given list of files in order and return first one that exists. | ||
|
||
inputs: | ||
files: | ||
required: true | ||
type: string | ||
description: | | ||
The list of files to check, in the order to check for them. | ||
|
||
File names should be properly quoted\escaped and either space or newline | ||
separated. | ||
|
||
Either: | ||
```yaml | ||
files: my_file.txt some_other_file.txt | ||
``` | ||
|
||
Or: | ||
```yaml | ||
files: |- | ||
my_file.txt | ||
some_other_file.txt | ||
``` | ||
|
||
outputs: | ||
found_file: | ||
description: "Path of first file found." | ||
value: ${{ steps.find-file.outputs.found_file }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get file list | ||
id: file-list | ||
shell: bash | ||
run: | | ||
# Get file list | ||
# https://github.com/actions/runner/issues/1877 | ||
files=$(printf %s "${{ inputs.files }}" | tr '\n' ' ') | ||
echo "File list: ${files}" | ||
echo "files=${files}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Check file list | ||
id: find-file | ||
shell: bash | ||
run: | | ||
# Check file list | ||
# https://github.com/actions/runner/issues/1877 | ||
for f in ${{ steps.file-list.outputs.files }}; do | ||
if [[ -e "${f}" ]]; then | ||
found_file="${f}" | ||
break | ||
fi | ||
done | ||
|
||
echo "found_file=${found_file}" | ||
echo "found_file=${found_file}" >> "$GITHUB_OUTPUT" |
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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,54 @@ | ||
name: Deploy {{ app_name }} | ||
# Need to set a default value for when the workflow is triggered from a git push | ||
# which bypasses the default configuration for inputs | ||
run-name: Deploy ${{'{{'}}inputs.version || 'main' {{'}}'}} to {{ app_name }} ${{'{{'}} inputs.environment || 'dev' {{'}}'}} | ||
|
||
on: | ||
{% if app_has_dev_env_setup %} | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- "{{ app_name }}/**" | ||
- "bin/**" | ||
- "infra/**" | ||
{% else %} | ||
# !! Once you've set up the dev environment and are ready to enable continuous | ||
# deployment, run: | ||
# | ||
# nava-platform infra update --answers-only --data app_has_dev_env_setup=true . | ||
# | ||
# to enable these lines. They are here as comments for context. | ||
# | ||
# push: | ||
# branches: | ||
# - "main" | ||
# paths: | ||
# - "{{ app_name }}/**" | ||
# - "bin/**" | ||
# - "infra/**" | ||
{% endif %} | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: Environment to deploy to | ||
required: true | ||
default: "dev" | ||
type: choice | ||
options: | ||
- dev | ||
- staging | ||
- prod | ||
version: | ||
required: true | ||
default: "main" | ||
description: Tag or branch or SHA to deploy | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
uses: ./.github/workflows/deploy.yml | ||
with: | ||
app_name: "{{ app_name }}" | ||
environment: ${{'{{'}} inputs.environment || 'dev' {{'}}'}} | ||
version: ${{'{{'}} inputs.version || 'main' {{'}}'}} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
This change seems to be breaking NavaLabs DST repository CI @doshitan would you have any recommendations to make sure our CI lint markdown check is passing?
Ref: https://github.com/navapbc/labs-decision-support-tool/actions/runs/12776615414/job/35615909285