-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Improve local travis build #7479
Comments
I don't have much issue with it, but I don't use it a lot (I have my own tests), so I'm not the best person to judge. And @JulioJu you're contributing quite a lot recently, and I see you are french: are you coming to Devoxx next week? Or to JHipster Conf in June (I could have a free ticket for you)? |
@jdubois I've seen the programm… Too much interesting subjects ;-). I would like answer « yes » to your invitation. But actually I'm a beginner, only a student. 16 days ago I didn't know how work with Travis. And on my last PR there is a Travis bug than I don't still understand. I'm from Grenoble, so I'm going to meet @gmarziou at a meetup on 25th of april ;-) ! I would like accept your invitation. But if finally it's not possible I understand well. But If you have still ticket I'm going to be very happy to come. |
@JulioJu I'll be happy to meet you in real life :) |
@JulioJu : as Julien, I don't use this script but indeed, the issues you mentioned seem correct, specially about yarn link. So yes, go ahead and PR plz, I will review it. |
@JulioJu : about experience. In Open Source project, we don't care about that. Everyone can come and contribute :) |
@gmarziou thanks me too ;-). |
@JulioJu we have lots of students contributing to JHipster, and really we don't care at all about your experience - it's even forbidden by our code of conduct. |
@jdubois thanks a lot again ;-) ! I'm going to send you an email for the JHipster conf in june ;-). |
closing the issue as the PR is in progress and it can be tracked there |
Change the title. See explanations at #7484 (comment). |
Overview of the issue
The script build-sample.sh is totally broken.
Motivation for or Use Case
It's not cool because this script is advised at https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md#local-travis-build.
Reproduce the error
One (error)
$ git clone https://github.com/jhipster/generator-jhipster
$ cd generator-jhipster
$ yarn link
$ rm -R generators
# (should cause some problems)$ cd travis
$ ./build-samples.sh build ngx-default
Weird! All work fine!
EDIT:
$ git clone https://github.com/jhipster/generator-jhipster
$ echo "<div>coucou</div>" >> generator-jhipster/generators/client/templates/angular/src/main/webapp/app/home/home.component.html.ejs
$ cd generator-jhipster
$ yarn link
$ cd travis
$ ./build-samples.sh generate ngx-default
$ cat samples/ngx-default-sample/src/main/webapp/app/home/home.component.html | tail
Weird! We have not
<div>coucou</div>
generated at the end of the file!Two (suggestion)
As explained in #7311, all travis/script/*.sh are not executed, contrary to remote travis. If you want, correct this.
Three (suggestion)
Add
set -ex
in alltravis/**/*.sh
files-x option: «
trace for each command after it expands the command and before it executes it
» to see accurately where there is a bug.You could see the result for example at https://travis-ci.org/jhipster/generator-jhipster/builds/365781563?utm_source=github_status&utm_medium=notification. It displays a
+
sign before each bash command executed. More accurate to see where the script bug !-e option:
When this option is on, when any command fails (…) the shell immediately shall exit with the following exceptions
: so delete someecho $?
in file 05-run.shRelated issues
As explained in #7311 and in #7449 (with @deepu105, @pascalgrimaud, @gmarziou, @jdubois)
Suggest a Fix
If you want tomorrow I could make a PR for that. I have an idea.
JHipster Version(s)
Maybe this error is introduced for all local travis except ng2-gateway-uaa build by https://github.com/jhipster/generator-jhipster/blob/f2c488eae52ea6d49323a9871884ffeaf0ba8a59/travis/scripts/02-generate-project.sh, then introduced for ng2-gateway-uaa by e617fbf#diff-7f1c6970f1f47199abaa8a27c1d2e643
JHipster configuration
Irrelevant
The text was updated successfully, but these errors were encountered: