Merge "Add submodule-timeout for submodule operations"
authorThanh Ha (zxiiro) <thanh.ha@linuxfoundation.org>
Fri, 19 Oct 2018 19:10:19 +0000 (19:10 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Fri, 19 Oct 2018 19:10:19 +0000 (19:10 +0000)
14 files changed:
docs/install.rst
docs/jjb/lf-ci-jobs.rst
docs/jjb/lf-macros.rst
jenkins-init-scripts/create-jenkins-user.sh
jenkins-init-scripts/init.sh
jjb/lf-ci-jobs.yaml
jjb/lf-macros.yaml
releasenotes/notes/fix-jenkins-init-scripts-dir-a448c059855bda50.yaml [new file with mode: 0644]
releasenotes/notes/fix-packer-validate-clouds-yaml-3e3268b7c427f456.yaml [new file with mode: 0644]
releasenotes/notes/windows-publisher-6034c5c850108eba.yaml [new file with mode: 0644]
requirements.txt
shell/jenkins-configure-clouds.sh
shell/jenkins-configure-global-vars.sh
shell/python-tools-install.sh

index 49bc041..6a9c136 100644 (file)
@@ -114,8 +114,6 @@ Global JJB as follows:
       mkdir jjb/global-jjb
       ln -s ../../global-jjb/shell jjb/global-jjb/shell
       ln -s ../../global-jjb/jjb jjb/global-jjb/jjb
-      ln -s ../../global-jjb/jenkins-admin jjb/global-jjb/jenkins-admin
-      ln -s ../../global-jjb/jenkins-init-scripts jjb/global-jjb/jenkins-init-scripts
       git add jjb/global-jjb
 
       git commit -sm "Install global-jjb $GLOBAL_JJB_VERSION"
index 4eda20c..0ca1572 100644 (file)
@@ -605,6 +605,9 @@ Packer Verify job runs `packer validate` to verify packer configuration.
     :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
     :build-timeout: Timeout in minutes before aborting build. (default: 10)
     :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+    :openstack: Packer template uses an OpenStack builder (default: true).
+    :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
+        (default: vex).
     :packer-cloud-settings: Name of settings file containing credentials
         for the cloud that packer will build on. (default: packer-cloud-env)
     :packer-version: Version of packer to install / use in build. (default: 1.0.2)
index 34f9e96..2750b11 100644 (file)
@@ -125,6 +125,8 @@ Run `packer validate` to verify packer configuration.
 
 :Required parameters:
 
+    :openstack: Packer template uses an OpenStack builder (true|false).
+    :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
     :packer-cloud-settings: Cloud configuration file. Loaded on the build
         server as CLOUDENV environment variable.
     :packer-version: Version of packer to use.
@@ -295,6 +297,12 @@ Provides basic lf-infra recommended publisher configurations which should be
 used in all job templates. This primary objective of this trigger is to
 gather build logs and copy them to a log server.
 
+lf-infra-publish-windows
+------------------------
+
+Windows publisher for use at the end of Windows job templates. Takes care of
+cleaning out the workspace at the end of a job.
+
 lf-stack-delete
 ---------------
 
index 40ac25f..0005244 100755 (executable)
 ##############################################################################
 
 OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
+OS_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]')
+
+if [[ "$OS_RELEASE" == "18.04" ]] && [[ "$OS" == 'ubuntu' ]]
+then
+  echo 'PATH=$HOME/.local/bin:$PATH
+export PATH' >> /etc/profile
+fi
 
 useradd -m -s /bin/bash jenkins
 
index 3ddcc6f..1bd2229 100755 (executable)
@@ -9,7 +9,7 @@
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
-INIT_SCRIPTS_DIR="/opt/ciman/jjb/global-jjb/jenkins-init-scripts"
+INIT_SCRIPTS_DIR="/opt/ciman/global-jjb/jenkins-init-scripts"
 
 "$INIT_SCRIPTS_DIR/package-listing.sh"
 "$INIT_SCRIPTS_DIR/basic-settings.sh"
index 5e47387..638716e 100644 (file)
 
     builders:
       - shell: |
-          cd jjb/global-jjb
+          cd global-jjb
           git fetch https://gerrit.linuxfoundation.org/infra/releng/global-jjb $GERRIT_REFSPEC
           git cherry-pick FETCH_HEAD
       - lf-infra-jjbini
     ######################
 
     build-timeout: 10
+    openstack: true
+    openstack-cloud: vex
 
     gerrit_verify_triggers:
       - patchset-created-event:
 
     builders:
       - lf-infra-packer-validate:
+          openstack: '{openstack}'
+          openstack-cloud: '{openstack-cloud}'
           packer-cloud-settings: '{packer-cloud-settings}'
           packer-version: '{packer-version}'
 
index da6d726..f608fed 100644 (file)
 - builder:
     name: lf-infra-packer-validate
     builders:
