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

after_success, after_failure, after_script don't work #130

Open
aleksandrlat opened this issue Jun 4, 2018 · 7 comments
Open

after_success, after_failure, after_script don't work #130

aleksandrlat opened this issue Jun 4, 2018 · 7 comments

Comments

@aleksandrlat
Copy link

This wiki page https://github.com/samrocketman/jervis/wiki/Build-overview is confusing about
after_success: some command
after_failure: some command
after_script: some command

I could make this sections work. Also I don't see in code they are executed.

@samrocketman
Copy link
Owner

samrocketman commented Jun 5, 2018

Hi @aleksandrlat, thanks for the report. I’m aware they aren’t implemented. Some of the documentation is a reproduction (not literal but reference) of Travis CI documentation. I will continue to evaluate but at this time I don’t have a plan to implement them. That functionality is easily replicated in bash without relying on YAML. Here’s an example.

function execute_after() {
    if [[ "$1" -eq 0 ]]; then
        # after success commands
    else
        # after failure commands
    if
    # after script commands
}
trap 'execute_after $?' EXIT
# start your build here

Because of this I decided implementing after_success and after_failure to be not very useful. I can either update the documentation or even possibly re-evaluate implementing it. Just giving you context.

@aleksandrlat
Copy link
Author

@samrocketman I started to use Jervis and found docs confusing.
Thank you for explanation!

I think you can keep this issue as reminder to do something with it. Or you can close it if you want.

@samrocketman
Copy link
Owner

I’ll keep it open because I’m still not sure about not implementing it. However, I have updated the wiki and linked to this issue as an explanation. Right now, I’m focused on fixing broken functionality before adding something like this. I’ll keep this open for a rainy day :-)

@samrocketman
Copy link
Owner

@aleksandrlat I updated the example in my comment above to also note “after script”.

@robertobado
Copy link

Hi @samrocketman, thanks for updating the docs, we had several teams in our company asking around why would those entries not be called. Apparently it's a popular feature but I totally agree with you fixing broken stuff is certainly more important. BTW congrats on the great work.

@samrocketman
Copy link
Owner

@aleksandrlat @robertobado do you expect this to behave like Travis CI?

For example, with a matrix build "after" builds occur after each matrix build and not after the overall build.

@robertobado
Copy link

Matrix build is used quite rarely in my company's case and none of the pipelines I saw using matrix build required "afters" until now. My suggestion would be to go with the easiest approach to implement. If single and multiple "afters" will demand the same effort, multiple looks more robust for me, but if single is easier to implement, that would be enough from our perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants