jenkinsci / seed-plugin

Seed Jenkins plug-in
https://plugins.jenkins.io/seed/
38 stars 13 forks source link

Regression on some seed branch generators #29

Closed dcoraboeuf closed 8 years ago

dcoraboeuf commented 8 years ago

After implementation of #27, I start to have errors in some branch generators, after they have been generated new.

[seed] Env: SEED_PROJECT --> ontrack-plugin
[seed] Env: SEED_BRANCH --> feature-19-pipeline
[seed] Env: SEED_GRADLE --> no
[seed] Env: BRANCH --> feature/19-pipeline
[seed] Env: PROJECT --> ontrack-plugin
[seed] Env: PROJECT_SCM_TYPE --> git
[seed] Env: PROJECT_SCM_URL --> https://github.com/jenkinsci/ontrack-plugin.git
[seed] Env: PROJECT_SCM_CREDENTIALS --> jenkins
[seed] Env: SEED_GROOVY_PATH --> null/seed.groovy
[seed] Gradle script extraction needed: false
[ontrack-plugin-feature-19-pipeline-seed] $ /bin/bash /tmp/hudson8639520653336294706.sh
[seed] No Gradle based library expansion.
[seed] No seed.groovy (expected path: ) has been generated by the pipeline library nor has been provided by the project.
Build step 'Execute shell' marked build as failure
dcoraboeuf commented 8 years ago

Available in 2.1.2

dcoraboeuf commented 8 years ago

Nope. Cannot reproduce locally - but occurs in production, only in some cases.

ricktrintech commented 8 years ago

I'm seeing the same issue:

[seed] Env: SEED_GROOVY_PATH --> seed/seed.groovy [seed] Gradle script extraction needed: false [build-automation-master-seed] $ /bin/bash /tmp/hudson6461779454376812414.sh [seed] No Gradle based library expansion. [seed] No seed.groovy (expected path: ) has been generated by the pipeline library nor has been provided by the project. Build step 'Execute shell' marked build as failure Finished: FAILURE

(Notice the (expected path: ) above is blank after the colon, supposed to be seed/seed.groovy)

Looks like the SEED_GROOVY_PATH is missing from the Build Environment/Inject Environment variables... When I manually add SEED_GROOVY_PATH=seed/seed.groovy (in the branch-seed project) to the list of injected environment variables then it works.

ricktrintech commented 8 years ago

Do I have to add SEED_GROOVY_PATH to global env. variables? I tried adding it and it resolves issue also. Thought that it would default to seed/seed.groovy.

dcoraboeuf commented 8 years ago

That's indeed a regression due to changes made for #27.

Thanks for the workaround. You can also downgrade to 2.1.1.

I'm pretty busy those days - but this remains high on my agenda. I think I'll have to use the EnvInject plugin actions to register the environment variables properly.

dcoraboeuf commented 8 years ago

Fixed in 2.1.3