Skip to content

Commit

Permalink
init7
Browse files Browse the repository at this point in the history
  • Loading branch information
torchiaf committed May 22, 2024
1 parent 97f120d commit d5ff425
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 6 deletions.
59 changes: 57 additions & 2 deletions .github/workflows/build-and-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- id: upload-gate
name: Upload Gate (superseded by a newer build?)
run: ./scripts/build-upload-gate

# - name: Get gcs auth
# uses: rancher-eio/read-vault-secrets@main
# with:
Expand Down Expand Up @@ -146,5 +146,60 @@ jobs:
# cache-control: no-cache,must-revalidate
# process_gcloudignore: false

build-and-upload-harvester-plugin:
name: Build & Upload Harvester Plugin
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1

# Note - Cannot use the setup action here as it uses a different yarn install arg
- uses: actions/setup-node@v3
with:
node-version: '14.x'
cache: 'yarn'

- id: build-pkg
name: Build pkg
run: ./shell/scripts/ci-build-pkg.sh harvester

- id: upload-gate
name: Upload Gate
run: ./scripts/build-upload-gate


# - 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 tar
# uses: 'google-github-actions/upload-cloud-storage@v2'
# with:
# path: ${{steps.build-embedded.outputs.BUILD_EMBEDED_TGZ}}
# # Example - https://releases.rancher.com/harvester-ui/ui/2.8.0.tar.gz
# destination: releases.rancher.com/harvester-ui/${{ env.REPO }}
# parent: false
# headers: |-
# cache-control: no-cache,must-revalidate
# process_gcloudignore: false


# - name:
# pull: default
# image: plugins/gcs
# settings:
# acl:
# - allUsers:READER
# cache_control: "no-cache,must-revalidate"
# source: dist-pkg/${PKG_TARBALL}
# target: releases.rancher.com/harvester-ui/plugin/${PKG_TARBALL}
# token:
# from_secret: google_auth_key
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ else
VERSION=$COMMIT_BRANCH
fi

echo "DRONE_TAG: ${DRONE_TAG}"
echo "CI_BUILD_TAG: ${CI_BUILD_TAG}"
echo "GIT_TAG: ${GIT_TAG}"
echo "TAG_VERSION: ${TAG_VERSION}"

echo "Drone Build Args"
echo "CI Build Args"
echo "COMMIT: ${COMMIT}"
echo "COMMIT_BRANCH: ${COMMIT_BRANCH}"
echo "VERSION: ${VERSION}"

if [ -n "$GIT_TAG" ]; then
COMMIT=$COMMIT COMMIT_BRANCH=$COMMIT_BRANCH VERSION=$DRONE_TAG ./shell/scripts/build-pkg.sh ${1} "true"
COMMIT=$COMMIT COMMIT_BRANCH=$COMMIT_BRANCH VERSION=$CI_BUILD_TAG ./shell/scripts/build-pkg.sh ${1} "true"
else
COMMIT=$COMMIT COMMIT_BRANCH=$COMMIT_BRANCH VERSION=$VERSION ./shell/scripts/build-pkg.sh ${1} "true"
fi
Expand All @@ -33,7 +33,7 @@ export PKG_TARBALL=${PKG_NAME}.tar.gz
export PKG_TAG_VERSION=${1}-${TAG_VERSION}
export PKG_TAG_TARBALL=${TAG_VERSION}.tar.gz

echo "Drone Build Artefacts"
echo "CI Build Artefacts"
echo "Package Directory: ${PKG_NAME}"
echo "Package Tarball: ${PKG_TARBALL}"
echo "Tag Package: ${PKG_TAG_VERSION} ${PKG_TAG_TARBALL}"
Expand Down

0 comments on commit d5ff425

Please sign in to comment.