Difference between revisions of "Jenkins Projects (aka Jobs)"

From Gcube Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
The easiest way to create a new project is to clone the ''gCubeTemplate'' project.
 
The easiest way to create a new project is to clone the ''gCubeTemplate'' project.
  
1. In the Jenkins interface, select New Item from the options on the left panel:
+
1. In the Jenkins interface (Jenkins interface is available at [https://jenkins.d4science.org/ https://jenkins.d4science.org/]), select New Item from the options on the left panel:
  
 
[[File:Jenkins_newItem.png|200px]]
 
[[File:Jenkins_newItem.png|200px]]
  
Jenkins interface is available at [https://jenkins.d4science.org/ https://jenkins.d4science.org/]
 
  
 
2. In the new item page, assign a name to the project
 
2. In the new item page, assign a name to the project
  
3. Scroll down until the bottom of the page and use the last option to create the new item from other existing. Insert ''gCubeTemplate'' as input (it should auto-complete).  
+
3. Scroll down until the bottom of the page and use the last option to create the new item from other existing. Insert ''gCubeProjectTemplate'' as input (it should auto-complete).  
  
 
[[File:Jenkins_newItemFromTemplate.png|600px]]
 
[[File:Jenkins_newItemFromTemplate.png|600px]]
Line 24: Line 23:
  
 
That should be enough to try to build the project with a Jenkins job.
 
That should be enough to try to build the project with a Jenkins job.
 +
 
= Examples =
 
= Examples =
  
Line 38: Line 38:
  
 
''Back to the [[Continuous_Integration_procedure_(2019) | CI guide]].''
 
''Back to the [[Continuous_Integration_procedure_(2019) | CI guide]].''
 +
 +
[[Category:Continuous_Integration]]

Latest revision as of 10:40, 4 July 2019

gCube Template Project

The easiest way to create a new project is to clone the gCubeTemplate project.

1. In the Jenkins interface (Jenkins interface is available at https://jenkins.d4science.org/), select New Item from the options on the left panel:

Jenkins newItem.png


2. In the new item page, assign a name to the project

3. Scroll down until the bottom of the page and use the last option to create the new item from other existing. Insert gCubeProjectTemplate as input (it should auto-complete).

Jenkins newItemFromTemplate.png

and confirm with OK.

4. In the new project page, you need to:

  • uncheck the "Disable this project" checkbox
  • provide the URL to the Git repo to build

Jenkins newItemRequiredChanges.png

That should be enough to try to build the project with a Jenkins job.

Examples

Source Code Management and Poll Triggers

  • set option to "Git",
  • provide the URL to your repo (e.g. https://code-repo.d4science.org/gCubeSystem/gxRest.git),
  • set the credentials to git.gcube,
  • specify */master as branch to build,
  • and in "Poll triggers" section check "Poll SCM" option with no schedule defined. This setup basically tells Jenkins to poll your Gitea repo only when requested via a webhook.

JenkinsSourceCodeManagement.png


Back to the CI guide.