Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the feature to push to Azure blob #100

Merged
merged 27 commits into from
Sep 13, 2023
Merged

Conversation

NicolasMichaelCPHATM
Copy link
Contributor

To merge this request we need to setup two secrets in the repository

AZURE_BLOB_LINK
AZURE_BLOB_QUERYSTRING

@matias-cphatomics
Copy link
Contributor

The AZURE_BLOB_QUERYSTRING has been added as a environment secret.

The AZURE_BLOB_LINK is written directly in the workflow file and is: 'https://carelease.blob.core.windows.net/boards'

@matias-cphatomics
Copy link
Contributor

matias-cphatomics commented May 10, 2023

Breaking PCB versions have now been added to all projects. So this repo just needs to merge main into it.

- name: Publish to Azure blob
run: |
curl -f -X PUT -H "x-ms-version: 2020-04-08" -H "Content-Type: application/octet-stream" -H "x-ms-blob-type: BlockBlob" \
"${{ secrets.AZURE_BLOB_LINK }}/${{ steps.release-on-push.outputs.tag_name }}.zip${{secrets.AZURE_BLOB_QUERYSTRING}}" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace '${{ secrets.AZURE_BLOB_LINK }}' with 'https://carelease.blob.core.windows.net/boards'.

@matias-cphatomics
Copy link
Contributor

Not sure whether it should be included in this PR, but when uploading new releases to the Azure blob we also need to update a file containing the information about current and breaking PCB versions. So I'm guessing we need to add extra logic to the uploading part of the workflow unless I'm misunderstanding the workflow.

NicolasMichaelCPHATM and others added 16 commits June 20, 2023 11:52
…ile.

Added safety checks to ensure all the versions exist in managePCBVersions. Will make initial uploads harder, since versions won't exist, but will prevent errors relating to accidentally referencing versions which don't exist
…y is from the map file.

Updated makefile.init to use VERSION_TAG environment variable if available for GIT_VERSION (Software version).
Updated workflow to dry run the release manager in order to be able to set the aforementioned environment variable in the build step.
@LukeWalker-CA
Copy link
Contributor

@matias-cphatomics When you have time to review, this is ready

PCB_VERSION_FILE : "STM32/${{ matrix.package }}/pcbversion"
MODULE_NAME : ${{ matrix.package }}
- name: Manage PCB Versioning
run: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice with a comment explaining this expression.

@matias-cphatomics
Copy link
Contributor

Overall I think it looks very good. A few overall (smaller) comments:

  • I think we should rename the "scripts" folder to something more descriptive. I think maybe release_management or release_uploader or something a long those lines.
  • I don't know whether github allows it, but would be nice if we could move the scripts folder into the .github/workflows folder or maybe on the .github/ level so that it is clear that those files belong in that part of the repo.
  • One of the files has 'managePCBVersions' with capital PCB and another has "updatePcbVersionList" with camel case. You get to choose which you like better, but let's stick with one format 🥇

@LukeWalker-CA LukeWalker-CA merged commit 2269352 into main Sep 13, 2023
13 checks passed
@LukeWalker-CA LukeWalker-CA deleted the feat/azure_blob_update branch September 13, 2023 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants