Skip to content
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

Turn off echo'ing for some tasks #546

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Turn off echo'ing for some tasks #546

merged 1 commit into from
Jan 9, 2025

Conversation

xendk
Copy link
Contributor

@xendk xendk commented Dec 6, 2024

Tasks that contain a lot of shell code and echo their own status should be silenced to limit the amount of (useless) output.

@ITViking
Copy link
Contributor

ITViking commented Dec 9, 2024

are we loosing any vital information here, which, if left in place, would allow us to now in which step something went wrong?

@xendk
Copy link
Contributor Author

xendk commented Dec 12, 2024

@ITViking Nope, it just suppresses printing the command before running it. Basically avoiding filling your terminal with

          if [ -z "{{.SKIP}}" ]; then
            if [ "$(lagoon get project --project "{{.SITE}}" --output-json | jq '.data[0].id' --raw-output)" = "0" ]; then
              PROJECT_NAME="{{.SITE}}" GIT_URL="{{.GIT_URL}}" BRANCHES="{{.BRANCHES}}" task lagoon:project:add;
            else
              PROJECT_NAME="{{.SITE}}" GIT_URL="{{.GIT_URL}}" BRANCHES="{{.BRANCHES}}" task lagoon:project:update;
            fi
          else
            echo "Skipped project ensure."
          fi

Any output from the command is still output.

@xendk xendk requested a review from a team January 6, 2025 22:09
Copy link
Contributor

@ITViking ITViking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's try it out

Tasks that contain a lot of shell code and echo their own status
should be silenced to limit the amount of (useless) output.
@ITViking ITViking merged commit a259389 into main Jan 9, 2025
2 checks passed
@ITViking ITViking deleted the shh-please branch January 9, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants