Skip to content

Commit

Permalink
chore(ci): fix windows s3 uploads error again (#6065)
Browse files Browse the repository at this point in the history
Description
Target Windows installer for S3 upload.
Fix the scheduled target for daily uploads.
Updated the env for the S3 Destination Override to match other envs.

Motivation and Context
Fix the S3 upload for Windows.

How Has This Been Tested?
Tested in a branch for the repo.

What process can a PR reviewer use to test or verify this change?
Check the Workflow for any errors.

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
leet4tari authored Dec 29, 2023
1 parent f371fd6 commit 3512b74
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ env:
CARGO_OPTIONS: "--release"
# Needed for S3 as a default upload location
TARI_NETWORK_DIR: testnet
S3_DEST_OVERRIDE: ""

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -112,14 +113,10 @@ jobs:
echo "VBRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
echo "VSHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Default Destination Folder
run: |
echo "S3DESTOVERRIDE=" >> $GITHUB_ENV
- name: Scheduled Destination Folder Override
if: ${{ github.event_name == 'schedule' && github.event.schedule == '05 00 01 * *' }}
if: ${{ github.event_name == 'schedule' && github.event.schedule == '05 00 * * *' }}
run: |
echo "S3DESTOVERRIDE=daily/" >> $GITHUB_ENV
echo "S3_DEST_OVERRIDE=daily/" >> $GITHUB_ENV
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
Expand Down Expand Up @@ -484,15 +481,16 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DEST_DIR: "${{ env.S3DESTOVERRIDE }}${{ env.PLATFORM_SPECIFIC_DIR }}/${{ env.TARI_NETWORK_DIR }}/"
DEST_DIR: "${{ env.S3_DEST_OVERRIDE }}${{ env.PLATFORM_SPECIFIC_DIR }}/${{ env.TARI_NETWORK_DIR }}/"
S3CMD: "cp"
S3OPTIONS: '--recursive --exclude "*" --include "*.zip*" --include "*.pkg*" --include "*.exe*"'
# S3OPTIONS: '--acl public-read'
S3OPTIONS: '--recursive --exclude "*" --include "*.zip*" --include "*.pkg*" --include "*installer.exe*"'
shell: bash
run: |
echo "Starting upload ... ${{ env.MTS_SOURCE }}"
ls -al ${{ env.MTS_SOURCE }}
aws --version
aws s3 ${{ env.S3CMD }} --region ${{ secrets.AWS_REGION }} \
"${{ env.MTS_SOURCE }}" \
s3://${{ secrets.AWS_S3_BUCKET }}/${{ env.DEST_DIR }} \
Expand All @@ -506,7 +504,7 @@ jobs:
${{ env.S3OPTIONS }}
aws s3 rm --region ${{ secrets.AWS_REGION }} \
s3://${{ secrets.AWS_S3_BUCKET }}/latest/${{ env.DEST_DIR }}/ \
s3://${{ secrets.AWS_S3_BUCKET }}/latest/${{ env.DEST_DIR }} \
--recursive --include "*"
aws s3 ${{ env.S3CMD }} --region ${{ secrets.AWS_REGION }} \
Expand Down

0 comments on commit 3512b74

Please sign in to comment.