Update sigul macro to support sign mode 12/14812/8
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 6 Mar 2019 17:36:29 +0000 (12:36 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 7 Mar 2019 18:29:03 +0000 (13:29 -0500)
Sign mode is a parameter to allow the user to choose whether or not
to sign artifacts in parallel using gnu-parallel or in serial mode
(bash for loop) methods.

Cleanup obsolete lftools_activate method.

Change-Id: Ib202f93a37e2830e5048c5a766c17d75233c6423
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
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}"