Scenario for Jenkins Pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Scenario for Jenkins Pipeline

addie k
Hey Group,

I am new to Jenkins. We are creating a CI/CD pipeline and I had some basic questions. Following is my scenario:

  1. Node project is cloned from Git repo and built.
  2. The test cases are run and unit test code coverage report is generated
  3. The artifacts are then to be used by SonarQube analysis task.
  4. With all the above steps successful, the built artifact will be pushed to cloud foundry.
  5. The artifacts here are basically the contents of the workspace directory - they are not zipped or anything. The total size is approx 200 MB.
My questions are:

  1. Will it be a good idea that task#1 and task#2 be a part of the same Jenkins project? I tried isolating them into two separate projects but since task#2 uses the artifacts in task#1, I find the copy-artifact between the two workspaces to be time-consuming.
  2. Task #3 uses the artifacts produced in Task #2 and Task #1. If I isolate Task#3 in a separate Jenkins project, I am facing the same problem of artifacts being copied and taking time. 
  3. I tried using the Jenkins "Pipeline" project. But I am confused - the tasks will use their workspace individually and create artifacts in their own job directories, so how will the pipeline bring them together? Is this even a good candidate for the pipeline? 
Sorry about this, as I am new to this, I have these questions. If you can help me understand this here, I will really appreciate! I will be happy to provide more information in case I am not clear anywhere.

Thanks,
addie

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bc141fb0-c99f-4322-a171-a9d5322d25e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Scenario for Jenkins Pipeline

addie k

After waiting for a response I thought it is best to figure these things out by myself by trial and error. 

In the end I decided to go with using pipeline.


Thanks a lot for the incredible help that I got here. Very helpful indeed.




On Tuesday, December 5, 2017 at 4:55:39 AM UTC+11, addie k wrote:
Hey Group,

I am new to Jenkins. We are creating a CI/CD pipeline and I had some basic questions. Following is my scenario:

  1. Node project is cloned from Git repo and built.
  2. The test cases are run and unit test code coverage report is generated
  3. The artifacts are then to be used by SonarQube analysis task.
  4. With all the above steps successful, the built artifact will be pushed to cloud foundry.
  5. The artifacts here are basically the contents of the workspace directory - they are not zipped or anything. The total size is approx 200 MB.
My questions are:

  1. Will it be a good idea that task#1 and task#2 be a part of the same Jenkins project? I tried isolating them into two separate projects but since task#2 uses the artifacts in task#1, I find the copy-artifact between the two workspaces to be time-consuming.
  2. Task #3 uses the artifacts produced in Task #2 and Task #1. If I isolate Task#3 in a separate Jenkins project, I am facing the same problem of artifacts being copied and taking time. 
  3. I tried using the Jenkins "Pipeline" project. But I am confused - the tasks will use their workspace individually and create artifacts in their own job directories, so how will the pipeline bring them together? Is this even a good candidate for the pipeline? 
Sorry about this, as I am new to this, I have these questions. If you can help me understand this here, I will really appreciate! I will be happy to provide more information in case I am not clear anywhere.

Thanks,
addie

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3d09e821-69df-4766-8a5a-5bef7bb87872%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Scenario for Jenkins Pipeline

Bill Dennis
Did you consider using a single declarative pipeline for this with multiple stages? If you make the agent declaration at main pipeline level, the same workspace should be used for each stage so no need to copy the 200MB of files around - see this stack overflow https://stackoverflow.com/questions/43948248/jenkins-declarative-pipeline-what-workspace-is-associated-with-a-stage-when-the

I generally find Stack Overflow better for answers to Jenkins pipeline questions, as mostly someone has already asked my question there and got an answer.

Bill


On Tuesday, 5 December 2017 22:40:20 UTC, addie k  wrote:

> After waiting for a response I thought it is best to figure these things out by myself by trial and error. 
>
>
> In the end I decided to go with using pipeline.
>
>
>
>
> Thanks a lot for the incredible help that I got here. Very helpful indeed.
>
>
>
>
>
> On Tuesday, December 5, 2017 at 4:55:39 AM UTC+11, addie k wrote:
> Hey Group,
>
>
> I am new to Jenkins. We are creating a CI/CD pipeline and I had some basic questions. Following is my scenario:
>
>
> Node project is cloned from Git repo and built.The test cases are run and unit test code coverage report is generatedThe artifacts are then to be used by SonarQube analysis task.With all the above steps successful, the built artifact will be pushed to cloud foundry.The artifacts here are basically the contents of the workspace directory - they are not zipped or anything. The total size is approx 200 MB.
> My questions are:
>
>
> Will it be a good idea that task#1 and task#2 be a part of the same Jenkins project? I tried isolating them into two separate projects but since task#2 uses the artifacts in task#1, I find the copy-artifact between the two workspaces to be time-consuming.Task #3 uses the artifacts produced in Task #2 and Task #1. If I isolate Task#3 in a separate Jenkins project, I am facing the same problem of artifacts being copied and taking time. I tried using the Jenkins "Pipeline" project. But I am confused - the tasks will use their workspace individually and create artifacts in their own job directories, so how will the pipeline bring them together? Is this even a good candidate for the pipeline? 
> Sorry about this, as I am new to this, I have these questions. If you can help me understand this here, I will really appreciate! I will be happy to provide more information in case I am not clear anywhere.
>
>
> Thanks,
> addie
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4497bc07-a385-4b2d-9f29-2d957174bb5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.