+      - conditional-step:
+          condition-kind: boolean-expression
+          condition-expression: '{openstack}'
+          steps:
+            - config-file-provider:
+                files:
+                  - file-id: clouds-yaml
+                    target: '$HOME/.config/openstack/clouds.yaml'
+            - inject:
+                properties-content: OS_CLOUD={openstack-cloud}
       - config-file-provider:
           files:
             - file-id: '{packer-cloud-settings}'
-              variable: 'CLOUDENV'
+              variable: CLOUDENV
       - inject:
           properties-content: |
               PACKER_VERSION={packer-version}
             - '**/*.jenkins-trigger'
           fail-build: false
 
+- publisher:
+    name: lf-infra-publish-windows
+    # lf-infra macro to finish up a build.
+    #
+    # Handles the following:
+    #   - Shipping logs to Nexus logs site repository
+    #   - Cleanup workspace
+    publishers:
+      # TODO: RELENG-1228 Develop log shipping script for Windows systems
+      # - postbuildscript:
+      #     builders:
+      #       - role: BOTH
+      #         build-on:
+      #           - ABORTED
+      #           - FAILURE
+      #           - NOT_BUILT
+      #           - SUCCESS
+      #           - UNSTABLE
+      #         build-steps:
+      #           - lf-infra-ship-logs-windows
+      #     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
+
 - publisher:
     name: lf-stack-delete
     publishers:
diff --git a/releasenotes/notes/fix-jenkins-init-scripts-dir-a448c059855bda50.yaml b/releasenotes/notes/fix-jenkins-init-scripts-dir-a448c059855bda50.yaml
new file mode 100644 (file)
index 0000000..4f2accb
--- /dev/null
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    The jenkins-init scripts dir is now updated to reflect changes recommended
+    for the v0.25.0 release. We unfortunately missed this critical piece in the
+    v0.25.0 release.
diff --git a/releasenotes/notes/fix-packer-validate-clouds-yaml-3e3268b7c427f456.yaml b/releasenotes/notes/fix-packer-validate-clouds-yaml-3e3268b7c427f456.yaml
new file mode 100644 (file)
index 0000000..5e36a5a
--- /dev/null
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    Fix packer-verify job to correctly work with ``clouds.yaml`` config model
+    implemented in global-jjb v0.25.0.
diff --git a/releasenotes/notes/windows-publisher-6034c5c850108eba.yaml b/releasenotes/notes/windows-publisher-6034c5c850108eba.yaml
new file mode 100644 (file)
index 0000000..652bbe3
--- /dev/null
@@ -0,0 +1,5 @@
+---
+features:
+  - |
+    Add ``lf-infra-publish-windows``. A publisher for use at the end of Windows
+    based job-templates.
index 9bd973a..d2a8071 100644 (file)
@@ -1,4 +1,4 @@
-reno~=2.10.0
+reno~=2.11.2
 sphinx~=1.7.9
 sphinxcontrib-programoutput
 sphinx_bootstrap_theme>=0.6.0
index ed72f74..59c80a0 100644 (file)
@@ -28,7 +28,7 @@
 #
 #    export WORKSPACE=/tmp/ci-management
 #    export jenkins_silos=sandbox
-#    bash ./jjb/global-jjb/shell/jenkins-configure-clouds.sh
+#    bash ./global-jjb/shell/jenkins-configure-clouds.sh
 echo "---> jenkins-configure-clouds.sh"
 
 if [ ! -d "$WORKSPACE/jenkins-config/clouds" ]; then
@@ -36,7 +36,7 @@ if [ ! -d "$WORKSPACE/jenkins-config/clouds" ]; then
     exit 0
 fi
 
-GROOVY_SCRIPT_FILE="jjb/global-jjb/jenkins-admin/manage_clouds.groovy"
+GROOVY_SCRIPT_FILE="global-jjb/jenkins-admin/manage_clouds.groovy"
 OS_CLOUD_DIR="$WORKSPACE/jenkins-config/clouds/openstack"
 SCRIPT_DIR="$WORKSPACE/archives/groovy-inserts"
 mkdir -p "$SCRIPT_DIR"
index 2ebdcee..eb25de0 100644 (file)
@@ -18,7 +18,7 @@
 #                     configuration to. (default: jenkins)
 echo "---> jenkins-configure-global-vars.sh"
 
-GROOVY_SCRIPT_FILE="jjb/global-jjb/jenkins-admin/set_global_properties.groovy"
+GROOVY_SCRIPT_FILE="global-jjb/jenkins-admin/set_global_properties.groovy"
 
 silos="${jenkins_silos:-jenkins}"
 
index c607dcb..254fa77 100644 (file)
@@ -14,7 +14,7 @@ set -eux -o pipefail
 REQUIREMENTS_FILE=$(mktemp /tmp/requirements-XXXX.txt)
 
 cat << EOF > "$REQUIREMENTS_FILE"
-lftools~=0.17.1
+lftools~=0.18.0
 python-heatclient~=1.16.1
 python-openstackclient~=3.16.0
 EOF