mkobit / jenkins-pipeline-shared-libraries-gradle-plugin

Gradle plugin to help with build and test of Jenkins Pipeline Shared Libraries (see https://jenkins.io/doc/book/pipeline/shared-libraries/)
MIT License
148 stars 29 forks source link

processIntegrationTestsResources make Intellij to hide pipeline-libs #85

Open Jonatha1983 opened 5 years ago

Jonatha1983 commented 5 years ago

Hi @mkobit again !!

So I succeed reproducing the issue I was talking on in the previous comment. Before the steps I will try to present the dev environment: We have two projects:

  1. Pipeline - Only Jenkins files for various pipeline flows
  2. Pipeline-libs - The infra and utils to support the pipeline

Those two are in separate repo - but often when doing changes to the pipeline, developers need to make also changes in pipeline-libs ( not always but it happen). So we decided to include the pipeline-libs in pipeline ( again with includeBuild to avoid each user to import it in IntelliJ).

Step to reproduce:

  1. Create a sample gradle groovy project and open Intellij idea on it.
  2. IncludeBuild in the Setting file the https://github.com/mkobit/jenkins-pipeline-shared-library-example (download it if needed) -
  3. See that all the project is imported correctly.
  4. Run the processIntegrationTestResource of the example project see how all the project structure disappear.

Now this does not happen if you open only the example project - so it is related to the includeBuild some how but also when opening just the project libs after running the task Intellij mark the folder as a module ( under build/generated-src/integrationTest/) so it is a bug.

So I started to check the pipeline plugin code and I think that it should use the idea plugin to set generate source location - I found an example in this project: https://github.com/mikhailstepanov88/grpc_kotlin/tree/master/src/main/kotlin/com/github/mikhailstepanov88/grpc_kotlin/internal/plugin/configurer

I can try to fix this if you agree - it will take me some times since it is a busy week.

Also I did not found the new release in gradle plugin portal - are you planing to upload it there ?

Thanks

mkobit commented 5 years ago

I just manually released 0.9.0 because I was having some difficulties getting Circle CI to trigger on tag builds - https://plugins.gradle.org/plugin/com.mkobit.jenkins.pipelines.shared-library/0.9.0

I haven't looked into this issue, yet.

Usually, IDEA inspects the source sets of a project to know how to handle them in IntelliJ, so there isn't a need to use the idea plugin. Maybe something else is going on here.