Skip to content

Floodgate should return with different code when there is error in compare #128

@boscard

Description

@boscard

https://app.circleci.com/pipelines/github/codilime/floodgate/784/workflows/4f9815e0-20aa-42d8-88fb-425479fbd1dd/jobs/3486

#!/bin/bash -eo pipefail
echo "Print version using version flag"
/floodgate/bin/floodgate --version
echo "Print version using version command"
/floodgate/bin/floodgate version
echo "Comare changes - clean Spinnaker"
/floodgate/bin/floodgate -q --config ~/floodgate.yaml compare && exit 1 || echo "Found changes"
echo "Apply local resources"
/floodgate/bin/floodgate -q --config ~/floodgate.yaml sync
echo "Compare changes - synced resources"
/floodgate/bin/floodgate -q --config ~/floodgate.yaml compare

Print version using version flag
version 0.3.0-pull/126
Print version using version command
Version:		0.3.0-pull/126
Gate API version:	1.21.x
Go version:		1.14.4
Git commit:		9099505e23301e5e55cdf1dfe00f645ea0d0f806
Built:			2020-10-05_20:25:28
Comare changes - clean Spinnaker
FATA[0007] unexpected end of JSON input                 
Found changes
Apply local resources
Compare changes - synced resources

CircleCI received exit code 0

When there is such error Floodgate should exit with different code than 1 because 1 is used when there is difference between local and remote state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions