Loading 7.13.5/scripts/prebuild.sh +71 −31 Original line number Diff line number Diff line #!/bin/bash set -e set -x # Prebuild Script: stage jira-software dependencies to artifact repository ################################################################################# # Prebuild Variables PKG="atlassian-jira-software" PKG_VERS="7.13.5" VENDOR="atlassian" PKG_FILE_NAME="${PKG}-${PKG_VERS}" PKG_TAR="${PKG}-${PKG_VERS}.tar.gz" PKG_TAR_URL="https://product-downloads.atlassian.com/software/jira/downloads/${PKG_TAR}" ################################################################################# # Nexus Repo Target & Auth Variables Required in Build Env NEXUS_SERVER="${NEXUS_SERVER}/repository/dsop" NEXUS_USERNAME="${NEXUS_USERNAME}" NEXUS_PASSWORD="${NEXUS_PASSWORD}" ################################################################################# # For local testing NEXUS_SERVER="nexus-secure.levelup-dev.io/dsop" NEXUS_SERVER_PATH="https://${NEXUS_SERVER}/${PKG}/${PKG_VERS}" ################################################################################# # Depency Sources & Variables ARTIFACTS="\ ${PKG_TAR} " ARTIFACT_URLS="\ ${PKG_TAR_URL} \ " ################################################################################# # Change to staging directory start_DIR=$(pwd) STAGING_DIR="/tmp/build_${PKG}" mkdir -p ${STAGING_DIR} && cd ${STAGING_DIR} ################################################################################# # Download Artifacts for artifact in ${ARTIFACT_URLS}; do curl -fkvSL ${artifact} -O done ################################################################################# # SHASUM SHA256 && Verify All Parts for artifact in ${ARTIFACTS} ; do sha256sum ${artifact} \ | awk '{print $1}' \ | tee "${artifact}.sha256" done ################################################################################# # Push to Nexus Repo run_curl () { echo "Uploading $1 ..." curl -k -fu ${NEXUS_USERNAME}:${NEXUS_PASSWORD} \ -T /tmp/$1 \ https://${NEXUS_SERVER}/${PKG}/${PKG_VERS}/$1 } echo "${BUNDLE} " for artifact in ${BUNDLE}; do run_curl "${artifact}" run_curl "${artifact}.sha256" done #################################################################################### # # SET PRODUCT VERSION # #################################################################################### JIRA_VERSION=7.13.5 #################################################################################### # # CONFIG # #################################################################################### SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" BASEDIR="${SCRIPTDIR}/.." DEPENDENCIESDIR="${BASEDIR}/dependencies" #################################################################################### # # DOWNLOAD CONFLUENCE BINARY # #################################################################################### mkdir -p ${DEPENDENCIESDIR} wget -O ${DEPENDENCIESDIR}/atlassian-jira-software-${JIRA_VERSION}.tar.gz https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-${JIRA_VERSION}.tar.gz #################################################################################### # # UPLOAD CONFLUENCE BINARY # #################################################################################### curl --insecure -f -u ${NEXUS_USERNAME}:${NEXUS_PASSWORD} --upload-file ${DEPENDENCIESDIR}/atlassian-jira-software-${JIRA_VERSION}.tar.gz https://nexus.52.61.140.4.nip.io/repository/cht/atlassian/${JIRA_VERSION}/atlassian-jira-software-${JIRA_VERSION}.tar.gz ################################################################################# # Cleanup cd ${start_DIR} rm -rf ${STAGING_DIR} Loading
7.13.5/scripts/prebuild.sh +71 −31 Original line number Diff line number Diff line #!/bin/bash set -e set -x # Prebuild Script: stage jira-software dependencies to artifact repository ################################################################################# # Prebuild Variables PKG="atlassian-jira-software" PKG_VERS="7.13.5" VENDOR="atlassian" PKG_FILE_NAME="${PKG}-${PKG_VERS}" PKG_TAR="${PKG}-${PKG_VERS}.tar.gz" PKG_TAR_URL="https://product-downloads.atlassian.com/software/jira/downloads/${PKG_TAR}" ################################################################################# # Nexus Repo Target & Auth Variables Required in Build Env NEXUS_SERVER="${NEXUS_SERVER}/repository/dsop" NEXUS_USERNAME="${NEXUS_USERNAME}" NEXUS_PASSWORD="${NEXUS_PASSWORD}" ################################################################################# # For local testing NEXUS_SERVER="nexus-secure.levelup-dev.io/dsop" NEXUS_SERVER_PATH="https://${NEXUS_SERVER}/${PKG}/${PKG_VERS}" ################################################################################# # Depency Sources & Variables ARTIFACTS="\ ${PKG_TAR} " ARTIFACT_URLS="\ ${PKG_TAR_URL} \ " ################################################################################# # Change to staging directory start_DIR=$(pwd) STAGING_DIR="/tmp/build_${PKG}" mkdir -p ${STAGING_DIR} && cd ${STAGING_DIR} ################################################################################# # Download Artifacts for artifact in ${ARTIFACT_URLS}; do curl -fkvSL ${artifact} -O done ################################################################################# # SHASUM SHA256 && Verify All Parts for artifact in ${ARTIFACTS} ; do sha256sum ${artifact} \ | awk '{print $1}' \ | tee "${artifact}.sha256" done ################################################################################# # Push to Nexus Repo run_curl () { echo "Uploading $1 ..." curl -k -fu ${NEXUS_USERNAME}:${NEXUS_PASSWORD} \ -T /tmp/$1 \ https://${NEXUS_SERVER}/${PKG}/${PKG_VERS}/$1 } echo "${BUNDLE} " for artifact in ${BUNDLE}; do run_curl "${artifact}" run_curl "${artifact}.sha256" done #################################################################################### # # SET PRODUCT VERSION # #################################################################################### JIRA_VERSION=7.13.5 #################################################################################### # # CONFIG # #################################################################################### SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" BASEDIR="${SCRIPTDIR}/.." DEPENDENCIESDIR="${BASEDIR}/dependencies" #################################################################################### # # DOWNLOAD CONFLUENCE BINARY # #################################################################################### mkdir -p ${DEPENDENCIESDIR} wget -O ${DEPENDENCIESDIR}/atlassian-jira-software-${JIRA_VERSION}.tar.gz https://product-downloads.atlassian.com/software/jira/downloads/atlassian-jira-software-${JIRA_VERSION}.tar.gz #################################################################################### # # UPLOAD CONFLUENCE BINARY # #################################################################################### curl --insecure -f -u ${NEXUS_USERNAME}:${NEXUS_PASSWORD} --upload-file ${DEPENDENCIESDIR}/atlassian-jira-software-${JIRA_VERSION}.tar.gz https://nexus.52.61.140.4.nip.io/repository/cht/atlassian/${JIRA_VERSION}/atlassian-jira-software-${JIRA_VERSION}.tar.gz ################################################################################# # Cleanup cd ${start_DIR} rm -rf ${STAGING_DIR}