X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fsigul-sign-dir.sh;h=d3995ace0672d807f3add3a88541fa7bf42b40b8;hb=a6dbbcc122ad46e11936a13f8816daa5278726e4;hp=724f1907d6fde66b6405fe5bfa2741475ba72649;hpb=5f3d9b0c8343ee4dce1ed0d0c39f8677799b0c74;p=releng%2Fglobal-jjb.git diff --git a/shell/sigul-sign-dir.sh b/shell/sigul-sign-dir.sh index 724f1907..d3995ace 100644 --- a/shell/sigul-sign-dir.sh +++ b/shell/sigul-sign-dir.sh @@ -22,14 +22,16 @@ OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]') OS_RELEASE=$(facter lsbdistrelease | tr '[:upper:]' '[:lower:]') if [[ "$OS_RELEASE" == "8" && "$OS" == 'centos' ]]; then # Get Dockerfile and the enterpoint to build the docker image. + # shellcheck disable=SC2140 wget -O "${WORKSPACE}/sigul-sign.sh" "https://raw.githubusercontent.com/"\ "lfit/releng-global-jjb/master/shell/sigul-sign.sh" + # shellcheck disable=SC2140 wget -O "${WORKSPACE}/Dockerfile" "https://raw.githubusercontent.com/"\ "lfit/releng-global-jjb/master/docker/Dockerfile" # Setup the docker environment for jenkins user - docker build -f ${WORKSPACE}/Dockerfile \ - --build-arg SIGN_DIR=${SIGN_DIR} \ + docker build -f "${WORKSPACE}/Dockerfile" \ + --build-arg SIGN_DIR="${SIGN_DIR}" \ -t sigul-sign . docker volume create --driver local \ @@ -40,16 +42,17 @@ if [[ "$OS_RELEASE" == "8" && "$OS" == 'centos' ]]; then docker volume inspect wrkspc_vol + # shellcheck disable=SC2140 docker run -e SIGUL_KEY="${SIGUL_KEY}" \ -e SIGUL_PASSWORD="${SIGUL_PASSWORD}" \ - -e SIGUL_CONFIG=${SIGUL_CONFIG} \ - -e SIGN_DIR=${SIGN_DIR} \ - -e WORKSPACE=${WORKSPACE} \ + -e SIGUL_CONFIG="${SIGUL_CONFIG}" \ + -e SIGN_DIR="${SIGN_DIR}" \ + -e WORKSPACE="${WORKSPACE}" \ --name sigul-sign \ --security-opt label:disable \ --mount type=bind,source="/w/workspace",target="/w/workspace" \ --mount type=bind,source="/home/jenkins",target="/home/jenkins" \ - -u root:root -w $(pwd) sigul-sign + -u root:root -w "$(pwd)" sigul-sign # change the .asc files owner permissions back to jenkins sudo chown -R jenkins:jenkins "${SIGN_DIR}"