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

Feat/automatic installer release #222

Merged
merged 4 commits into from
Mar 25, 2024
Merged

Conversation

jakub-kocka
Copy link
Collaborator

@jakub-kocka jakub-kocka commented Mar 7, 2024

  • Updated installer build workflows to be reusable
  • Added script to automatically change docs files needed for installer release
  • PR is automatically generated with changed files
  • After PR is merged update-index workflow is automatically triggered to update the download page with the release

Successful workflow example: (espressif-ide installer)

Successful PR with installer release created by the workflow:

Automatic "release" mechanism explanation:

  1. build-installer.yml (build-installer-any workflow) is configured with all needed parameters (installer type, ESP-IDF version, IDE version, Online installer version (app version) ... not all parameters are needed every time)
  2. Based on the configured parameters the workflow for building the correct installer type is called
  3. After the installer is built, the script will edit docs files needed for release (releases.json, index.html, innoSetup)
    -- index.html:
    • The buttons with Online installer and IDE installer are updated every time
    • The button with Offline installer is updated if the MAJOR and MINOR versions of ESP-IDF are already present in any button
    • If the configured ESP-IDF version for Offline installer is not present in any button, a new button is created at the top (=> if the most top button of offline installers has version v5.2.1 and configured ESP-IDF version will be set to v5.3, the new button will be added above this button)
    • releases.json is updated by adding the new installer release information as the first object
    • IdfToolsSetup.iss is updated with the App or IDE version
  4. The PR with changed files is created (can be reviewed and edited)
  5. After the PR is merged, the update-index workflow is automatically triggered and the download page is updated

! WARNING - After this is merged, the original process of running installer build workflows will be changed (with the tag or manual run) => not backward compatible change

@jakub-kocka jakub-kocka self-assigned this Mar 7, 2024
@jakub-kocka jakub-kocka marked this pull request as draft March 7, 2024 06:41
@jakub-kocka
Copy link
Collaborator Author

FYI @tomassebestik

@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch 14 times, most recently from 3faa687 to c9b8915 Compare March 7, 2024 10:07
@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch 12 times, most recently from df7261b to 76f4d7e Compare March 7, 2024 13:06
@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch 2 times, most recently from 165d32f to f0a938e Compare March 11, 2024 06:27
@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch from f0a938e to dd687e8 Compare March 11, 2024 08:14
@jakub-kocka jakub-kocka marked this pull request as ready for review March 11, 2024 08:15
scripts/docs_update_release.py Outdated Show resolved Hide resolved
scripts/docs_update_release.py Outdated Show resolved Hide resolved
scripts/docs_update_release.py Show resolved Hide resolved
scripts/docs_update_release.py Outdated Show resolved Hide resolved
scripts/docs_update_release.py Outdated Show resolved Hide resolved
return new_entry_online


def update_index():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing tests

scripts/docs_update_release.py Outdated Show resolved Hide resolved
scripts/docs_update_release.py Outdated Show resolved Hide resolved
@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch 10 times, most recently from 07e88f9 to d45c881 Compare March 22, 2024 12:12
@jakub-kocka
Copy link
Collaborator Author

@georgik I have implemented Jinja2 templating engine for changing (creating) the index.html.

Also, other suggestions were improved. Can you please take a look at it?

Here is the test PR created by the workflow: https://github.com/espressif/idf-installer/pull/233/files

@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch 2 times, most recently from 59c87ca to 9100864 Compare March 25, 2024 07:53
@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch from 9100864 to 759f65d Compare March 25, 2024 14:50
@jakub-kocka jakub-kocka force-pushed the feat/automatic_installer_release branch from 759f65d to 01ac791 Compare March 25, 2024 14:54
@jakub-kocka
Copy link
Collaborator Author

I have added automatically assigned reviewers for PR and branch name with IDF version if there are multiple releases at the same time before the PR gets merged.

Based on the in-person discussion, I am merging this.

@jakub-kocka jakub-kocka merged commit 9bbe556 into main Mar 25, 2024
@jakub-kocka jakub-kocka deleted the feat/automatic_installer_release branch March 25, 2024 14:57
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.

4 participants