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

neoDeploy: assert deployable exists before starting deployment. #631

Merged
merged 5 commits into from
Apr 11, 2019

Conversation

marcusholl
Copy link
Member

@marcusholl marcusholl commented Apr 2, 2019

Up to now the presence of the deployable (source) was checked late
by the NeoCommandLineHelper. The code doing this is surrounded by
the try/catch which finally also puts the log written by the neo
toolset into the job log in case an exception occured.

The check for the deployable returns with the same type of
exception like a failed neo command. Hence we cannot distiguish (ok,
would be possible to parse the exception message, but that is ugly).
When the exception is triggered by the missing deployable we try to
cat the neo log into the job log. But at this point the neo log has
not been provided - neo has not been called at all in this case.
Hence cat logs/neo/* in turn fails.

In order to avoid such a failure we check now for the presence of the
deployable earlier before launching the neo toolset.

Since the deployable is used in any deploy mode case no further check
for the deploy mode is required prior to the check for the deployable.

Up to now the presence of the deployable (source) was checked late
by the NeoCommandLineHelper. The code doing this is surrounded by
the try/catch which finally also puts the log written by the neo
toolset into the job log in case an exception occured.

The check for the deployable returns with the same type of
exception like a failed neo command. Hence we cannot distiguish (ok,
would be possible to parse the exception message, but that is ugly).
When the exception is triggered by the missing deployable we try to
cat the neo log into the job log. But at this point the neo log has
not been provided - neo has not been called at all in this case.
Hence `cat logs/neo/*` in turn fails.

In order to avoid such a failure we check now for the presence of the
deployable earlier before launching the neo toolset.

Since the deployable is used in any deploy mode case no further check
for the deploy mode is required prior to the check for the deployable.
@marcusholl
Copy link
Member Author

fixes SAP-archive/jenkins-pipelines#16

Copy link
Member

@CCFenner CCFenner left a comment

Choose a reason for hiding this comment

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

👍

@marcusholl marcusholl merged commit 2419a23 into SAP:master Apr 11, 2019
@marcusholl marcusholl deleted the pr/neoDeployCheckDeployableEarly branch October 22, 2020 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants