-
-
Notifications
You must be signed in to change notification settings - Fork 127
feat: Atmos List Deployments, Pro Deployments Upload #1254
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
Draft
milldr
wants to merge
124
commits into
main
Choose a base branch
from
feat/atmos-list-upload
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
124 commits
Select commit
Hold shift + click to select a range
bba4888
adding drift detection support
milldr a9deaa6
adding drift detection support
milldr 30dac22
adding drift detection support
milldr d28dd5d
adding drift detection support
milldr 702d236
adding drift detection support
milldr 20785f9
adding drift detection support
milldr 150c1ce
adding drift detection support
milldr ebea868
adding drift detection support
milldr 1f1a22f
cleaning up tests
milldr eeba626
cleaning up tests
milldr b3d8a81
cleaning up tests
milldr e30b7eb
Merge branch 'main' into feat/atmos-list-upload
milldr 48de779
[autofix.ci] apply automated fixes
autofix-ci[bot] 0d66402
use cb logger
milldr e5553a3
more tests
milldr 6002909
more tests
milldr f6b335b
Merge branch 'feat/atmos-list-upload' of github.com:cloudposse/atmos …
milldr c90dde6
more tests
milldr 3a284b4
more tests
milldr d2408a9
clean up tests
milldr 204f56b
Merge branch 'main' into feat/atmos-list-upload
milldr 17d9d28
Merge branch 'main' into feat/atmos-list-upload
milldr 7d51fdd
updated table design
milldr 02157f5
dont process templates or functions with list deployments
milldr e5a9d33
Merge branch 'main' into feat/atmos-list-upload
milldr ab22c6a
tests for windows
milldr 1339290
snapshots
milldr ef81dbf
reset unintended changes
milldr 0071ac6
reset unintended changes
milldr 9e2436d
use internal package not pkg
milldr 35fb2ae
more tests
milldr 71e3b08
fix tests
milldr 5f01771
Merge branch 'main' into feat/atmos-list-upload
milldr ec24435
more tests
milldr 8dd4865
[autofix.ci] apply automated fixes
autofix-ci[bot] bbf9c5e
building atmos plan upload
milldr e49969f
Creating plan upload
milldr 074a495
fixed logic for plan args
milldr 2817a53
adding tests
milldr 04fd74d
more tests
milldr dc3ca64
test coverage
milldr bea9e90
Merge branch 'main' into feat/atmos-plan-upload
milldr 6271662
[autofix.ci] apply automated fixes
autofix-ci[bot] f34ee99
fixed git lib
milldr a1cfa5d
fixing logging
milldr e6ba64f
Merge branch 'feat/atmos-plan-upload' of github.com:cloudposse/atmos …
milldr fc330a3
cleaning up usage
milldr be60360
PR review
milldr 45edf64
PR review
milldr b36b1ff
use pointers
milldr 80cc607
Merge branch 'main' into feat/atmos-list-upload
milldr 9a8cecb
tlc and merge
milldr 02b76eb
updated testing
milldr 501aea8
fix sort
milldr 12afe45
clean up logger
milldr 05c5e3c
Adding tests
milldr ffcd2c3
feedback
milldr dfa38c5
fixed TestProcessStackComponents test
milldr 2fa20f3
sort logic and new snapshots
milldr a40ab9f
more tests
milldr febcfae
more tests
milldr 4f54434
remove unnecessary logger
milldr 542addb
Merge branch 'main' into feat/atmos-list-upload
milldr ae82ff4
Merge branch 'main' into feat/atmos-list-upload
milldr c6d0251
Merge branch 'main' into feat/atmos-list-upload
milldr 21868e0
merging main
milldr 93a9730
merging main
milldr 6254a4d
Merge branch 'feat/atmos-list-upload' of github.com:cloudposse/atmos …
milldr c0bf064
clean up comments
milldr ba438a4
merged
milldr a6984ad
merged
milldr 444a29a
merged
milldr 81058ae
[autofix.ci] apply automated fixes
autofix-ci[bot] fe78f86
clean up review
milldr 244bf7d
Merge branch 'feat/atmos-list-upload' of github.com:cloudposse/atmos …
milldr 845d50f
merged
milldr aa5590f
[autofix.ci] apply automated fixes
autofix-ci[bot] 99b55d1
clean up review
milldr 200c28c
Merge branch 'feat/atmos-list-upload' of github.com:cloudposse/atmos …
milldr 9e22f31
Fixed build
milldr 6fde5ee
fixing tests
milldr 0f44522
more tests
milldr ba5c133
fixed tests
milldr 4327651
fixed tests
milldr 32fb0e2
fixed tests
milldr f6903f0
Update pkg/list/list_deployments.go
milldr e19688a
[autofix.ci] apply automated fixes
autofix-ci[bot] 0baacfe
fixed tests
milldr d9f23fd
prompt suggestions
milldr a6ab979
prompt suggestions
milldr 0275792
prompt suggestions
milldr a15dcfa
Merge branch 'main' into feat/atmos-list-upload
milldr e3dadc9
rename stacks to deployments
mcalhoun 66e714a
remove logger
mcalhoun b8b34ce
[autofix.ci] apply automated fixes
autofix-ci[bot] ef18399
Merge branch 'main' into feat/atmos-list-upload
mcalhoun f23d04a
Merge branch 'main' into feat/atmos-list-upload
goruha 6768203
update to deployments
mcalhoun 25cc00a
force rc bulid
mcalhoun 00612aa
rename drift status to deployment status
mcalhoun 6676670
[autofix.ci] apply automated fixes
autofix-ci[bot] 59c8a1a
update lint errors
mcalhoun dd9ac22
fix test errors
mcalhoun 7ee4504
Merge branch 'main' into feat/atmos-list-upload
goruha 100b415
Update feature-release.yml
goruha c238765
Update feature-release.yml
goruha 62880ea
Update feature-release.yml
goruha 8cfd3cf
Update feature-release.yml
goruha 61326e0
Update feature-release.yml
goruha e7127bb
Merge branch 'main' into feat/atmos-list-upload
goruha 1bf0718
Support draft release
goruha 58b7710
Update feature-release.yml
goruha 38913b8
Merge branch 'main' into feat/atmos-list-upload
goruha 1969b57
[autofix.ci] apply automated fixes
autofix-ci[bot] 6466043
Update describe_affected.go
goruha 0fedbf2
Update describe_affected.go
goruha 84e3eb8
[autofix.ci] apply automated fixes
autofix-ci[bot] a918577
Update test.yml
goruha 0dea003
Update test.yml
goruha f60c502
Update test.yml
goruha 5e3538e
Update test.yml
goruha f5bd948
Update describe_affected.go
goruha 6ec3e86
[autofix.ci] apply automated fixes
autofix-ci[bot] 8f4e248
Update test.yml
goruha 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 |
---|---|---|
@@ -1,10 +1,27 @@ | ||
name: Feature release | ||
on: | ||
issue_comment: | ||
types: [created] | ||
pull_request: | ||
types: [ opened, synchronize, reopened, labeled, unlabeled ] | ||
paths-ignore: | ||
- "README.md" | ||
|
||
permissions: | ||
attestations: write | ||
contents: write | ||
id-token: write | ||
pull-requests: write | ||
packages: write | ||
issues: write | ||
|
||
jobs: | ||
release: | ||
if: ${{ github.event_name == 'issue_comment' && contains(github.event.comment.body, '/release') }} | ||
uses: cloudposse/.github/.github/workflows/shared-go-feature-release.yml@feature-release-shared-workflow | ||
if: | | ||
github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'release/feature') | ||
uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@main | ||
with: | ||
publish: true | ||
prerelease: true | ||
format: binary | ||
environment: 'feature-releases' | ||
draft: ${{ github.event.pull_request.draft }} | ||
secrets: inherit |
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 |
---|---|---|
|
@@ -40,35 +40,42 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Build | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
run: echo "Building on ${{ matrix.os }}" | ||
|
||
- name: Add GNU tar to PATH (significantly faster than windows tar) | ||
if: matrix.target == 'windows' | ||
if: matrix.target == 'windows' && ! github.event.pull_request.draft | ||
run: echo "C:\Program Files\Git\usr\bin" >> $Env:GITHUB_PATH | ||
|
||
- name: Check out code into the Go module directory | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: "go.mod" | ||
id: go | ||
|
||
- name: Get dependencies | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
run: | | ||
make deps | ||
|
||
- name: Build | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
run: | | ||
make build-${{ matrix.target }} | ||
|
||
- name: Version | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
run: | | ||
make version-${{ matrix.target }} | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ ! ( matrix.target == 'windows' && github.event.pull_request.draft ) }} | ||
with: | ||
name: build-artifacts-${{ matrix.target }} | ||
path: | | ||
|
@@ -89,14 +96,16 @@ jobs: | |
runs-on: ${{ matrix.flavor.os }} | ||
steps: | ||
- name: Check out code into the Go module directory | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Add GNU tar to PATH (significantly faster than windows tar) | ||
if: matrix.flavor.target == 'windows' | ||
if: matrix.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
run: echo "C:\Program Files\Git\usr\bin" >> $Env:GITHUB_PATH | ||
|
||
- name: Download build artifacts for ${{ matrix.flavor.target }} | ||
uses: actions/download-artifact@v4 | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
with: | ||
name: build-artifacts-${{ matrix.flavor.target }} | ||
path: ${{ github.workspace }} | ||
|
@@ -108,7 +117,7 @@ jobs: | |
chmod +x "${{ github.workspace }}/atmos" | ||
|
||
- name: Add build artifacts directory to PATH for windows | ||
if: matrix.flavor.target == 'windows' | ||
if: matrix.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
shell: pwsh | ||
run: | | ||
$atmosPath = Join-Path ${{ github.workspace }} "atmos.exe" | ||
|
@@ -119,26 +128,29 @@ jobs: | |
|
||
- name: Install Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
with: | ||
terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
terraform_wrapper: false | ||
|
||
- name: Install OpenTofu | ||
uses: opentofu/setup-opentofu@v1 | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
with: | ||
tofu_version: ${{ env.OPEN_TOFU_VERSION }} | ||
tofu_wrapper: false | ||
|
||
# https://github.com/helmfile/helmfile-action | ||
- name: Install Helmfile | ||
uses: helmfile/[email protected] | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
with: | ||
helmfile-version: ${{ env.HELMFILE_VERSION }} | ||
helmfile-args: version | ||
helmfile-auto-init: "false" | ||
|
||
- name: Check atmos.exe integrity | ||
if: matrix.flavor.target == 'windows' | ||
if: matrix.flavor.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
shell: pwsh | ||
run: | | ||
Write-Output "PATH=$Env:PATH" | ||
|
@@ -149,11 +161,13 @@ jobs: | |
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
with: | ||
go-version-file: "go.mod" | ||
id: go | ||
|
||
- name: Get dependencies | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
run: | | ||
make deps | ||
|
||
|
@@ -172,6 +186,7 @@ jobs: | |
|
||
- name: Acceptance tests | ||
timeout-minutes: 30 | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: make testacc-cover | ||
|
@@ -371,13 +386,15 @@ jobs: | |
timeout-minutes: 20 | ||
steps: | ||
- name: Check out code into the Go module directory | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: actions/checkout@v4 | ||
|
||
- name: Add GNU tar to PATH (significantly faster than windows tar) | ||
if: matrix.flavor.target == 'windows' | ||
- name: Add GNU tar to flavor.target (significantly faster than windows tar) | ||
if: matrix.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
run: echo "C:\Program Files\Git\usr\bin" >> $Env:GITHUB_PATH | ||
|
||
- name: Download build artifacts for ${{ matrix.flavor.target }} | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: build-artifacts-${{ matrix.flavor.target }} | ||
|
@@ -390,17 +407,19 @@ jobs: | |
chmod +x "${{ github.workspace }}/atmos" | ||
|
||
- name: Add build artifacts directory to PATH for windows | ||
if: matrix.flavor.target == 'windows' | ||
if: matrix.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
run: | | ||
echo "${{ github.workspace }}" >> $Env:GITHUB_PATH | ||
|
||
- name: Install Terraform | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
terraform_version: ${{ env.TERRAFORM_VERSION }} | ||
terraform_wrapper: false | ||
|
||
- name: Install OpenTofu | ||
if: ${{ ! ( matrix.flavor.target == 'windows' && github.event.pull_request.draft ) }} | ||
uses: opentofu/setup-opentofu@v1 | ||
with: | ||
tofu_version: ${{ env.OPEN_TOFU_VERSION }} | ||
|
@@ -415,7 +434,7 @@ jobs: | |
atmos test | ||
|
||
- name: Check atmos.exe integrity | ||
if: matrix.flavor.target == 'windows' | ||
if: matrix.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
shell: pwsh | ||
run: | | ||
Write-Output "PATH=$Env:PATH" | ||
|
@@ -426,7 +445,7 @@ jobs: | |
|
||
- name: Run tests in ${{ matrix.demo-folder }} for ${{ matrix.flavor.target }} | ||
working-directory: ${{ matrix.demo-folder }} | ||
if: matrix.flavor.target == 'windows' | ||
if: matrix.flavor.target == 'windows' && ! github.event.pull_request.draft | ||
shell: pwsh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
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,54 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
|
||
e "github.com/cloudposse/atmos/internal/exec" | ||
"github.com/cloudposse/atmos/pkg/list" | ||
fl "github.com/cloudposse/atmos/pkg/list/flags" | ||
"github.com/cloudposse/atmos/pkg/schema" | ||
u "github.com/cloudposse/atmos/pkg/utils" | ||
) | ||
|
||
// listDeploymentsCmd lists atmos deployments. | ||
var listDeploymentsCmd = &cobra.Command{ | ||
Use: "deployments", | ||
Short: "List all Atmos deployments", | ||
Long: "This command lists all Atmos deployments or is used to upload deployments to the pro API.", | ||
FParseErrWhitelist: struct{ UnknownFlags bool }{UnknownFlags: false}, | ||
Args: cobra.NoArgs, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
// Check Atmos configuration | ||
checkAtmosConfig() | ||
err := ExecuteListDeploymentsCmd(cmd, args) | ||
if err != nil { | ||
u.PrintErrorMarkdownAndExit("Error listing deployments", err, "") | ||
return | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
// Add common list flags | ||
fl.AddCommonListFlags(listDeploymentsCmd) | ||
|
||
// Add deployment-specific flags | ||
listDeploymentsCmd.Flags().Bool("upload", false, "Upload deployments to pro API") | ||
|
||
// Add the command to the list command | ||
listCmd.AddCommand(listDeploymentsCmd) | ||
} | ||
|
||
func ExecuteListDeploymentsCmd(cmd *cobra.Command, args []string) error { | ||
info := &schema.ConfigAndStacksInfo{} | ||
info.Command = "list" | ||
info.SubCommand = "deployments" | ||
|
||
// Process and validate command line arguments | ||
_, err := e.ProcessCommandLineArgs("list", cmd, args, nil) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return list.ExecuteListDeploymentsCmd(info, cmd, args) | ||
} |
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
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.
Workflow not pinned – supply-chain risk
Referencing a reusable workflow by branch (
@main
) means a rogue commit could silently change your release logic. Pin to a commit SHA.📝 Committable suggestion
🤖 Prompt for AI Agents