Merge "Update sigul macro to support sign mode" v0.33.0
authorThanh Ha (zxiiro) <thanh.ha@linuxfoundation.org>
Mon, 11 Mar 2019 22:25:21 +0000 (22:25 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Mon, 11 Mar 2019 22:25:21 +0000 (22:25 +0000)
docs/jjb/lf-macros.rst
jjb/lf-macros.yaml
jjb/lf-maven-jobs.yaml
releasenotes/notes/sign-mode-2e46e7c5e0b93135.yaml [new file with mode: 0644]
shell/sigul-sign-dir.sh

index 4d2d4f5..1d7a97b 100644 (file)
@@ -240,6 +240,7 @@ Requires ``SIGUL_BRIDGE_IP`` configured as a global envvar.
 :Required Parameters:
     :sign-artifacts: Whether or not to sign artifacts with Sigul.
     :sign-dir: Directory to sign.
+    :sign-mode: serial|parallel
 
 lf-infra-provide-docker-cleanup
 -------------------------------
index 2b6cf10..6b3faa8 100644 (file)
             - shell: !include-raw-escape: ../shell/sigul-configuration.sh
             - shell: !include-raw-escape: ../shell/sigul-install.sh
             - inject:
-                properties-content: SIGN_DIR={sign-dir}
+                properties-content: |
+                    SIGN_DIR={sign-dir}
+                    SIGN_MODE={sign-mode}
             - shell: !include-raw-escape:
-                - ../shell/common-variables.sh
                 - ../shell/sigul-sign-dir.sh
             - shell: !include-raw-escape: ../shell/sigul-configuration-cleanup.sh
 
index f82d6c6..0c5abf6 100644 (file)
     mvn-version: mvn35
     ossrh-profile-id: ''
     sign-artifacts: false
+    sign-mode: serial
     stream: master
     submodule-recursive: true
     submodule-timeout: 10
       - lf-sigul-sign-dir:
           sign-artifacts: '{sign-artifacts}'
           sign-dir: '$WORKSPACE/m2repo'
+          sign-mode: '{sign-mode}'
       - lf-maven-stage:
           mvn-global-settings: '{mvn-global-settings}'
           mvn-settings: '{mvn-settings}'
diff --git a/releasenotes/notes/sign-mode-2e46e7c5e0b93135.yaml b/releasenotes/notes/sign-mode-2e46e7c5e0b93135.yaml
new file mode 100644 (file)
index 0000000..5d4fffd
--- /dev/null
@@ -0,0 +1,24 @@
+---
+features:
+  - |
+    **lf-sigul-sign-dir** macros now supports a ``sign-mode`` parameter which
+    allows jobs to choose to sign artifacts using either *parallel* mode
+    or *serial* mode (default).
+upgrade:
+  - |
+    **lf-sigul-sign-dir** users need to add a new parameter ``sign-mode`` to
+    their job-templates setting either *parallel* or *serial* as the value, we
+    recommend setting serial mode for this setting.
+
+    **{project-name}-maven-stage-{stream}**'s Sigul signer now defaults to
+    *serial* mode instead of the previous *parallel* behaviour. To change
+    this back to the previous behaviour pass the "sign-mode" parameter to the
+    job template:
+
+    .. code-block:: yaml
+
+       - project:
+           name: parallel-sign
+           jobs:
+             - gerrit-maven-stage:
+                 sign-mode: parallel
index 8bb7bea..2bcf589 100644 (file)
@@ -13,5 +13,4 @@ echo "---> sigul-sign-dir.sh"
 # Ensure we fail the job if any steps fail.
 set -e -o pipefail
 
-lftools_activate
-lftools sign sigul "${SIGN_DIR}"
+lftools sign sigul -m "${SIGN_MODE}" "${SIGN_DIR}"