Skip to content

RUN-2205: rd jobs load : display an exit code on command failure  #548

@mazzella-c

Description

@mazzella-c

If we launch the following command with a tampered Jobs.json file (replace 'false' value in any job with 'faoylse' for example) exit code returns 0 and everything seems ok while nothing happens.

rd jobs load -v -d=update -p xxx -f /tmp/Jobs.json -F json

The same command with export RD_DEBUG=3 shows what is wrong but still returns en exit code 0 :

INFOS: {"errorCode":"api.error.jobs.import.invalid","apiversion":46,"error":true,"message":"Le document de travail nʼétait pas valide pour le format xml : org.rundeck.app.components.jobs.JobDefinitionException: Job Json Format: Unrecognized token 'faoylse': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (InputStreamReader); line: 16, column: 43] (through reference chain: java.util.ArrayList[0])"}
The command should return the correct exit code when it fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugto-jira(automation) add to jira

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions