Skip to content

chore: validate rendered compose and surface Portainer errors in staging deploy - #206

Open
akandic47 wants to merge 1 commit into
mainfrom
chore/staging-deploy-validation
Open

chore: validate rendered compose and surface Portainer errors in staging deploy#206
akandic47 wants to merge 1 commit into
mainfrom
chore/staging-deploy-validation

Conversation

@akandic47

Copy link
Copy Markdown

Description

Improves debuggability and safety of the staging Portainer deployment:

  • Validate docker-compose.rendered.yml with docker compose config -q before sending it to Portainer. A secret that corrupts the rendered YAML (e.g. a multi-line value) now fails fast in the render step, with validator output suppressed so no secret content can appear in public logs.
  • Log the Portainer HTTP status code on deploy instead of failing with a bare curl exit 22 (--fail discards the response), while still never printing the response body.
  • Drop stale SYG_RELAYER_COINMARKETCAPCONFIG_APIKEY from the envsubst list (secret removed in feat: replace coinmarketcap with pyth pricer #200).
  • Run the cleanup step with if: always() so the rendered file with secrets is removed even when the deploy fails.

Related Issue Or Context

Staging deploys were failing with Process completed with exit code 22 and no further information.

How Has This Been Tested? Testing details.

Render and validation logic exercised locally against deploy/docker-compose.staging.yml: a valid render passes, a multi-line secret value fails validation before the Portainer call, and no file content is printed in either case.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

…ing deploy

- validate docker-compose.rendered.yml with docker compose config before
  sending it to Portainer, failing early without printing the file
- log the Portainer HTTP status code instead of failing with a bare
  curl exit 22
- drop stale SYG_RELAYER_COINMARKETCAPCONFIG_APIKEY from envsubst
- always run cleanup so the rendered file is removed on failure
@github-actions

Copy link
Copy Markdown

Go Test coverage is 36.5 %\ ✨ ✨ ✨

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