This is Jenkins CI/CD script store for indy product and library
Designed to manage NOS team's git repository and artifact in an automated way.
release-master.Jenkinsfile
is designed to manage RELEASE in GitHub repo and sonatype maven central, and schedule build parameter in order to test release version with various tests.release-lib-master.Jenkinsfile
is similar torelease-master.Jenkinsfile
for release library used by indy. e.g. weft, galley.indy-build.Jenkinsfile
is designed to build and trigger test, archive build artifact. control build step by changing parameter in jenkins pipeline.librarybuid.Jenkinsfile
is designed to build and trigger test for library of indy, a common build pipeline for depenency of indy.Autotest.Jenkinsfile
is reference of stress test in indy build process. deprecated
To setup an complete release sequence using release-master.Jenkinsfile
- You must set up indy related buid job using
indy-build.Jenkinsfile
first, e.g indy-playground. - And you must set up two Jenkins Credential: GitHub_Bot and OSS-Nexus-Bot this are GitHub username & token and Nexus username & password
- Some step specifed the job name of pipeline defined by
indy-build.Jenkinsfile
, those are for verify the constrains and build artifact, those are not critical, if job name has changed, change it as well.\ - To release from master or other branch, use
INDY_GIT_BRANCH:master
in release-master.Jenkinsfile. - The pipeline will fail and notify user if attempt to release a verion with SNAPSHOT in dependency tree by email.
indy-build.Jenkinsfile
are versatile for various configuration, it's mainly for verify commit by build and black/white box test
e.g.
- To set up auto build job for master banch commit verification , use Default Value set down below, and trigger by poll-scm.
- For nightly build, use build periodically and enable
FUNCTIONAL_TEST:true
boolean,STRESS_TEST:true
boolean. to detect performance change nightly. - To build artifact for release in maven central use
INDY_GIT_BRANCH:release
INDY_MAJOR_VERSION:nextversion
INDY_DEV_IMAGE_TAG:latest-release
QUAY_TAG:latest-release
. and pipeline will archive all artifact needed for upload to sonatype. - Setting for pull request verification, change setting like
INDY_GIT_BRANCH:or origin/pull/1507/head
and turnFORCE_PUBLISH_IMAGE:false
boolean
Deprecated
Set up performance benchmark by Autotest.Jenkinsfile
, see parameter requirement downbelow.
This is a reference of critical step for CI/CD, and a requirement if STRESS_TEST
set to be true
.
The STRESS_TEST
Jenkins job requirement is not limited to Autotest.Jenkinsfile
, any equivalent Jenkins job meets requirement will work
release-master required
Parameters | Type | Default Value |
---|---|---|
JENKINS_AGENT_CLOUD_NAME | String | openshift |
JDK_VERSION | String | 11 |
INDY_GIT_BRANCH | String | master |
INDY_GIT_REPO | String | https://github.com/Commonjava/indy |
INDY_MAJOR_VERSION | String | 2.0.0 |
INDY_DEV_VERSION | String | 2.0.1 |
MAIL_ADDRESS | String | [email protected] |
BOT_EMAIL | String | *@Commonjava.org |
SKIP_VERIFICATION | Boolean | false |
JDK_VERSION
supports only 1.8.0 or 11INDY_GIT_BRANCH
should be maint or master etc, but proceed with careful, as it perform merge and push.INDY_DEV_VERSION
don't have to set this up if you are about to increase it by one. e.g. 2.2.0 -> 2.2.1-SNAPSHOT and do not include "-SNAPSHOT"- Credential
GitHub_Bot
in Jenkins is GitHub account username and password, able to accessINDY_GIT_BRANCH
. - Credential
OSS-Nexus-Bot
also needed to access sonatype nexus.
release-lib-master required
Parameters | Type | Default Value |
---|---|---|
JENKINS_AGENT_CLOUD_NAME | String | openshift |
JDK_VERSION | String | 11 |
LIB_GIT_BRANCH | String | master |
LIB_GIT_REPO | String | https://github.com/Commonjava/weft |
LIB_NAME | String | weft |
LIB_MAJOR_VERSION | String | 1.14 |
LIB_DEV_VERSION | String | 1.15 |
MAIL_ADDRESS | String | [email protected] |
BOT_EMAIL | String | *@Commonjava.org |
JDK_VERSION
supports only 1.8.0 or 11LIB_MAJOR_VERSION
set correct version you're about to release!LIB_DEV_VERSION
don't have to set this up if you are about to increase it by one. e.g. 1.7 -> 1.8-SNAPSHOT and do not include "-SNAPSHOT"- Credential
GitHub_Bot
in Jenkins is GitHub account username and password, able to accessLIB_GIT_BRANCH
. - Credential
OSS-Nexus-Bot
also needed to access sonatype nexus.
indy-build required
Parameters | Type | Default Value |
---|---|---|
JENKINS_AGENT_CLOUD_NAME | String | openshift |
JDK_VERSION | String | 11 |
INDY_GIT_BRANCH | String | master |
INDY_GIT_REPO | String | https://github.com/Commonjava/indy |
INDY_MAJOR_VERSION | String | 2.0.0 |
INDY_PREPARE_RELEASE | Boolean | false |
INDY_IMAGESTREAM_NAME | String | indy_binary |
INDY_IMAGESTREAM_NAMESPACE | String | nos-automation |
INDY_DEV_IMAGE_TAG | String | latest |
FORCE_PUBLISH_IMAGE | Boolean | false |
TAG_INTO_IMAGESTREAM | Boolean | true |
MAIL_ADDRESS | String | [email protected] |
TOWER_HOST | String | '' |
TOWER_TEMPLATE_NUMBER | String | 850 |
FUNCTIONAL_TEST | Boolean | true |
STRESS_TEST | Boolean | true |
QUAY_IMAGE_TAG | String | latest |
JDK_VERSION
supports only 1.8.0 or 11JENKINS_AGENT_CLOUD_NAME
should be kubernetes plugin cluser nameINDY_GIT_BRANCH
can also be git commit reference e.g.:commit id or origin/pull/1507/headINDY_MAJOR_VERSION
is optional, only needed when release a new version e.g. building release artifact.INDY_PREPARE_RELEASE
is controling if the version should be changed during build, e.g change from2.0-SNAPSHOT
to2.0.0
.TOWER_HOST
is the jenkins tower used to deploy a test envrioment.TOWER_TEMPLATE_NUMBER
850 is templpate id ofnos-automation - deploy-indy-perf
.- Jenkins Credential Username and Password
Tower_Auth
is needed and script can access it. - Skipp maven functional test and jmeter stress test by disable
FUNCTIONAL_TEST
andSTRESS_TEST
. QUAY_IMAGE
tag must be latest in order to runSTRESS_TEST
, it's needed by ansible to deploy.
librarybuild required
Parameters | Type | Default Value |
---|---|---|
JENKINS_AGENT_CLOUD_NAME | String | openshift |
LIB_GIT_BRANCH | String | master |
LIB_GIT_REPO | String | https://github.com/Commonjava/weft |
LIB_NAME | String | weft |
LIB_MAJOR_VERSION | String | 1.0.0 |
MAIL_ADDRESS | String | [email protected] |
LIB_NAME
should be the name of library the job is building.LIB_GIT_BRANCH
can also be git commit reference e.g.:commit id or origin/pull/*/headLIB_MAJOR_VERSION
is optional, only needed when release a new version e.g. building release artifact.
Autotest required
- Deprecated
Parameters | Type | Default Value |
---|---|---|
JENKINS_AGENT_CLOUD_NAME | String | openshift |
THREADS | String | 5 |
INDY_HOSTNAME | String | indy-perf.example.com |
LOOPS | String | 10 |
THREADS
controls concurrent client simulation, andLOOPS
controls total time of stress test.INDY_HOSTNAME
should be where indy have been deployed, MUST NOT include protocal likehttp://
orhttps://