From 1f5d88bd969a3e0a52a251248016f3b74937ec28 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Fri, 31 Jan 2025 00:32:23 +0900 Subject: [PATCH 1/4] chore: disable CGO in Makefile (#985) --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 9a37aa3cd..e4c80cbc3 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ SHELL := /bin/bash #GOARCH=amd64 VERSION=test +export CGO_ENABLED=0 # List of targets the `readme` target should call before generating the readme export README_DEPS ?= docs/targets.md From 75d6c46b4ae6f62e2ff831dac5acbb246ca77667 Mon Sep 17 00:00:00 2001 From: Haitham Rageh Date: Thu, 30 Jan 2025 17:56:37 +0200 Subject: [PATCH 2/4] Fixes and Improvements for terraform clean (#870) * fix clean cmd * feat --everything is the default behavior * remove debug print * Update website/docs/cli/commands/terraform/usage.mdx * Update website/docs/cli/commands/terraform/usage.mdx * Apply suggestions from code review * Update internal/exec/help.go * remove --everything * add integration test for terraform apply and terraform clean * chang dev with prod * move TestCLITerraformClean to new file * add clean help * improve TestCLITerraformClean * improve TestCLITerraformClean * improve clean test * add clean runCLITerraformCleanComponent * modify docs * improve test * remove clean help from help.go * add line * updates * fix clean cmd * add test for clean cmd * improve test --------- Co-authored-by: Erik Osterman (CEO @ Cloud Posse) Co-authored-by: Andriy Knysh Co-authored-by: aknysh --- internal/exec/terraform.go | 8 +- internal/exec/terraform_clean.go | 9 +- internal/exec/utils.go | 7 +- tests/cli_terraform_test.go | 175 ++++++++++++++++++ .../commands/terraform/terraform-clean.mdx | 9 +- website/docs/cli/commands/terraform/usage.mdx | 17 +- .../Screengrabs/atmos-terraform--help.html | 4 +- .../atmos-terraform-clean--help.html | 4 +- 8 files changed, 204 insertions(+), 29 deletions(-) create mode 100644 tests/cli_terraform_test.go diff --git a/internal/exec/terraform.go b/internal/exec/terraform.go index d76980d1d..c1acc4a95 100644 --- a/internal/exec/terraform.go +++ b/internal/exec/terraform.go @@ -20,7 +20,6 @@ const ( outFlag = "-out" varFileFlag = "-var-file" skipTerraformLockFileFlag = "--skip-lock-file" - everythingFlag = "--everything" forceFlag = "--force" ) @@ -37,13 +36,10 @@ func shouldProcessStacks(info *schema.ConfigAndStacksInfo) (bool, bool) { shouldProcessStacks := true shouldCheckStack := true - if info.SubCommand == "clean" && - (u.SliceContainsString(info.AdditionalArgsAndFlags, everythingFlag) || - u.SliceContainsString(info.AdditionalArgsAndFlags, forceFlag)) { + if info.SubCommand == "clean" { if info.ComponentFromArg == "" { shouldProcessStacks = false } - shouldCheckStack = info.Stack != "" } @@ -128,7 +124,7 @@ func ExecuteTerraform(info schema.ConfigAndStacksInfo) error { } } - if !info.ComponentIsEnabled { + if !info.ComponentIsEnabled && info.SubCommand != "clean" { u.LogInfo(atmosConfig, fmt.Sprintf("component '%s' is not enabled and skipped", info.ComponentFromArg)) return nil } diff --git a/internal/exec/terraform_clean.go b/internal/exec/terraform_clean.go index 709962b19..3544eae72 100644 --- a/internal/exec/terraform_clean.go +++ b/internal/exec/terraform_clean.go @@ -347,8 +347,8 @@ func handleTFDataDir(componentPath string, relativePath string, atmosConfig sche } } -func initializeFilesToClear(info schema.ConfigAndStacksInfo, atmosConfig schema.AtmosConfiguration, everything bool) []string { - if everything && info.Stack == "" { +func initializeFilesToClear(info schema.ConfigAndStacksInfo, atmosConfig schema.AtmosConfiguration) []string { + if info.ComponentFromArg == "" { return []string{".terraform", ".terraform.lock.hcl", "*.tfvar.json", "terraform.tfstate.d"} } varFile := constructTerraformComponentVarfileName(info) @@ -407,8 +407,7 @@ func handleCleanSubCommand(info schema.ConfigAndStacksInfo, componentPath string } force := u.SliceContainsString(info.AdditionalArgsAndFlags, forceFlag) - everything := u.SliceContainsString(info.AdditionalArgsAndFlags, everythingFlag) - filesToClear := initializeFilesToClear(info, atmosConfig, everything) + filesToClear := initializeFilesToClear(info, atmosConfig) folders, err := CollectDirectoryObjects(cleanPath, filesToClear) if err != nil { u.LogTrace(atmosConfig, fmt.Errorf("error collecting folders and files: %v", err).Error()) @@ -456,7 +455,7 @@ func handleCleanSubCommand(info schema.ConfigAndStacksInfo, componentPath string u.PrintMessage(fmt.Sprintf("Do you want to delete the folder '%s'? ", tfDataDir)) } var message string - if everything && info.ComponentFromArg == "" { + if info.ComponentFromArg == "" { message = fmt.Sprintf("This will delete %v local terraform state files affecting all components", total) } else if info.Component != "" && info.Stack != "" { message = fmt.Sprintf("This will delete %v local terraform state files for component '%s' in stack '%s'", total, info.Component, info.Stack) diff --git a/internal/exec/utils.go b/internal/exec/utils.go index 0b659f611..149e92949 100644 --- a/internal/exec/utils.go +++ b/internal/exec/utils.go @@ -688,9 +688,12 @@ func processArgsAndFlags( var additionalArgsAndFlags []string var globalOptions []string var indexesToRemove []int + if len(inputArgsAndFlags) == 1 && inputArgsAndFlags[0] == "clean" { + info.SubCommand = inputArgsAndFlags[0] + } - // For commands like `atmos terraform clean` and `atmos terraform plan`, show the command help - if len(inputArgsAndFlags) == 1 && inputArgsAndFlags[0] != "version" { + // For commands like `atmos terraform plan`, show the command help + if len(inputArgsAndFlags) == 1 && inputArgsAndFlags[0] != "version" && info.SubCommand == "" { info.SubCommand = inputArgsAndFlags[0] info.NeedHelp = true return info, nil diff --git a/tests/cli_terraform_test.go b/tests/cli_terraform_test.go new file mode 100644 index 000000000..53a63d0b0 --- /dev/null +++ b/tests/cli_terraform_test.go @@ -0,0 +1,175 @@ +package tests + +import ( + "bytes" + "errors" + "fmt" + "os" + "os/exec" + "path/filepath" + "testing" +) + +func TestCLITerraformClean(t *testing.T) { + // Capture the starting working directory + startingDir, err := os.Getwd() + if err != nil { + t.Fatalf("Failed to get the current working directory: %v", err) + } + + // Initialize PathManager and update PATH + pathManager := NewPathManager() + pathManager.Prepend("../build", "..") + err = pathManager.Apply() + if err != nil { + t.Fatalf("Failed to apply updated PATH: %v", err) + } + fmt.Printf("Updated PATH: %s\n", pathManager.GetPath()) + defer func() { + // Change back to the original working directory after the test + if err := os.Chdir(startingDir); err != nil { + t.Fatalf("Failed to change back to the starting directory: %v", err) + } + }() + + // Define the work directory and change to it + workDir := "../examples/quick-start-simple" + if err := os.Chdir(workDir); err != nil { + t.Fatalf("Failed to change directory to %q: %v", workDir, err) + } + + // Find the binary path for "atmos" + binaryPath, err := exec.LookPath("atmos") + if err != nil { + t.Fatalf("Binary not found: %s. Current PATH: %s", "atmos", pathManager.GetPath()) + } + + // Force clean everything + runTerraformCleanCommand(t, binaryPath, "--force") + // Clean everything + runTerraformCleanCommand(t, binaryPath) + // Clean specific component + runTerraformCleanCommand(t, binaryPath, "station") + // Clean component with stack + runTerraformCleanCommand(t, binaryPath, "station", "-s", "dev") + + // Run terraform apply for prod environment + runTerraformApply(t, binaryPath, "prod") + verifyStateFilesExist(t, []string{"./components/terraform/weather/terraform.tfstate.d/prod-station"}) + runCLITerraformCleanComponent(t, binaryPath, "prod") + verifyStateFilesDeleted(t, []string{"./components/terraform/weather/terraform.tfstate.d/prod-station"}) + + // Run terraform apply for dev environment + runTerraformApply(t, binaryPath, "dev") + + // Verify if state files exist before cleaning + stateFiles := []string{ + "./components/terraform/weather/.terraform", + "./components/terraform/weather/terraform.tfstate.d", + "./components/terraform/weather/.terraform.lock.hcl", + } + verifyStateFilesExist(t, stateFiles) + + // Run terraform clean + runTerraformClean(t, binaryPath) + + // Verify if state files have been deleted after clean + verifyStateFilesDeleted(t, stateFiles) + +} + +// runTerraformApply runs the terraform apply command for a given environment. +func runTerraformApply(t *testing.T, binaryPath, environment string) { + cmd := exec.Command(binaryPath, "terraform", "apply", "station", "-s", environment) + envVars := os.Environ() + envVars = append(envVars, "ATMOS_COMPONENTS_TERRAFORM_APPLY_AUTO_APPROVE=true") + cmd.Env = envVars + + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err := cmd.Run() + t.Log(stdout.String()) + if err != nil { + t.Fatalf("Failed to run terraform apply station -s %s: %v", environment, stderr.String()) + } +} + +// verifyStateFilesExist checks if the state files exist before cleaning. +func verifyStateFilesExist(t *testing.T, stateFiles []string) { + for _, file := range stateFiles { + fileAbs, err := filepath.Abs(file) + if err != nil { + t.Fatalf("Failed to resolve absolute path for %q: %v", file, err) + } + if _, err := os.Stat(fileAbs); errors.Is(err, os.ErrNotExist) { + t.Errorf("Expected file to exist before cleaning: %q", fileAbs) + } + } +} + +// runTerraformClean runs the terraform clean command. +func runTerraformClean(t *testing.T, binaryPath string) { + cmd := exec.Command(binaryPath, "terraform", "clean", "--force") + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err := cmd.Run() + t.Logf("Clean command output:\n%s", stdout.String()) + if err != nil { + t.Fatalf("Failed to run terraform clean: %v", stderr.String()) + } +} + +// verifyStateFilesDeleted checks if the state files have been deleted after cleaning. +func verifyStateFilesDeleted(t *testing.T, stateFiles []string) { + for _, file := range stateFiles { + fileAbs, err := filepath.Abs(file) + if err != nil { + t.Fatalf("Failed to resolve absolute path for %q: %v", file, err) + } + _, err = os.Stat(fileAbs) + if err == nil { + t.Errorf("Expected Terraform state file to be deleted: %q", fileAbs) + } else if !errors.Is(err, os.ErrNotExist) { + t.Errorf("Unexpected error checking file %q: %v", fileAbs, err) + } + } +} + +func runCLITerraformCleanComponent(t *testing.T, binaryPath, environment string) { + cmd := exec.Command(binaryPath, "terraform", "clean", "station", "-s", environment, "--force") + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err := cmd.Run() + t.Logf("Clean command output:\n%s", stdout.String()) + if err != nil { + t.Fatalf("Failed to run terraform clean: %v", stderr.String()) + } +} +func runCLITerraformClean(t *testing.T, binaryPath string) { + cmd := exec.Command(binaryPath, "terraform", "clean") + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err := cmd.Run() + t.Logf("Clean command output:\n%s", stdout.String()) + if err != nil { + t.Fatalf("Failed to run terraform clean: %v", stderr.String()) + } + +} + +func runTerraformCleanCommand(t *testing.T, binaryPath string, args ...string) { + cmdArgs := append([]string{"terraform", "clean"}, args...) + cmd := exec.Command(binaryPath, cmdArgs...) + var stdout, stderr bytes.Buffer + cmd.Stdout = &stdout + cmd.Stderr = &stderr + err := cmd.Run() + t.Logf("Clean command output:\n%s", stdout.String()) + if err != nil { + t.Fatalf("Failed to run terraform clean: %v", stderr.String()) + } +} diff --git a/website/docs/cli/commands/terraform/terraform-clean.mdx b/website/docs/cli/commands/terraform/terraform-clean.mdx index 3ddc4b341..51cff97ce 100644 --- a/website/docs/cli/commands/terraform/terraform-clean.mdx +++ b/website/docs/cli/commands/terraform/terraform-clean.mdx @@ -21,12 +21,12 @@ Execute the `terraform clean` command like this: ```shell atmos terraform clean -s [--skip-lock-file] [--everything] [--force] +``` :::warning -The `--everything` flag will delete all Terraform-related files including state files. The `--force` flag will bypass confirmation prompts. +The `clean` command, by default, deletes all Terraform-related files, including local state files, but will prompt for confirmation before proceeding. Using the `--force` flag skips the confirmation prompt and executes the deletion immediately. Use these flags with extreme caution as they can lead to irreversible data loss. ::: -``` :::tip Run `atmos terraform clean --help` to see all the available options @@ -36,10 +36,9 @@ Run `atmos terraform clean --help` to see all the available options ```shell # Delete all Terraform-related files for all components (with confirmation) -atmos terraform clean --everything - +atmos terraform clean # Force delete all Terraform-related files for all components (no confirmation) -atmos terraform clean --everything --force +atmos terraform clean --force atmos terraform clean top-level-component1 -s tenant1-ue2-dev atmos terraform clean infra/vpc -s tenant1-ue2-staging atmos terraform clean infra/vpc -s tenant1-ue2-staging --skip-lock-file diff --git a/website/docs/cli/commands/terraform/usage.mdx b/website/docs/cli/commands/terraform/usage.mdx index ce60dbee6..c3aed6b08 100644 --- a/website/docs/cli/commands/terraform/usage.mdx +++ b/website/docs/cli/commands/terraform/usage.mdx @@ -59,11 +59,14 @@ HCL-based domain-specific language and its interpreter. Atmos works with [OpenTo - `atmos terraform clean` command deletes the `.terraform` folder, `.terraform.lock.hcl` lock file, and the previously generated `planfile` and `varfile` for the specified component and stack. Use the `--skip-lock-file` flag to skip deleting the `.terraform.lock.hcl` file. - Use the `--everything` flag to delete all the local Terraform state files and directories (including `terraform.tfstate.d`) for all components and stacks. - Use the `--force` flag to bypass the safety confirmation prompt and force the deletion (use with caution). + It deletes all local Terraform state files and directories + (including [`terraform.tfstate.d`](https://developer.hashicorp.com/terraform/cli/workspaces#workspace-internals) + used for local state) for a component in a stack. + The `--force` flag bypasses the safety confirmation prompt and forces the deletion. Use with caution. :::warning - The `--everything` flag performs destructive operations that can lead to permanent state loss. Always ensure you have remote state configured in your components before proceeding. + The `clean` command performs destructive operations that can lead to permanent state loss, if not using remote backends. + Always ensure you have remote state configured in your components before proceeding. ::: - `atmos terraform workspace` command first runs `terraform init -reconfigure`, then `terraform workspace select`, and if the workspace was not @@ -113,16 +116,16 @@ atmos terraform destroy test/test-component-override -s tenant1-ue2-dev --redire atmos terraform init test/test-component-override-3 -s tenant1-ue2-dev # Clean all components (with confirmation) -atmos terraform clean --everything +atmos terraform clean # Clean a specific component -atmos terraform clean vpc --everything +atmos terraform clean vpc # Clean a specific component in a stack -atmos terraform clean vpc --stack dev --everything +atmos terraform clean vpc --stack dev # Clean without confirmation prompt -atmos terraform clean --everything --force +atmos terraform clean --force atmos terraform clean test/test-component-override-3 -s tenant1-ue2-dev atmos terraform workspace test/test-component-override-3 -s tenant1-ue2-dev diff --git a/website/src/components/Screengrabs/atmos-terraform--help.html b/website/src/components/Screengrabs/atmos-terraform--help.html index 5142abd4e..af2cfee27 100644 --- a/website/src/components/Screengrabs/atmos-terraform--help.html +++ b/website/src/components/Screengrabs/atmos-terraform--help.html @@ -20,8 +20,8 @@ - 'atmos terraform deploy' command supports '--deploy-run-init=true/false' flag to enable/disable running 'terraform init' before executing the command - 'atmos terraform apply' and 'atmos terraform deploy' commands support '--from-plan' flag. If the flag is specified, the commands will use the planfile previously generated by 'atmos terraform plan' command instead of generating a new planfile - 'atmos terraform apply' and 'atmos terraform deploy' commands commands support '--planfile' flag to specify the path to a planfile. The '--planfile' flag should be used instead of the planfile argument in the native 'terraform apply <planfile>' command - - 'atmos terraform clean' command deletes the '.terraform' folder, '.terraform.lock.hcl' lock file, and the previously generated 'planfile', 'varfile' and 'backend.tf.json' file for the specified component and stack. Use --skip-lock-file flag to skip deleting the lock file. - - 'atmos terraform clean' command supports '--everything' flag to delete all the Terraform state files and directories for all components and stacks . Use --force flag to skip the confirmation prompt. + - 'atmos terraform clean' command delete all the Terraform state files and directories for all components and stacks . deletes the '.terraform' folder, '.terraform.lock.hcl' lock file, and the previously generated 'planfile', 'varfile' and 'backend.tf.json' file for the specified component and stack. Use --skip-lock-file flag to skip deleting the lock file. + - 'atmos terraform clean' . Use --force flag to skip the confirmation prompt. - 'atmos terraform workspace' command first runs 'terraform init -reconfigure', then 'terraform workspace select', and if the workspace was not created before, it then runs 'terraform workspace new' - 'atmos terraform import' command searches for 'region' in the variables for the specified component and stack, and if it finds it, sets 'AWS_REGION=<region>' ENV var before executing the command - 'atmos terraform generate backend' command generates a backend config file for an 'atmos' component in a stack diff --git a/website/src/components/Screengrabs/atmos-terraform-clean--help.html b/website/src/components/Screengrabs/atmos-terraform-clean--help.html index 7d5710b43..0d664de16 100644 --- a/website/src/components/Screengrabs/atmos-terraform-clean--help.html +++ b/website/src/components/Screengrabs/atmos-terraform-clean--help.html @@ -8,7 +8,7 @@ 'atmos terraform clean' command deletes the following folders and files from the component's directory: - + - delete all the Terraform state files and directories for all components and stacks - '.terraform' folder - folder that the 'TF_DATA_DIR' ENV var points to - '.terraform.lock.hcl' file @@ -17,7 +17,7 @@ - generated 'backend.tf.json' file Usage: atmos terraform clean <component> -s <stack> <flags> -Use '--everything' flag to delete all the files and folders mentioned above. '--force' to delete the files without confirmation. +Use '--force' to delete the files without confirmation. Use '--skip-lock-file' flag to skip deleting the lock file. For more details refer to https://atmos.tools/cli/commands/terraform/clean From ecdbc09b9a4510c90b3da8c5e7090305d90611a3 Mon Sep 17 00:00:00 2001 From: "Erik Osterman (CEO @ Cloud Posse)" Date: Thu, 30 Jan 2025 21:01:43 -0600 Subject: [PATCH 3/4] Disable build-harness (#993) --- Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e4c80cbc3..b6f91d7d7 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,10 @@ SHELL := /bin/bash VERSION=test export CGO_ENABLED=0 -# List of targets the `readme` target should call before generating the readme -export README_DEPS ?= docs/targets.md --include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness) - -## Lint terraform code -lint: - $(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate +readme: + @echo "README.md generation temporarily disabled." + @exit 0 get: go get From 4a129d05667b0a37606f0f81d146a38812ae369b Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Fri, 31 Jan 2025 12:21:11 +0900 Subject: [PATCH 4/4] ci: format Go code by autofix.ci (#991) * ci: format Go code by autofix.ci * style: test autofix.ci * [autofix.ci] apply automated fixes * chore: enable checksum verification and update checksums automatically * [autofix.ci] apply automated fixes * ci: add the code comment about the workflow name of autofix.ci Co-authored-by: Erik Osterman (CEO @ Cloud Posse) * style: format Co-authored-by: Erik Osterman (CEO @ Cloud Posse) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Erik Osterman (CEO @ Cloud Posse) --- .github/workflows/autofix.yml | 46 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 19 --------------- aqua/aqua-checksums.json | 34 ++++++++++++++++++++++++++ aqua/aqua.yaml | 12 +++++++++ aqua/imports/gofumpt.yaml | 2 ++ 5 files changed, 94 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/autofix.yml create mode 100644 aqua/aqua-checksums.json create mode 100644 aqua/aqua.yaml create mode 100644 aqua/imports/gofumpt.yaml diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 000000000..cefda1b50 --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,46 @@ +--- +# The workflow name **must** be "autofix.ci" for Autofix CI to function correctly. +# Any deviation from this name will cause Autofix CI to fail, as it relies on this +# specific identifier for execution. This is a strict requirement of Autofix CI. +name: autofix.ci +on: pull_request +permissions: {} +jobs: + autofix: + runs-on: ubuntu-24.04 + permissions: {} + timeout-minutes: 15 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + - uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1 + with: + aqua_version: v2.43.0 + + - name: Update aqua-checksums.json + run: aqua upc -prune + + # go mod tidy + - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 + with: + go-version-file: go.mod + - run: go mod tidy + + # gofumpt + - name: Get changed Go files + id: changed-files + uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6 + with: + use_rest_api: "true" + files: | + **/*.go + - if: steps.changed-files.outputs.all_changed_files_count != '0' + env: + ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }} + run: | + # shellcheck disable=SC2086 + gofumpt -l -w $ALL_CHANGED_FILES + + + - uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 # v1.3.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a9ef4ee29..7f0e98ae0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,25 +72,6 @@ jobs: path: | ./build/ - tidy: - name: Tidy Go Modules - runs-on: ubuntu-latest - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: "go.mod" - id: go - - - uses: j0hnsmith/go-mod-check@v1 - with: - working-directory: ${{ github.workspace }} - # optional, only if you're happy to have `replace ` lines in your go.mod file - skip-replace-check: true - # run acceptance tests test: name: Acceptance Tests diff --git a/aqua/aqua-checksums.json b/aqua/aqua-checksums.json new file mode 100644 index 000000000..c6ed5ba5f --- /dev/null +++ b/aqua/aqua-checksums.json @@ -0,0 +1,34 @@ +{ + "checksums": [ + { + "id": "github_release/github.com/mvdan/gofumpt/v0.7.0/gofumpt_v0.7.0_darwin_amd64", + "checksum": "B7D05E092DA45C5EC96344AB635B1D6547C3E27C840BA39BC76989934EFD7CE3", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/mvdan/gofumpt/v0.7.0/gofumpt_v0.7.0_darwin_arm64", + "checksum": "08F23114760A090B090706D92B8C52B9875B9EB352D76C77AA354D6AA20B045A", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/mvdan/gofumpt/v0.7.0/gofumpt_v0.7.0_linux_amd64", + "checksum": "6FF459C1DCAE3B0B00844C1A5A4A5B0F547237D8A4F3624AAEA8D424AEEF24C6", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/mvdan/gofumpt/v0.7.0/gofumpt_v0.7.0_linux_arm64", + "checksum": "00C18C88EF50437629626BA20D677F4648684CB280952814CDD887677D42CBD3", + "algorithm": "sha256" + }, + { + "id": "github_release/github.com/mvdan/gofumpt/v0.7.0/gofumpt_v0.7.0_windows_amd64.exe", + "checksum": "65F5B9EA7723AA936FA6880E184624747E9E6481802B62D4CB5B774EF2350CEC", + "algorithm": "sha256" + }, + { + "id": "registries/github_content/github.com/aquaproj/aqua-registry/v4.302.1/registry.yaml", + "checksum": "908B44E94A3583AA2D6F0B17F53E49D01ACD57E4ECDFEDB29EB082D335D9445478426E591AB57D37BAA02A2EF9581A71A3AA66C825CC787323D65A1D89B53072", + "algorithm": "sha512" + } + ] +} diff --git a/aqua/aqua.yaml b/aqua/aqua.yaml new file mode 100644 index 000000000..ce421d327 --- /dev/null +++ b/aqua/aqua.yaml @@ -0,0 +1,12 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json +# aqua - Declarative CLI Version Manager +# https://aquaproj.github.io/ +checksum: + enabled: true + require_checksum: true +registries: + - type: standard + ref: v4.302.1 # renovate: depName=aquaproj/aqua-registry +packages: + - import: imports/*.yaml diff --git a/aqua/imports/gofumpt.yaml b/aqua/imports/gofumpt.yaml new file mode 100644 index 000000000..54f5e17c9 --- /dev/null +++ b/aqua/imports/gofumpt.yaml @@ -0,0 +1,2 @@ +packages: + - name: mvdan/gofumpt@v0.7.0