Merge "Clarifying read the docs documentation"
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Mon, 20 Jul 2020 17:12:06 +0000 (17:12 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Mon, 20 Jul 2020 17:12:06 +0000 (17:12 +0000)
docs/jjb/lf-ci-jobs.rst
jjb/lf-ci-jobs.yaml
releasenotes/notes/include-jjb-version-param-deploy-jjb-b2c2f915274405f2.yaml [new file with mode: 0644]
releasenotes/notes/lf-pipelines-verify-86d7003f660e7974.yaml [new file with mode: 0644]
releasenotes/notes/lf-rtdv3-jobs-809e51d2bf6794d8.yaml [new file with mode: 0644]
releasenotes/notes/release-version-regex-af5a68f1cf28caf5.yaml [new file with mode: 0644]
shell/release-job.sh
shell/rtdv3.sh

index 116de87..694bf2d 100644 (file)
@@ -566,6 +566,22 @@ other file changes. Verifies INFO.yaml files follow the schema defined in
 
     :gerrit_verify_triggers: Override Gerrit Triggers.
 
+.. _lf_pipelines_verify:
+
+LF Pipelines Verify
+-------------------
+
+Verify job for the LF RelEng pipeline library. This can be implemented on any
+Jenkins machine that has the appropriate Pipelines plugins installed. It will
+look for a Gerrit system named "lf-releng" (which should be mapped to
+https://gerrit.linuxfoundation.org/infra/), and pull in the Jenkinsfile in the
+root directory of the repo.
+
+:Template Names:
+    - lf-pipelines-verify
+
+:Comment Trigger: recheck|reverify
+
 .. _license-checker:
 
 License Checker
index 9c62d97..a48f325 100644 (file)
           project: "{project}"
           stream: "{stream}"
           branch: "{branch}"
+      - lf-infra-jjb-parameters:
+          jjb-cache: "{jjb-cache}"
+          jjb-version: "{jjb-version}"
 
     wrappers:
       - lf-infra-wrappers:
 - job-template:
     name: "{project-name}-jjb-deploy-job"
     id: gerrit-jjb-deploy-job
+    <<: *lf_jjb_common
+    # yamllint disable-line rule:key-duplicates
     <<: *lf_jjb_deploy_job
 
     scm:
 - job-template:
     name: "{project-name}-jjb-deploy-job"
     id: github-jjb-deploy-job
+    <<: *lf_jjb_common
+    # yamllint disable-line rule:key-duplicates
     <<: *lf_jjb_deploy_job
 
     properties:
     <<: *lf_sonar_builders_prescan_script
     # yamllint disable-line rule:key-duplicates
     <<: *lf_sonar_github_common
+
+#############
+# Pipelines #
+#############
+
+- lf_pipelines_common: &lf_pipelines_common
+    name: lf-pipelines-common
+
+    ######################
+    # Default parameters #
+    ######################
+
+    branch: master
+    build-timeout: 90
+    disable-job: false
+    stream: master
+    submodule-recursive: true
+    submodule-timeout: 10
+    submodule-disable: false
+
+- lf_global_pipelines_common: &lf_global_pipelines_common
+    name: lf-global-pipelines-common
+
+    # All jobs are triggering from the same source
+    git-url: https://gerrit.linuxfoundation.org/infra/releng/pipelines
+    triggers:
+      - gerrit:
+          server-name: "lf-releng"
+          trigger-on:
+            - patchset-created-event:
+                exclude-drafts: true
+                exclude-trivial-rebase: false
+                exclude-no-code-change: false
+            - draft-published-event
+            - comment-added-contains-event:
+                comment-contains-value: '^Patch Set\s+\d+:\s+(recheck|reverify)\s*$'
+          projects:
+            - project-compare-type: ANT
+              project-pattern: "releng/pipelines"
+              branches:
+                - branch-compare-type: ANT
+                  branch-pattern: "**/master"
+
+- job-template:
+    name: "lf-pipelines-verify"
+    id: lf-pipelines-verify
+    <<: *lf_pipelines_common
+    <<: *lf_global_pipelines_common
+
+    project-type: pipeline
+    pipeline-scm:
+      scm:
+        - lf-infra-gerrit-scm:
+            git-url: "{git-url}"
+            refspec: "$GERRIT_REFSPEC"
+            branch: "$GERRIT_BRANCH"
+            submodule-recursive: "{submodule-recursive}"
+            submodule-timeout: "{submodule-timeout}"
+            submodule-disable: "{submodule-disable}"
+            choosing-strategy: gerrit
+            jenkins-ssh-credential: "{jenkins-ssh-credential}"
+    sandbox: true
diff --git a/releasenotes/notes/include-jjb-version-param-deploy-jjb-b2c2f915274405f2.yaml b/releasenotes/notes/include-jjb-version-param-deploy-jjb-b2c2f915274405f2.yaml
new file mode 100644 (file)
index 0000000..de14365
--- /dev/null
@@ -0,0 +1,17 @@
+---
+fixes:
+  - |
+    Fix the jjb-deploy job to accept a JJB_VERSION parameter in the parameters
+    field so that projects can select which version of JJB they want for the job.
+
+    The change that ended up breaking jjb-deploy was caused by this Gerrit
+    patch here:
+
+    https://gerrit.linuxfoundation.org/infra/c/releng/global-jjb/+/62788
+
+    The bug was introduced in the lf-env.sh when the lf-pip-install macro was
+    removed. Prior to the removal the jjb-deploy job was installing the latest
+    and greatest JJB version. However now jjb-deploy is now installing the
+    fallback version of JJB_VERSION from the lf-env.sh script which is 2.8.0.
+
+    Reference: `RELENG-3073 <https://jira.linuxfoundation.org/browse/RELENG-3073>`_
diff --git a/releasenotes/notes/lf-pipelines-verify-86d7003f660e7974.yaml b/releasenotes/notes/lf-pipelines-verify-86d7003f660e7974.yaml
new file mode 100644 (file)
index 0000000..6b2b273
--- /dev/null
@@ -0,0 +1,4 @@
+---
+features:
+  - |
+    Introduce lf-pipelines-verify job to test the LF's global pipeline library.
diff --git a/releasenotes/notes/lf-rtdv3-jobs-809e51d2bf6794d8.yaml b/releasenotes/notes/lf-rtdv3-jobs-809e51d2bf6794d8.yaml
new file mode 100644 (file)
index 0000000..3c887b5
--- /dev/null
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    Fix quoting bug in rtdv3.sh script that caused failures to exit improperly.
diff --git a/releasenotes/notes/release-version-regex-af5a68f1cf28caf5.yaml b/releasenotes/notes/release-version-regex-af5a68f1cf28caf5.yaml
new file mode 100644 (file)
index 0000000..0bf62c9
--- /dev/null
@@ -0,0 +1,7 @@
+---
+fixes:
+  - |
+    Release verify will not allow valid semver versions like "1.3.2-1"
+    which should be accepted. Update semver regex to conform to https://semver.org/
+    This regex was taken from https://github.com/fsaintjacques/semver-tool
+    which follows the semver guidances and works in bash.
index 5276a68..3ad4530 100644 (file)
@@ -218,7 +218,7 @@ verify_schema(){
 verify_version(){
     # Verify allowed patterns "#.#.#" (SemVer) or "v#.#.#"
     echo "INFO: Verifying version $VERSION"
-    allowed_version_regex="^((v?)([0-9]+)\.([0-9]+)\.([0-9]+))$"
+    allowed_version_regex="^[vV]?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\-(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(\.(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$"
     if [[ $VERSION =~ $allowed_version_regex ]]; then
         echo "INFO: The version $VERSION is valid"
     else
index 23d373d..08f98a2 100644 (file)
@@ -18,7 +18,7 @@ watchbuild(){
   buildid=$(lftools rtd project-build-trigger "$rtdproject" "$1" | jq '.build.id')
 
   result=null
-  while [ $result == null ]; do
+  while [[ "$result" == null ]]; do
     sleep 10
     result=$(lftools rtd project-build-details "$rtdproject" "$buildid"  | jq '.success')
     echo "INFO Current result of running build $result"