Don't run instance collection on deploy jobs 02/3802/6
authorJames E. Blair <jeblair@redhat.com>
Mon, 19 Oct 2020 21:47:47 +0000 (14:47 -0700)
committerJames E. Blair <jeblair@redhat.com>
Thu, 5 Nov 2020 18:37:01 +0000 (10:37 -0800)
The deploy jobs are run on dedicated hosts that don't have the
pre-requisites needed by the lf-infra-publishers (eg, facter,
xmlstarlet, click).  This change adds the contents of the
lf-infra-publish macro except for these post-build scripts:

  - lf-infra-sysstat
  - lf-infra-package-listing
  - lf-infra-capture-instance-metadata

And uses a modified log ship builder (Nexus only, not S3)
with fewer dependencies.

Signed-off-by: James E. Blair <jeblair@redhat.com>
Change-Id: Ia7603a70fbe1993d154d2bbafa50026be1627599

jjb/akraino-templates/akraino-jjb-kni.yaml

index 0814f6e..1e48683 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+
+# A builder to ship logs from a bare metal Akraino deploy test node.
+# Similar to lf-infra-ship-logs without python-tools-install.sh and
+# job-cost.sh.
+- builder:
+    name: kni-deploy-ship-logs
+    builders:
+      # Ensure no pre-existing .netrc files are overriding logs config
+      - lf-provide-maven-settings-cleanup
+      - config-file-provider:
+          files:
+            - file-id: "jenkins-log-archives-settings"
+              variable: "SETTINGS_FILE"
+      - lf-infra-create-netrc:
+          server-id: logs
+      - shell: !include-raw:
+          - ../../global-jjb/shell/logs-deploy.sh
+      - shell: !include-raw:
+          - ../../global-jjb/shell/logs-clear-credentials.sh
+      - description-setter:
+          regexp: "(^(Nexus|S3) build logs: .*)"
+
 - kni_common: &kni_common
     name: kni-common
 
           choosing-strategy: default
           basedir: 'installer'
 
+    publishers:
+      - postbuildscript:
+          builders:
+            - role: BOTH
+              build-on:
+                - ABORTED
+                - FAILURE
+                - NOT_BUILT
+                - SUCCESS
+                - UNSTABLE
+              build-steps:
+                - kni-deploy-ship-logs
+          mark-unstable-if-failed: true
+      - workspace-cleanup:
+          exclude:
+            # Do not clean up *.jenkins-trigger files for jobs that use a
+            # properties file as input for triggering another build.
+            - "**/*.jenkins-trigger"
+          fail-build: false
+
 - job-template:
     id: kni-installer-verify-installer
     name: '{project-name}-verify-installer'