From ba189351857759430a3e94084a937235f14a74b2 Mon Sep 17 00:00:00 2001 From: Richard Cox <18697775+richard-cox@users.noreply.github.com> Date: Wed, 1 May 2024 11:40:16 +0100 Subject: [PATCH 1/5] Merge pull request #5140 from richard-cox/richard-drone-ui-pr Port drone build tasks to gh workflows + actions --- .drone.yml | 152 ------------------------ .github/actions/setup/action.yaml | 18 +++ .github/workflows/build-and-upload.yaml | 67 +++++++++++ .github/workflows/build-branch.yaml | 19 +++ .github/workflows/build-release.yaml | 17 +++ .github/workflows/test.yaml | 38 ++++++ .gitignore | 2 - Dockerfile.dapper | 26 ---- package.json | 2 +- scripts/build-static | 133 ++------------------- scripts/ci | 46 ------- scripts/entry.sh | 11 -- scripts/gcs_upload_asset | 7 -- scripts/utils.sh | 65 ---------- 14 files changed, 172 insertions(+), 431 deletions(-) delete mode 100644 .drone.yml create mode 100644 .github/actions/setup/action.yaml create mode 100644 .github/workflows/build-and-upload.yaml create mode 100644 .github/workflows/build-branch.yaml create mode 100644 .github/workflows/build-release.yaml create mode 100644 .github/workflows/test.yaml delete mode 100644 Dockerfile.dapper delete mode 100755 scripts/ci delete mode 100755 scripts/entry.sh delete mode 100755 scripts/gcs_upload_asset diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 8c698f4d15..0000000000 --- a/.drone.yml +++ /dev/null @@ -1,152 +0,0 @@ ---- -kind: pipeline -name: default - -platform: - os: linux - arch: amd64 - -steps: -- name: test - pull: default - image: rancher/dapper:v0.6.0 - commands: - - dapper ci - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - pull_request - exclude: - - tag - -- name: build - pull: default - image: rancher/dapper:v0.6.0 - commands: - - BUILD_LATEST=true dapper ci - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - branch: - - release-2.7 - event: - exclude: - - pull_request - - tag - -- name: upload - pull: default - image: plugins/gcs - settings: - acl: - - allUsers:READER - cache_control: "no-cache,must-revalidate" - source: dist/static/release-2.7 - target: releases.rancher.com/ui/release-2.7 - token: - from_secret: google_auth_key - when: - branch: - - release-2.7 - event: - exclude: - - pull_request - - tag - -- name: build-release - pull: default - image: rancher/dapper:v0.6.0 - commands: - - dapper ci - environment: - ENVIRONMENT: production - privileged: true - volumes: - - name: docker - path: /var/run/docker.sock - when: - event: - - tag - ref: - include: - - "refs/tags/v2.7.*" - - -- name: upload-release - pull: default - image: plugins/gcs - settings: - acl: - - allUsers:READER - cache_control: "no-cache,must-revalidate" - source: dist/static/${DRONE_TAG##v} - target: releases.rancher.com/ui/${DRONE_TAG##v} - token: - from_secret: google_auth_key - when: - event: - - tag - ref: - include: - - "refs/tags/v2.7.*" - -- name: upload-release-tar - pull: default - image: plugins/gcs - settings: - acl: - - allUsers:READER - cache_control: "no-cache,must-revalidate" - source: dist/static/${DRONE_TAG##v}.tar.gz - target: releases.rancher.com/ui/${DRONE_TAG##v}.tar.gz - token: - from_secret: google_auth_key - when: - event: - - tag - ref: - include: - - "refs/tags/v2.7.*" - -- name: create-pr-in-rancher - image: curlimages/curl:7.81.0 - user: root - environment: - PAT_USERNAME: - from_secret: pat_username - PAT_TOKEN: - from_secret: github_token - commands: - - apk -U --no-cache add bash - - scripts/create-pr-in-rancher - when: - event: - - tag - ref: - include: - - "refs/tags/v2.7.*" - -volumes: -- name: docker - host: - path: /var/run/docker.sock - ---- -kind: pipeline -name: fossa - -steps: -- name: fossa - image: rancher/drone-fossa:latest - failure: ignore - settings: - api_key: - from_secret: FOSSA_API_KEY - when: - instance: - - drone-publish.rancher.io diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml new file mode 100644 index 0000000000..2f1f02da98 --- /dev/null +++ b/.github/actions/setup/action.yaml @@ -0,0 +1,18 @@ +name: Setup UI Env +description: Setup node, python and call bootstrap script + +runs: + using: 'composite' + steps: + - uses: actions/setup-node@v3 + with: + node-version: '14.x' + + - name: Install Python for node-sass + shell: bash + run: | + DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends python2 + + - name: Install packages + shell: bash + run: ./scripts/bootstrap diff --git a/.github/workflows/build-and-upload.yaml b/.github/workflows/build-and-upload.yaml new file mode 100644 index 0000000000..77deeec738 --- /dev/null +++ b/.github/workflows/build-and-upload.yaml @@ -0,0 +1,67 @@ +name: Build and Upload + +on: + workflow_call: + inputs: + CI_BRANCH: + required: false + type: string + CI_BUILD_TAG: + required: false + type: string + +env: + CI_BRANCH: ${{inputs.CI_BRANCH || ''}} + CI_BUILD_TAG: ${{inputs.CI_BUILD_TAG || ''}} + REPO: ${{github.event.repository.name || ''}} + +jobs: + build-and-upload: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Setup env + uses: ./.github/actions/setup + + - id: build + name: Build + run: ./scripts/build-static + + - name: Get gcs auth + uses: rancher-eio/read-vault-secrets@main + with: + secrets: | + secret/data/github/repo/${{ github.repository }}/google-auth/rancher/credentials token | GOOGLE_AUTH + + - name: Apply gcs auth + # https://github.com/google-github-actions/auth + uses: 'google-github-actions/auth@v2' + with: + credentials_json: "${{ env.GOOGLE_AUTH }}" + + - name: Upload build + uses: 'google-github-actions/upload-cloud-storage@v2' + # https://github.com/google-github-actions/upload-cloud-storage + with: + path: ${{steps.build.outputs.BUILD_DIR}} + # Example - https://releases.rancher.com/ui/2.8.0/... + destination: releases.rancher.com/${{ env.REPO }}/${{ steps.build.outputs.VERSION }} + parent: false + headers: |- + cache-control: no-cache,must-revalidate + process_gcloudignore: false + + - name: Upload tar + if: ${{ env.CI_BUILD_TAG != ''}} + uses: 'google-github-actions/upload-cloud-storage@v2' + with: + path: ${{steps.build.outputs.BUILD_TGZ}} + # Example - https://releases.rancher.com/ui/2.8.0.tar.gz + destination: releases.rancher.com/${{ env.REPO }} + parent: false + headers: |- + cache-control: no-cache,must-revalidate + process_gcloudignore: false diff --git a/.github/workflows/build-branch.yaml b/.github/workflows/build-branch.yaml new file mode 100644 index 0000000000..e8f3e05cce --- /dev/null +++ b/.github/workflows/build-branch.yaml @@ -0,0 +1,19 @@ +name: Build (Branch) +on: + push: + branches: + - master + - 'release-*' + - '*-dev' + +jobs: + test: + uses: ./.github/workflows/test.yaml + build-branch-and-upload: + uses: ./.github/workflows/build-and-upload.yaml + needs: test + permissions: + contents: 'read' + id-token: 'write' + with: + CI_BRANCH: ${{github.ref_name}} diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 0000000000..be3706aa1d --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,17 @@ +name: Build (Release) +on: + push: + tags: + - v[2-9].* + +jobs: + test: + uses: ./.github/workflows/test.yaml + build-tag-and-upload: + uses: ./.github/workflows/build-and-upload.yaml + needs: test + permissions: + contents: 'read' + id-token: 'write' + with: + CI_BUILD_TAG: ${{github.ref_name}} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000000..074ab82189 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,38 @@ +name: Tests +on: + push: + branches: + - master + - 'release-*' + pull_request: + branches: + - master + - 'release-*' + # This tells GH that the workflow is reusable + workflow_call: + +jobs: + unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Run Setup + uses: ./.github/actions/setup + + - name: Run tests + run: yarn test + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Run Setup + uses: ./.github/actions/setup + + - name: Run linter + run: yarn lint:js diff --git a/.gitignore b/.gitignore index fce1a678bc..851f83ca7c 100644 --- a/.gitignore +++ b/.gitignore @@ -46,5 +46,3 @@ GTAGS *.org yarn-error.log -!Dockerfile.dapper -Dockerfile.dapper* diff --git a/Dockerfile.dapper b/Dockerfile.dapper deleted file mode 100644 index fe5225ca55..0000000000 --- a/Dockerfile.dapper +++ /dev/null @@ -1,26 +0,0 @@ -FROM debian:buster - -RUN apt-get -qq update \ - && apt-get install -y curl gnupg2 apt-transport-https \ - && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ - && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ - && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ - && curl -sL https://deb.nodesource.com/setup_14.x | bash - \ - && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y --no-install-recommends \ - git ca-certificates nodejs yarn \ - hicolor-icon-theme g++ google-chrome-stable \ - && yarn config set cache-folder /var/cache/yarn \ - && rm -rf /var/lib/apt/lists/* - -ENV DAPPER_RUN_ARGS --privileged -v npm-cache:/var/cache/npm -ENV DAPPER_ENV REPO TAG DRONE_TAG IMAGE_NAME BUILD_LATEST -ENV DAPPER_SOURCE /tmp/ui -ENV DAPPER_OUTPUT ./bin ./dist -ENV DAPPER_DOCKER_SOCKET true -WORKDIR ${DAPPER_SOURCE} - -RUN mkdir dist - -ENTRYPOINT ["./scripts/entry.sh"] -CMD ["ci"] diff --git a/package.json b/package.json index 7a812471c9..a4e8a72181 100644 --- a/package.json +++ b/package.json @@ -141,4 +141,4 @@ "lib/shared" ] } -} +} \ No newline at end of file diff --git a/scripts/build-static b/scripts/build-static index abadc686fa..91ce842d26 100755 --- a/scripts/build-static +++ b/scripts/build-static @@ -7,12 +7,6 @@ if [[ -n "${BUILD_DEBUG}" ]]; then set -x fi -# Initialize empty variables -: ${CI_BRANCH=""} -: ${UPLOAD_LATEST=""} -# Drone will set this on tag -: ${CI_BUILD_TAG="${DRONE_TAG:-}"} - # cd to app root CWD=$(dirname $0) if [[ `basename $(pwd)` = 'scripts' ]]; then @@ -30,13 +24,8 @@ function printHelp() { build-static Usage: -d - Build debug instead of production build -f - Force: Turn off checks that prevent you from doing bad things - -l - Build as "release-2.7" instead of the version in package.json - -t - Tag and push tag - -u - Upload to GCE - -s - Skip tests -c=CDN - Force a CDN path for static asset delivery. Default -v=VERSION - Force version to be VERSION instead of what is in package.json - -p=PROJECT_NAME - name of the Google Cloud project hosting the storage bucket EOF exit 1; } @@ -48,11 +37,6 @@ BRANCH=$CI_BRANCH BUILD_TAG="${CI_BUILD_TAG#v}" CDN="releases.rancher.com/ui" -# Parse branch argument and set to current branch name if empty -if [[ -z "$BRANCH" ]]; then - BRANCH=$(git symbolic-ref HEAD | sed -e "s/^refs\/heads\///") -fi - if [[ -z "$BUILD_TAG" ]]; then PKG_VERSION=$(cat package.json | grep version | head -n 1 | cut -f4 -d'"') else @@ -62,13 +46,9 @@ fi FORCE=0 LATEST=0 MODE="" -UPLOAD=0 -TAG=0 -TEST=1 ENVIRONMENT="production" FINGERPRINT="yes" : ${FORCE_VERSION:=""} -GS_PROJECT_NAME="${GS_PROJECT_NAME:-Rancher}" while getopts ":dlustfv:c:p:m:" opt;do case $opt in @@ -78,30 +58,15 @@ while getopts ":dlustfv:c:p:m:" opt;do f) FORCE=1 ;; - l) - LATEST=1 - ;; m) MODE=$OPTARG ;; - s) - TEST=0 - ;; - t) - TAG=1 - ;; - u) - UPLOAD=1 - ;; v) FORCE_VERSION=$OPTARG ;; c) CDN=$OPTARG ;; - p) - GS_PROJECT_NAME=$OPTARG - ;; \?) echo "Invalid arguemnt: ${OPTARG}" printHelp @@ -124,40 +89,18 @@ if [[ `git status --porcelain` ]]; then fi fi -# UPLOAD_LATEST=true is set by Drone for auto upload to CDN -if [[ "${BRANCH}" == "release-2.7" ]] && [[ "${UPLOAD_LATEST}" == "true" ]]; then - UPLOAD=2 +# If we're on master and building from branch ... we're building latest +if [[ "${CI_BRANCH}" == "release-2.7" ]] ; then LATEST=1 fi -# Sanity checking -if [[ $LATEST -eq 1 ]] && [[ $TAG -eq 1 ]]; then - echo "You can't tag latest." - if [[ $FORCE -ne 1 ]]; then - exit 1; - fi -fi - -if ( [[ $TAG -eq 1 ]] || [[ $UPLOAD -ne 0 ]] ) && [[ "${BRANCH}" != "release-2.7" ]]; then - echo "You can only tag or upload the release-2.7 branch (you are on '${BRANCH}')." - if [[ $FORCE -ne 1 ]]; then - exit 1; - fi -fi - -REMOTE=$(git config --get remote.origin.url) -if [[ $TAG -eq 1 ]] && [[ ! "${REMOTE}" =~ .*rancher/ui.* ]]; then - echo "You can only tag when origin is the main rancher/ui repo (you are on '${REMOTE}')." - if [[ $FORCE -ne 1 ]]; then - exit 1; - fi -fi - if [[ "${FORCE_VERSION}" != "" ]]; then VERSION=${FORCE_VERSION} else if [[ $LATEST -eq 1 ]]; then VERSION="release-2.7" + elif [[ "${CI_BRANCH}" != "" ]]; then + VERSION=${CI_BRANCH} else VERSION=${PKG_VERSION} fi @@ -167,38 +110,24 @@ if [[ $LATEST -eq 1 ]]; then FINGERPRINT="no" fi -EXISTING=$(git tag -l "v${VERSION}") -if [[ $TAG -eq 1 ]] && [[ "${EXISTING}" = "v${VERSION}" ]]; then - echo "There is already an existing tag v${VERSION}" - if [[ $FORCE -ne 1 ]]; then - exit 1; - fi -fi - BUILD_PAR="dist/static" BUILD_DIR="${BUILD_PAR}/${VERSION}" BUILD_TGZ="${BUILD_PAR}/${VERSION}.tar.gz" -GS_URL="${GS_URL:-gs://${CDN}}" -GCLOUD_UUID="google/cloud-sdk@sha256:506775439bd4f44d90a3f6784f2b625e55c43635f9f2c4cae24ac4b3dea0277a" +# Outputs for gh actions +ENV_OUTPUT="${GITHUB_OUTPUT:-"temp-env"}" +echo "BUILD_DIR=${BUILD_DIR}" >> "$ENV_OUTPUT" +echo "BUILD_TGZ=${BUILD_TGZ}" >> "$ENV_OUTPUT" +echo "VERSION=${VERSION}" >> "$ENV_OUTPUT" +# Print settings echo "Branch: ${BRANCH}" -if [[ "${VERSION}" != "${PKG_VERSION}" ]]; then - echo "Package Version: ${PKG_VERSION}" -fi +echo "Package Version: ${PKG_VERSION}" echo "Version: ${VERSION}" echo "Build Dir: ${BUILD_DIR}" -echo "Options: Force=${FORCE}, Mode=${MODE}, Latest=${LATEST}, Test=${TEST}, Upload=${UPLOAD}, Tag=${TAG}" +echo "Options: Force=${FORCE}, Mode=${MODE}, Latest=${LATEST}" echo "Current Directory: $(pwd)" -if [[ $TEST -eq 1 ]]; then - echo "Testing..." - runCmd ./node_modules/.bin/ember test - echo "Done Testing." -else - echo "Skipping Tests" -fi - if [[ $LATEST -ne 1 ]]; then echo "Building Static Tarball..." UI_MODE="${MODE}" RANCHER="" CATALOG="" runCmd ./node_modules/.bin/ember build --environment=${ENVIRONMENT} --output-path=${BUILD_DIR} @@ -218,41 +147,3 @@ UI_MODE="${MODE}" FINGERPRINT="${FINGERPRINT}" RANCHER="" CATALOG="" BASE_ASSETS # Create a file containing the version echo "${PKG_VERSION}" > ${BUILD_DIR}/VERSION.txt - -if [[ $TAG -eq 1 ]]; then - runCmd git tag v${VERSION} - runCmd git push --tags -fi - -# Upload asset, either from laptop or from CI pipeline -if [[ -n "$UPLOAD" ]]; then - echo "Uploading..." - - ABS_BUILD_DIR="$(pwd)/${BUILD_DIR}" - GS_UPLOAD_COMMAND="gcs_upload_asset project_name=${GS_PROJECT_NAME} version=${VERSION} upload_target=${GS_URL}" - - if [[ $LATEST -ne 1 ]]; then - GS_UPLOAD_COMMAND+=" tgz_file=${BUILD_TGZ}" - else - GS_UPLOAD_COMMAND+=" is_latest=true" - fi - - if [[ $UPLOAD -eq 1 ]]; then - runCmd "${GS_UPLOAD_COMMAND} upload_source=${BUILD_DIR} disable_svcacct_auth=true" - fi - - if [[ $UPLOAD -eq 2 ]]; then - GS_SERVICE_ACCOUNT_KEYFILE="$(TMPDIR=$(pwd) && mktemp -t gs_service_account_keyfile.XXXXXXX)" - echo "${GS_SERVICE_ACCOUNT_KEY}" > "${GS_SERVICE_ACCOUNT_KEYFILE}" - - GS_UPLOAD_COMMAND+=" service_account_id=${GS_SERVICE_ACCOUNT_ID}" - runCmd "docker run --rm --name gcloud-config \ - -v ${GS_SERVICE_ACCOUNT_KEYFILE}:/tmp/keyfile.json \ - -v $(pwd)/scripts:/opt/rancher/scripts \ - -v ${ABS_BUILD_DIR}:/upload \ - ${GCLOUD_UUID} \ - /opt/rancher/scripts/${GS_UPLOAD_COMMAND}" - - rm "${GS_SERVICE_ACCOUNT_KEYFILE}" - fi -fi diff --git a/scripts/ci b/scripts/ci deleted file mode 100755 index 5259c69c73..0000000000 --- a/scripts/ci +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -e - -BUILD_DEBUG="${BUILD_DEBUG:-}" -CI_BUILD_TAG="${DRONE_TAG:-}" -CI_BUILD_TAG="${CI_BUILD_TAG#v}" - -echo "CI_BUILD_TAG ${CI_BUILD_TAG}..." - - -if [[ -n "${BUILD_DEBUG}" ]]; then - set -x - env -fi - -# cd to app root -CWD=$(dirname $0) -if [[ `basename $(pwd)` = 'scripts' ]]; then - cd ../ -else - cd `dirname $CWD` -fi - -echo "Cleaning Up.." -rm -rf node_modules build dist tmp - -echo "Bootstrapping.." -./scripts/bootstrap - -if [[ -z "${CI_BUILD_TAG}" ]]; then - echo "Linting.." - ./node_modules/.bin/eslint --max-warnings 0 . -fi - -if [[ "${BUILD_LATEST}" == "true" ]]; then - echo "Building latest..." - ./scripts/build-static -l -v release-2.7 - # (build-static contains a call to test & build) -elif [[ ! -z "${CI_BUILD_TAG}" ]]; then - echo "Building v${CI_BUILD_TAG}..." - ./scripts/build-static -s -v "${CI_BUILD_TAG}" - # (build-static contains a call to test & build) -else - echo "Testing..." - yarn test -fi diff --git a/scripts/entry.sh b/scripts/entry.sh deleted file mode 100755 index 78fb567905..0000000000 --- a/scripts/entry.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -set -e - -mkdir -p bin dist -if [ -e ./scripts/$1 ]; then - ./scripts/"$@" -else - exec "$@" -fi - -chown -R $DAPPER_UID:$DAPPER_GID . diff --git a/scripts/gcs_upload_asset b/scripts/gcs_upload_asset deleted file mode 100755 index d0c46c0249..0000000000 --- a/scripts/gcs_upload_asset +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -x - -set -eu - -source "$(dirname $0)/utils.sh" - -gcs_upload_asset $@ diff --git a/scripts/utils.sh b/scripts/utils.sh index 81d16b9513..4e3b8973c8 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -6,68 +6,3 @@ function runCmd() { exit 2 fi } - -# Upload specified asset to Google Cloud Storage -# required parameters: -# service_account_id - ID/name for service account -# project_name - the Google Cloud project name which owns the Storage bucket -# version - the upload version -# -# optional parameters: -# latest - we are uploading 'latest' which requires a some special upload magic -# upload_source - the directory or file to upload. Defaults to /upload. -# upload_target - the target gs:// URI for upload. Defaults to gs:///. -# service_account_keyfile - key file for service account in JSON format. Defaults to /tmp/keyfile.json. -# is_latest - flag that this is the latest version which changes the upload logic a bit. Defaults to 'false'. -# disable_svcacct_auth: disable automagic Service Account auto-authentication when. Primarily used for non-CI runs. Default 'false'. -# tgz_file: if upload is not latest, specify the relative path to tarball to upload. -function gcs_upload_asset() { - local $* - - disable_svcacct_auth="${disable_svcacct_auth:-false}" - service_account_id="${service_account_id:-}" - service_account_keyfile="${service_account_keyfile:-/tmp/keyfile.json}" - project_name="${project_name:-}" - - if [[ -z "${disable_svcacct_auth}" ]]; then - if [[ -z "${service_account_id}" || -z "${project_name}" ]]; then - printf 'ERROR: gce_upload_asset():: must specify service_account_id and project_name!' 1>&2 - return 1 - fi - fi - - version="${version:-''}" - if [[ -z "${version}" ]]; then - printf 'ERROR: gce_upload_asset(): must specify version!' 1>&2 - return 1 - fi - - upload_source="${upload_source:-/upload}" - upload_target="${upload_target:-gs://${project_name}/}" - is_latest="${is_latest:-false}" - - if [ "false" == "${is_latest}" ]; then - if [[ -z "${tgz_file}" ]]; then - printf 'ERROR: is_latest requires tgz_file!' 1>&2 - return 1 - fi - fi - - gzip_settings='html,js,css,xml,txt,map,svg,ttf,woff,woff2' - cache_settings='Cache-Control:no-cache,must-revalidate' - - if [ "false" == "${disable_svcacct_auth}" ]; then - runCmd gcloud auth activate-service-account "${service_account_id}" --key-file "${service_account_keyfile}" --project "${project_name}" - else - echo "INFO: Automatic Service Account auth has been disabled. Falling back to existing account auth..." - fi - - if [ "false" == "${is_latest}" ]; then - runCmd gsutil -m cp "${tgz_file} ${upload_target}" - runCmd gsutil -m cp -z "${gzip_settings}" -R "${upload_source} ${upload_target}" - else - runCmd gsutil -h "$cache_settings" -m cp -z "$gzip_settings" -R "${upload_source} ${upload_target}" - #sleep 5 - #runCmd gsutil -h "$cache_settings" -m rsync -C -c -r -d "${upload_source} ${upload_target}/${version}" - fi -} From f4c772ea02c02f762102166d952dd20e6a64cb2e Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Mon, 20 May 2024 15:24:45 +0100 Subject: [PATCH 2/5] Changes post cherry-pick --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/build-branch.yaml | 4 +--- .../{build-release.yaml => build-release-2.7.yaml} | 4 ++-- .github/workflows/test.yaml | 6 ++---- 4 files changed, 6 insertions(+), 10 deletions(-) rename .github/workflows/{build-release.yaml => build-release-2.7.yaml} (87%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f89eff6415..e8147249ac 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -22,7 +22,7 @@ Linked Issues ======