- inject:
properties-content: 'jenkins_silos={jenkins-silos}'
- shell: !include-raw-escape: ../shell/jenkins-configure-clouds.sh
- - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
+ - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
- builder:
name: lf-jenkins-cfg-global-vars
- inject:
properties-content: 'jenkins_silos={jenkins-silos}'
- shell: !include-raw-escape: ../shell/jenkins-configure-global-vars.sh
- - shell: rm "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
+ - shell: rm -f "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
- lf_jenkins_configuration: &lf_jenkins_cfg_merge
name: lf-jenkins-cfg-merge
jenkins-ssh-credential: '{jenkins-ssh-credential}'
builders:
- - shell: !include-raw-escape:
- - ../shell/lftools-install.sh
+ - lf-infra-pre-build
- lf-jenkins-cfg-global-vars:
jenkins-silos: '{jenkins-silos}'
- lf-jenkins-cfg-clouds:
#####################
builders:
+ - lf-infra-pre-build
- lf-infra-jjbini
- shell: !include-raw-escape:
- ../shell/jjb-install.sh
concurrent: true
builders:
+ - lf-infra-pre-build
- lf-infra-jjbini
- shell: !include-raw-escape:
- ../shell/git-validate-jira-urls.sh
disabled: '{disable-job}'
builders:
+ - lf-infra-pre-build
- lf-maven-install:
mvn-version: '{mvn-version}'
- lf-update-java-alternatives:
disabled: '{disable-job}'
builders:
+ - lf-infra-pre-build
- lf-maven-install:
mvn-version: '{mvn-version}'
- lf-update-java-alternatives:
- shell: !include-raw-escape:
- ../shell/common-variables.sh
- ../shell/maven-javadoc-generate.sh
- - ../shell/lftools-install.sh
- ../shell/maven-javadoc-publish.sh
- lf-provide-maven-settings-cleanup
disabled: '{disable-job}'
builders:
+ - lf-infra-pre-build
- lf-maven-install:
mvn-version: '{mvn-version}'
- lf-update-java-alternatives:
disabled: '{disable-job}'
builders:
+ - lf-infra-pre-build
- lf-jacoco-nojava-workaround
- lf-maven-install:
mvn-version: '{mvn-version}'
properties-content: |
NEXUS_CUT_DIRS={nexus-cut-dirs}
NEXUS_REPO={nexus-snapshot-repo}
- - shell: !include-raw-escape:
- - ../shell/lftools-install.sh
- - ../shell/maven-fetch-metadata.sh
+ - shell: !include-raw-escape: ../shell/maven-fetch-metadata.sh
- lf-maven-build:
mvn-goals: '{mvn-goals}'
- lf-maven-deploy
description: Nexus staging profile ID.
builders:
+ - lf-infra-pre-build
- lf-jacoco-nojava-workaround
- lf-maven-install:
mvn-version: '{mvn-version}'
settings-file: '{mvn-settings}'
- lf-infra-create-netrc:
server-id: '{mvn-staging-id}'
- - shell: !include-raw-escape:
- - ../shell/lftools-install.sh
- - ../shell/maven-patch-release.sh
+ - shell: !include-raw-escape: ../shell/maven-patch-release.sh
- lf-maven-build:
mvn-goals: '{mvn-goals}'
- lf-sigul-sign-dir:
notbuilt: true
builders:
+ - lf-infra-pre-build
- lf-infra-maven-sonar:
java-version: '{java-version}'
mvn-settings: '{mvn-settings}'
disabled: '{disable-job}'
builders:
+ - lf-infra-pre-build
- lf-jacoco-nojava-workaround
- lf-maven-install:
mvn-version: '{mvn-version}'
- lf-provide-maven-settings:
global-settings-file: '{mvn-global-settings}'
settings-file: '{mvn-settings}'
- - shell: !include-raw-escape:
- - ../shell/lftools-install.sh
- lf-maven-build:
mvn-goals: '{mvn-goals}'
- lf-provide-maven-settings-cleanup
disabled: '{disable-job}'
builders:
+ - lf-infra-pre-build
- lf-jacoco-nojava-workaround
- lf-maven-install:
mvn-version: '{mvn-version}'
can call "org.codehaus.mojo:sonar-maven-plugin:3.3.0.603:sonar".
builders:
- - shell: !include-raw-escape:
- # Workaround issue where the tox run later breaks the lftools virtualenv.
- # Without running the install first the run in the publisher will fail
- # due to missing lftools because it gets installed into a tox venv.
- - ../shell/lftools-install.sh
+ - lf-infra-pre-build
- lf-infra-tox-install:
python-version: '{python-version}'
- shell: !include-raw-escape: ../shell/tox-run.sh
--- /dev/null
+---
+fixes:
+ - |
+ Fix jobs failing with UNSTABLE build due to install pip==18.0 missing.
+ This change moves all the jobs to using lf-infra-pre-build to install
+ lftools via --user command.
exit 0
fi
-#shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source "/tmp/v/lftools/bin/activate"
-
GROOVY_SCRIPT_FILE="jjb/global-jjb/jenkins-admin/manage_clouds.groovy"
OS_CLOUD_DIR="$WORKSPACE/jenkins-config/clouds/openstack"
SCRIPT_DIR="$WORKSPACE/archives/groovy-inserts"
GROOVY_SCRIPT_FILE="jjb/global-jjb/jenkins-admin/set_global_properties.groovy"
-# shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091
-source "/tmp/v/lftools/bin/activate"
silos="${jenkins_silos:-jenkins}"
set -eu -o pipefail
# shellcheck source="$WORKSPACE/.jjb.properties" disable=SC1091
source "$WORKSPACE/.jjb.properties"
if [[ -n "$JJB_VENV" && "$JJB_VENV" =~ /tmp/.* ]]; then
- rm -r "$JJB_VENV" && echo "$JJB_VENV removed"
+ rm -rf "$JJB_VENV" && echo "$JJB_VENV removed"
unset JJB_VENV
fi
-rm "$WORKSPACE/.jjb.properties"
+rm -f "$WORKSPACE/.jjb.properties"
+deactivate
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
echo "JJB_VENV=$JJB_VENV" > "$WORKSPACE/.jjb.properties"
# shellcheck source=$VENV_DIR/bin/activate disable=SC1091
source "$JJB_VENV/bin/activate"
-pip install --quiet --upgrade "pip==9.0.3" setuptools
-pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION"
+python -m pip install --quiet --upgrade "jenkins-job-builder==$JJB_VERSION"
echo "----> pip freeze"
pip freeze
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
# Ensure we fail the job if any steps fail.
set -xeu -o pipefail
-lftools_activate
-
TMP_FILE="$(mktemp)"
lftools deploy nexus-stage "$NEXUS_URL" "$STAGING_PROFILE_ID" "$WORKSPACE/m2repo" | tee "$TMP_FILE"
staging_repo=$(sed -n -e 's/Staging repository \(.*\) created\./\1/p' "$TMP_FILE")
echo "$staging_repo" > "$WORKSPACE/archives/staging-repo.txt"
# Cleanup
-rm "$TMP_FILE"
+rm -f "$TMP_FILE"