puppetlabs / support-tasks

Module for tasks in the support kb
3 stars 23 forks source link

st0298_run_code_deploy.sh #164

Closed cummingscody closed 1 year ago

cummingscody commented 1 year ago

Describe the Bug

When passing in an environment that does not exist, the task reports success.

Expected Behavior

This should report a failure.

Steps to Reproduce

Steps to reproduce the behavior: Run the task with an environment that doesn't exist like not_a_real_env.

Additional Context

Currently this task only fails if the token is missing, or is missing code-manager.conf

[{"environment":"not_a_real_env","id":5,"status":"failed","error":{"kind":"puppetlabs.code-manager/deploy-failure","details":{"corrected-name":"not_a_real_env"},"msg":"Errors while deploying environment 'not_a_real_env' (exit code: 1):\nERROR\t -> Unable to load sources; the supplied configuration does not define the 'sources' key\n"}}]
Found 0 environments.
Found 1 environments.
[
  {
    "environment": "not_a_real_env",
    "error": {
      "details": {
        "corrected-name": "not_a_real_env"
      },
      "kind": "puppetlabs.code-manager/deploy-failure",
      "msg": "Errors while deploying environment 'not_a_real_env' (exit code: 1):\nERROR\t -> Unable to load sources; the supplied configuration does not define the 'sources' key\n"
    },
    "id": 5,
    "status": "failed"
  }
]
pillarsdotnet commented 1 year ago

@cummingscody -- Can you ask someone on the puppetlabs/support team to review #165 ?