diff --git a/.github/workflows/test-matrix-2-levels.yml b/.github/workflows/test-matrix-2-levels.yml index 1e2ca0b..d53eda9 100644 --- a/.github/workflows/test-matrix-2-levels.yml +++ b/.github/workflows/test-matrix-2-levels.yml @@ -24,7 +24,7 @@ jobs: - uses: ./ id: current with: - atmos-gitops-config-path: "./tests/atmos-gitops.yaml" + atmos-config-path: "./tests" select-filter: '.settings.github.actions_enabled // false' nested-matrices-count: '2' diff --git a/.github/workflows/test-matrix-3-levels.yml b/.github/workflows/test-matrix-3-levels.yml index b68cca5..971ebcc 100644 --- a/.github/workflows/test-matrix-3-levels.yml +++ b/.github/workflows/test-matrix-3-levels.yml @@ -25,7 +25,7 @@ jobs: - uses: ./ id: current with: - atmos-gitops-config-path: "./tests/atmos-gitops.yaml" + atmos-config-path: "./tests" select-filter: '.settings.github.actions_enabled // false' nested-matrices-count: '3' diff --git a/.github/workflows/test-positive.yml b/.github/workflows/test-positive.yml index 514bea0..e92c50d 100644 --- a/.github/workflows/test-positive.yml +++ b/.github/workflows/test-positive.yml @@ -25,7 +25,7 @@ jobs: - uses: ./ id: current with: - atmos-gitops-config-path: "./tests/atmos-gitops.yaml" + atmos-config-path: "./tests" outputs: selected-components: "${{ steps.current.outputs.selected-components }}" diff --git a/atmos.yaml b/atmos.yaml deleted file mode 100644 index d8fa3e7..0000000 --- a/atmos.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# CLI config is loaded from the following locations (from lowest to highest priority): -# system dir (`/usr/local/etc/atmos` on Linux, `%LOCALAPPDATA%/atmos` on Windows) -# home dir (~/.atmos) -# current directory -# ENV vars -# Command-line arguments -# -# It supports POSIX-style Globs for file names/paths (double-star `**` is supported) -# https://en.wikipedia.org/wiki/Glob_(programming) - -# Base path for components, stacks and workflows configurations. -# Can also be set using `ATMOS_BASE_PATH` ENV var, or `--base-path` command-line argument. -# Supports both absolute and relative paths. -# If not provided or is an empty string, `components.terraform.base_path`, `components.helmfile.base_path`, `stacks.base_path` and `workflows.base_path` -# are independent settings (supporting both absolute and relative paths). -# If `base_path` is provided, `components.terraform.base_path`, `components.helmfile.base_path`, `stacks.base_path` and `workflows.base_path` -# are considered paths relative to `base_path`. -base_path: "" - -components: - terraform: - # Can also be set using `ATMOS_COMPONENTS_TERRAFORM_BASE_PATH` ENV var, or `--terraform-dir` command-line argument - # Supports both absolute and relative paths - base_path: "components/terraform" - # Can also be set using `ATMOS_COMPONENTS_TERRAFORM_APPLY_AUTO_APPROVE` ENV var - apply_auto_approve: false - # Can also be set using `ATMOS_COMPONENTS_TERRAFORM_DEPLOY_RUN_INIT` ENV var, or `--deploy-run-init` command-line argument - deploy_run_init: true - # Can also be set using `ATMOS_COMPONENTS_TERRAFORM_INIT_RUN_RECONFIGURE` ENV var, or `--init-run-reconfigure` command-line argument - init_run_reconfigure: true - # Can also be set using `ATMOS_COMPONENTS_TERRAFORM_AUTO_GENERATE_BACKEND_FILE` ENV var, or `--auto-generate-backend-file` command-line argument - auto_generate_backend_file: true - helmfile: - # Can also be set using `ATMOS_COMPONENTS_HELMFILE_BASE_PATH` ENV var, or `--helmfile-dir` command-line argument - # Supports both absolute and relative paths - base_path: "components/helmfile" - # Can also be set using `ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH` ENV var - kubeconfig_path: "/conf/.kube/" - # Can also be set using `ATMOS_COMPONENTS_HELMFILE_HELM_AWS_PROFILE_PATTERN` ENV var - helm_aws_profile_pattern: "{namespace}-{tenant}-gbl-{stage}-helm" - # Can also be set using `ATMOS_COMPONENTS_HELMFILE_CLUSTER_NAME_PATTERN` ENV var - cluster_name_pattern: "{namespace}-{tenant}-{environment}-{stage}-eks-cluster" - -stacks: - # Can also be set using `ATMOS_STACKS_BASE_PATH` ENV var, or `--config-dir` and `--stacks-dir` command-line arguments - # Supports both absolute and relative paths - base_path: "stacks" - # Can also be set using `ATMOS_STACKS_INCLUDED_PATHS` ENV var (comma-separated values string) - # Since we are distinguishing stacks based on namespace, and namespace is not part - # of the stack name, we have to set `included_paths` via the ENV var in the Dockerfile - included_paths: - - "orgs/**/*" - # Can also be set using `ATMOS_STACKS_EXCLUDED_PATHS` ENV var (comma-separated values string) - excluded_paths: - - "**/_defaults.yaml" - # exclude workflows directory if otherwise included in `included_paths` above - # - "workflows/**/*" - - # Can also be set using `ATMOS_STACKS_NAME_PATTERN` ENV var - name_pattern: "{tenant}-{environment}-{stage}" - -workflows: - # Can also be set using `ATMOS_WORKFLOWS_BASE_PATH` ENV var, or `--workflows-dir` command-line arguments - # Supports both absolute and relative paths - base_path: "stacks/workflows" - -logs: - verbose: false - colors: true diff --git a/tests/atmos-gitops.yaml b/tests/atmos-gitops.yaml deleted file mode 100644 index db46a85..0000000 --- a/tests/atmos-gitops.yaml +++ /dev/null @@ -1,11 +0,0 @@ -atmos-version: 1.45.3 -atmos-config-path: ./tests/ -terraform-state-bucket: cptest-core-ue2-auto-gitops -terraform-state-table: cptest-core-ue2-auto-gitops -terraform-state-role: arn:aws:iam::xxxxxxxxxxxx:role/cptest-core-ue2-auto-gitops-gha -terraform-plan-role: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops -terraform-apply-role: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops -terraform-version: 1.5.2 -aws-region: us-east-2 -sort-by: .stack_slug -group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-") diff --git a/tests/atmos.yaml b/tests/atmos.yaml index 8ee70cf..b8a9bcd 100644 --- a/tests/atmos.yaml +++ b/tests/atmos.yaml @@ -59,6 +59,23 @@ stacks: # Can also be set using `ATMOS_STACKS_NAME_PATTERN` ENV var name_pattern: "{tenant}-{environment}-{stage}" +integrations: + github: + gitops: + terraform-version: 1.5.2 + infracost-enabled: false + storage: + region: us-east-2 + bucket: cptest-core-ue2-auto-gitops + table: cptest-core-ue2-auto-gitops-plan-storage + role: arn:aws:iam::xxxxxxxxxxxx:role/cptest-core-ue2-auto-gitops-gha + role: + plan: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops + apply: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops + matrix: + sort-by: .stack_slug + group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-") + workflows: # Can also be set using `ATMOS_WORKFLOWS_BASE_PATH` ENV var, or `--workflows-dir` command-line arguments # Supports both absolute and relative paths