Skip to content

Conversation

@anryko
Copy link
Contributor

@anryko anryko commented Apr 12, 2024

what

Add a "full" configuration type for the multienv workflow step type identical to the run step type, to allow users to silence the output.

why

  • The multienv can contain a long list of variables that trashes the output.
  • Exported variable names might be security-sensitive.

tests

  • I have tested my changes by providing additional tests in the code and manually by passing the following repo config variable in my dev env.
ATLANTIS_REPO_CONFIG_JSON='
{
  "repos": [
    {
      "id": "/.*/",
      "apply_requirements": [
        "mergeable"
      ],
      "allowed_overrides": [
        "apply_requirements",
        "workflow"
      ],
      "allow_custom_workflows": true,
      "pre_workflow_hooks": [
        {
          "run": "echo \"HI IAM DEV INSTANCE\""
        }
      ]
    }
  ],
  "workflows": {
    "custom": {
      "plan": {
        "steps": [
          {
            "run": "echo \"PLAN THE STEP 1\""
          },
          {
            "multienv": {
                "command": "/atlantis/src/multienv_test.sh",
                "output": "hide"
            }
          },
          {
            "run": "echo \"PLAN THE STEP 2\""
          },
          {
            "multienv": {
                "command": "/atlantis/src/multienv_test.sh",
                "output": "show"
            }
          },
          {
            "run": "echo \"PLAN THE STEP 3\""
          },
          {
            "multienv": {
                "command": "/atlantis/src/multienv_test.sh"
            }
          },
          {
            "run": "echo \"PLAN THE STEP 4\""
          },
          {
            "multienv": "/atlantis/src/multienv_test.sh"
          }
        ]
      }
    }
  }
}'

references

@anryko anryko requested review from a team as code owners April 12, 2024 15:39
@anryko anryko requested review from GenPage, X-Guardian and lukemassa and removed request for a team April 12, 2024 15:39
@github-actions github-actions bot added docs Documentation go Pull requests that update Go code labels Apr 12, 2024
@jamengual jamengual added the waiting-on-review Waiting for a review from a maintainer label Apr 12, 2024
@Gabidiela
Copy link

Hi, do we have any plans for this solution to be implemented? I have a problem and I think this would help a lot.

@jamengual jamengual added this to the v0.28.0 milestone May 6, 2024
@chenrui333 chenrui333 added ready to merge and removed waiting-on-review Waiting for a review from a maintainer labels May 21, 2024
@chenrui333
Copy link
Member

chenrui333 commented May 21, 2024

not quite sure why e2e tests run on the merge commit

@chenrui333 chenrui333 modified the milestones: v0.28.0, v0.29.0 May 22, 2024
@chenrui333 chenrui333 added the feature New functionality/enhancement label May 29, 2024
@chenrui333 chenrui333 merged commit ded89a3 into runatlantis:main May 29, 2024
terakoya76 pushed a commit to terakoya76/atlantis that referenced this pull request Dec 31, 2024
kvanzuijlen pushed a commit to kvanzuijlen/atlantis that referenced this pull request Jan 4, 2025
Co-authored-by: PePe Amengual <[email protected]>
Co-authored-by: Rui Chen <[email protected]>
Signed-off-by: kvanzuijlen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation feature New functionality/enhancement go Pull requests that update Go code ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toggle to silence multienv output

4 participants