X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=docs%2Fjjb%2Flf-release-jobs.rst;h=dddaac31404803dde4c86730881ed0ac3df05471;hb=5fe7f08ff027accd25c96df8bc3f88030f89ffb7;hp=f5572473113294e34bc2588342e68cb17dffc346;hpb=82c8847bbd144b67331d2268919ce6422e481b94;p=releng%2Fglobal-jjb.git diff --git a/docs/jjb/lf-release-jobs.rst b/docs/jjb/lf-release-jobs.rst index f5572473..dddaac31 100644 --- a/docs/jjb/lf-release-jobs.rst +++ b/docs/jjb/lf-release-jobs.rst @@ -4,14 +4,36 @@ Self Serve Release Jobs ####################### -Self serve release jobs allow a project to create a releases directory and then place a release file in it. -Jenkins will pick this up and then promote the artifact from the staging log directory (log_dir) and tag the release -with the defined version. maven_central_url is optional +Self serve release jobs allow a project to create a releases/ or .releases/ directory and then place a release yaml file in it. +Jenkins will pick this up and sign the ref extrapolated by log_dir and promote the artifact, whether maven or container. + +Maven release jobs can also trigger via "Build with parameters" negating the need for a release file. +The parameters will need to be filled out in the same was as a release file's would, excepting the special +USE_RELEASE_FILE and DRY_RUN check boxes. The USE_RELEASE_FILE check box will need to be unchecked, if the job +is expected to run with a release file, while passing the required information as build parameters. +Similarly, the DRY_RUN check box will need to be unchecked, if the job needs to be tested while skipping +repository promotion to Nexus. + +The Special Parameters are as follows: + +GERRIT_BRANCH = master +VERSION = 1.0.0 +LOG_DIR = example-project-maven-stage-master/17/ +DISTRIBUTION_TYPE = maven +USE_RELEASE_FILE = false +DRY_RUN = false .. note:: Example of a maven release file: +.. note:: + + Release files regex: (releases\/.*\.yaml|\.releases\/.*\.yaml) + directory can be .releases/ or releases/ + file can be ANYTHING.yaml + + .. code-block:: bash $ cat releases/maven-1.0.0.yaml @@ -30,8 +52,12 @@ with the defined version. maven_central_url is optional --- distribution_type: 'container' version: '1.0.0' - project: 'example-project' - log_dir: 'example-project-maven-docker-stage-master/17/' + project: 'test' + containers: + - name: test-backend + version: 1.0.0-20190806T184921Z + - name: test-frontend + version: 1.0.0-20190806T184921Z .. note:: @@ -109,7 +135,7 @@ Jenkins ======= Add a global credential to Jenkins called ``jenkins-release`` and set the ID: ``'jenkins-release'`` -as its value insert the private portion of the ``ssh-key`` that you created for your Gerrit user. +as its value insert the private half of the ``ssh-key`` that you created for your Gerrit user. Add Global vars in Jenkins: Jenkins configure -> Global properties -> Environment variables @@ -161,21 +187,8 @@ Job Templates Release Merge ------------- -Runs: - -- sigul-install -- sigul-configuration -- checkout ref from taglist.log -- applies the $PROJECT.bundle -- signs, tags and pushes - -.. code-block:: bash - - lftools nexus release --server $NEXUS_URL $STAGING_REPO - - :Template Name: - - {project-name}-release-merge-{stream} + - {project-name}-release-merge :Comment Trigger: remerge @@ -198,25 +211,15 @@ Runs: file modifications will trigger a build. **default**:: - - compare-type: ANT - pattern: 'releases/*.yaml' + - compare-type: REG_EXP + pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)' Release Verify ------------------ -Release verify job checks the schema and ensures that the staging-repo.txt.gz -is available on the job. - -- sigul-install -- sigul-configuration -- checkout ref from taglist.log -- applies the $PROJECT.bundle -- signs and shows signature - - :Template Names: - - {project-name}-release-verify-{stream} + - {project-name}-release-verify :Comment Trigger: recheck|reverify @@ -244,5 +247,5 @@ is available on the job. file modifications will trigger a build. **default**:: - - compare-type: ANT - pattern: 'releases/*.yaml' + - compare-type: REG_EXP + pattern: '(releases\/.*\.yaml|\.releases\/.*\.yaml)'