From 64d163dc1ac2729bd6898c8d31f29c068e085e43 Mon Sep 17 00:00:00 2001 From: Petr Nyc Date: Tue, 24 Jun 2025 09:51:16 +0200 Subject: [PATCH] UL scripting changes --- bin/ul11u4_build.sh | 11 +++-- bin/ul11u4_delivery_and_integrate.sh | 65 ++++++++++++++++++++++++++++ bin/ul11u4_gate_open.sh | 8 ++-- bin/ul11u4_integrate.sh | 65 ++++++++++++++++++++++++++++ 4 files changed, 142 insertions(+), 7 deletions(-) create mode 100755 bin/ul11u4_delivery_and_integrate.sh create mode 100755 bin/ul11u4_integrate.sh diff --git a/bin/ul11u4_build.sh b/bin/ul11u4_build.sh index 1b1a6c5..5c5fe26 100755 --- a/bin/ul11u4_build.sh +++ b/bin/ul11u4_build.sh @@ -12,7 +12,7 @@ AWK=/usr/bin/awk CURL=/usr/bin/curl source "${BINDIR}/lib/logging.sh" -TARGET="${1-11.4.81.0.1.195.1}" +TARGET="${1-11.4.83.0.1.195.1}" log::info "TARGET:${TARGET}" URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}" @@ -44,16 +44,21 @@ curl -X POST "${JOB_URL}" \ --user "pnyc:${JENKINS_TOKEN}" \ --data-urlencode "Build_Label=${TARGET}" \ --data-urlencode "hguser=petr.nyc@oracle.com" \ - --data-urlencode "dryrun=false" \ --data-urlencode "verbose=true" \ --data-urlencode "debug=true" \ --data-urlencode "scriptdir=./solaris/userland/sru/" \ --data-urlencode "do_check_sru_cbe=true" \ --data-urlencode "prepare_work_area=true" \ --data-urlencode "do_build=true" \ - --data-urlencode "prepare_delivery=true" \ + --data-urlencode "merge_repo=true" \ + --data-urlencode "create_sparse_repo=true" \ + --data-urlencode "check_incorporation=true" \ + --data-urlencode "zip_sparse_repo=true" \ --data-urlencode "create_escrow=true" \ --data-urlencode "create_foss=true" \ + --data-urlencode "integration_dryrun=false" \ + --data-urlencode "confirm_before_ingegration=false" \ + --data-urlencode "wait_for_dock_open=true" \ --data-urlencode "delivery=true" log::info "The job will be started here:" diff --git a/bin/ul11u4_delivery_and_integrate.sh b/bin/ul11u4_delivery_and_integrate.sh new file mode 100755 index 0000000..21d269d --- /dev/null +++ b/bin/ul11u4_delivery_and_integrate.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0 + +BINDIR=$(dirname "$PRG") +typeset -r BINDIR +source "${BINDIR}/lib/logging.sh" + + +W3M=/opt/homebrew/bin/w3m +AWK=/usr/bin/awk +CURL=/usr/bin/curl + +source "${BINDIR}/lib/logging.sh" +TARGET="${1-11.4.83.0.1.195.1}" +log::info "TARGET:${TARGET}" + +URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}" +log::debug $URL + +output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) + +out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF') + +if [[ -z "$out" ]]; +then + log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." + exit 0 +fi + + +log::info "Starting build for for Ul11u4SRU" +log::info "Target: \"${TARGET}\"" + +JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea' +JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/' + +JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters" + +log::info "Using '${JOB_URL}'" + +set -x +curl -X POST "${JOB_URL}" \ + --user "pnyc:${JENKINS_TOKEN}" \ + --data-urlencode "Build_Label=${TARGET}" \ + --data-urlencode "hguser=petr.nyc@oracle.com" \ + --data-urlencode "verbose=true" \ + --data-urlencode "debug=true" \ + --data-urlencode "scriptdir=./solaris/userland/sru/" \ + --data-urlencode "do_check_sru_cbe=false" \ + --data-urlencode "prepare_work_area=false" \ + --data-urlencode "do_build=false" \ + --data-urlencode "merge_repo=true" \ + --data-urlencode "create_sparse_repo=true" \ + --data-urlencode "check_incorporation=true" \ + --data-urlencode "zip_sparse_repo=true" \ + --data-urlencode "create_escrow=true" \ + --data-urlencode "create_foss=true" \ + --data-urlencode "integration_dryrun=false" \ + --data-urlencode "confirm_before_ingegration=false" \ + --data-urlencode "wait_for_dock_open=true" \ + --data-urlencode "delivery=true" + +log::info "The job will be started here:" +log::info " ${JOB_URL%%buildWith*}" diff --git a/bin/ul11u4_gate_open.sh b/bin/ul11u4_gate_open.sh index 25f1997..cf7512a 100755 --- a/bin/ul11u4_gate_open.sh +++ b/bin/ul11u4_gate_open.sh @@ -13,13 +13,13 @@ CURL=/usr/bin/curl source "${BINDIR}/lib/logging.sh" -TARGET="${1-11.4.81.0.1.195.1}" +TARGET="${1-11.4.83.0.1.195.1}" -# log::info "TARGET:${TARGET}" +log::info "TARGET:${TARGET}" URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=1&target=${TARGET}" -# log::debug $URL +log::debug $URL output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) @@ -28,7 +28,7 @@ out=$(echo "$output" | awk '/^Details.*Consolidation/ {found=1; next} found') if [[ -z "$out" ]]; then # log::debug "output: ### $out ###" - # log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." + log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." exit 0 fi diff --git a/bin/ul11u4_integrate.sh b/bin/ul11u4_integrate.sh new file mode 100755 index 0000000..78fa6d9 --- /dev/null +++ b/bin/ul11u4_integrate.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash + +[[ "$0" == /* ]] && typeset -r PRG=$0 || typeset -r PRG=$PWD/$0 + +BINDIR=$(dirname "$PRG") +typeset -r BINDIR +source "${BINDIR}/lib/logging.sh" + + +W3M=/opt/homebrew/bin/w3m +AWK=/usr/bin/awk +CURL=/usr/bin/curl + +source "${BINDIR}/lib/logging.sh" +TARGET="${1-11.4.83.0.1.195.1}" +log::info "TARGET:${TARGET}" + +URL="http://grt.us.oracle.com/grt/webservice/grtList/?gate=240&show=All&gateName=S11.4-SRU&status=4&target=${TARGET}" +log::debug $URL + +output=$(/opt/homebrew/bin/w3m "$URL" -M -cols 400 -graph -dump 2>&1) + +out=$(echo "$output" | $AWK '/^Details/ {found=1; next} found && NF') + +if [[ -z "$out" ]]; +then + log::info "There are no queued RTIs for \"${TARGET}\". Nothing to do..." + exit 0 +fi + + +log::info "Starting build for for Ul11u4SRU" +log::info "Target: \"${TARGET}\"" + +JENKINS_TOKEN='1154eb0158729a7d326c1db13e7dca0cea' +JENKINS_SERVER='http://mrshughes.us.oracle.com/jenkins/' + +JOB_URL="${JENKINS_SERVER}/job/Solaris_11/job/11.4/job/userland-sru/job/userland-sru-build-11.4/buildWithParameters" + +log::info "Using '${JOB_URL}'" + +set -x +curl -X POST "${JOB_URL}" \ + --user "pnyc:${JENKINS_TOKEN}" \ + --data-urlencode "Build_Label=${TARGET}" \ + --data-urlencode "hguser=petr.nyc@oracle.com" \ + --data-urlencode "verbose=true" \ + --data-urlencode "debug=true" \ + --data-urlencode "scriptdir=./solaris/userland/sru/" \ + --data-urlencode "do_check_sru_cbe=false" \ + --data-urlencode "prepare_work_area=false" \ + --data-urlencode "do_build=false" \ + --data-urlencode "merge_repo=false" \ + --data-urlencode "create_sparse_repo=false" \ + --data-urlencode "check_incorporation=false" \ + --data-urlencode "zip_sparse_repo=false" \ + --data-urlencode "create_escrow=false" \ + --data-urlencode "create_foss=false" \ + --data-urlencode "integration_dryrun=false" \ + --data-urlencode "confirm_before_ingegration=false" \ + --data-urlencode "wait_for_dock_open=true" \ + --data-urlencode "delivery=true" + +log::info "The job will be started here:" +log::info " ${JOB_URL%%buildWith*}"