User Tools

Site Tools


toolsandtechnologies:jenkins_2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
toolsandtechnologies:jenkins_2 [2021/06/25 10:09] – external edit 127.0.0.1toolsandtechnologies:jenkins_2 [2023/06/07 17:39] (current) – [Artifactory storage] - fix url redirect aryan
Line 2: Line 2:
 ===== Introduction ===== ===== Introduction =====
  
-Jenkins 2 can be accessed at: [[http://jenkins.errigal.com:8080/|http://jenkins.errigal.com:8080]] (password for admin ins in pwSafe).+Jenkins 2 can be accessed at: [[https://jenkins.errigal.com:8443//|https://jenkins.errigal.com:8443/]] (password for admin ins in pwSafe).
  
 It is encouraged to create new projects using the Pipeline plugin of Jenkins 2 and with Jenkinsfile being part of the project SCM. It is encouraged to create new projects using the Pipeline plugin of Jenkins 2 and with Jenkinsfile being part of the project SCM.
Line 14: Line 14:
  
 ===== Integration to BitBucket ===== ===== Integration to BitBucket =====
 +
 The installed Jenkins has prepared credentials for accessing the BitBucket repositories. The installed Jenkins has prepared credentials for accessing the BitBucket repositories.
 +
 The credentials have 'bitbucket' id and can be administered at [[http://10.91.100.106:8080/credentials/store/system/domain/_/|Global credentials (unrestricted)]]. The credentials have 'bitbucket' id and can be administered at [[http://10.91.100.106:8080/credentials/store/system/domain/_/|Global credentials (unrestricted)]].
-To create password for Jenkins (or other application) go to https://bitbucket.org/account/user/**<user-name>**/app-passwords and create a new App Password (with desired Authorization). It is crucial to add at least read/write access to repositories in order to make cloning and tagging work.+ 
 +To create password for Jenkins (or other application) go to https://bitbucket.org/account/user/**<user-name>**/app-passwords and create a new App Password (with desired Authorization).  
 + 
 +{{:toolsandtechnologies:bitbucket-robot-app-password.jpg?400|}} 
 + 
 +It is crucial to add at least read/write access to repositories in order to make cloning and tagging work. 
 + 
 +**errigal_robot** account should be used for all builds, and NOT personal accounts due to the issue of account closure in Bitbucket directly affecting the build process 
 Example below shows how to use these credentials in order to clone a repo and tag it with a build number. Example below shows how to use these credentials in order to clone a repo and tag it with a build number.
  
Line 114: Line 124:
   }   }
 </code> </code>
 +
 +===== Artifactory storage ===== 
 +
 +Artifactory configuration is covered [[development:artifactory]]
 +
 +Each pipeline has a step to push the build suite (war/jar, pom, XML etc) to the artifactory store in  [[http://artifactory2.err:4041/#browse/browse:maven-candidates|Maven Candidate Storage]]. Each application has its own folder, and inside each folder there is a branch folder. These folders are either IDMS, AUTO, Support or Rel- based.
 +
 +Ideally (as of June 6th, 2023 not working) we should keep
 +
 +   *- 15 days of IDMS & AUTO 
 +   *- 30 days of SUPPORT
 +   *- Last 4 REL-
 +
 +Deployment is covered via
 +<code>
 + stage ('Deploying to candidates repo') {
 +            steps {
 +                nexusPublisher(
 +                        nexusInstanceId: 'nexusArtifactory2',
 +                        nexusRepositoryId: 'maven-candidates',
 +                        packages: [
 +                                [$class: 'MavenPackage',
 +                                 mavenAssetList: [
 +                                         [classifier: '', extension: 'jar', filePath: 'build/libs/elastic-replicator.jar']
 +                                 ],
 +                                 mavenCoordinate: [artifactId: 'elastic-replicator', groupId: 'com.errigal', packaging: 'jar', version: versionNumber]
 +                                ]
 +                        ]
 +                )
 +            }
 +        }
 +</code>
 +
 +The deployment playbooks should then source the artefact from the repo and not from our dev jenkins with a public IP interface (security risk).
 +
 +
 +
 +
  
 ===== Generating API token (e.g. for Ansible) ===== ===== Generating API token (e.g. for Ansible) =====
toolsandtechnologies/jenkins_2.1624612196.txt.gz · Last modified: 2021/06/25 10:09 by 127.0.0.1