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

[INFRA] add automation to the examples repository release part #925

Closed
tbouffard opened this issue Dec 2, 2020 · 2 comments · Fixed by #1141
Closed

[INFRA] add automation to the examples repository release part #925

tbouffard opened this issue Dec 2, 2020 · 2 comments · Fixed by #1141
Assignees
Labels
chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) enhancement New feature or request
Milestone

Comments

@tbouffard
Copy link
Member

tbouffard commented Dec 2, 2020

Currently, we have to manage the examples repository manually as described in https://github.com/process-analytics/bpmn-visualization-js/blob/v0.8.0/docs/contributors/maintainers.md

The macro steps are

  • locally in a specific branch
    • run a script
    • update the demo part by downloading it
  • create a Pull Request
  • do manual tests

Except for the tests part (which we will address eventually later), we should be able to automate everything to have the Pull Request.
This would help avoiding issue like the one we had after the 0.8.0 release, see process-analytics/bpmn-visualization-examples#110

Additional Context
When implementing, remember that we have a playground repository to test and poc the workflows.

Proposals to be discussed

Notes: more solutions are going to be proposed

Solution 1: on tag, build demo and trigger a new workflow in the examples repository

What we have now: the demo is built on master push and tag, and it is archived as a GH Actions artifact.

Proposed solution

  • on tag in the lib repository, trigger the run of a new workflow hosted in the examples repository via a workflow_dispatch event
  • in the examples repo, have a workflow_dispatch (can be triggered manually or from the lib repo) which would do what we manually do

About what triggers the examples workflow
For a better understanding, we should probably avoid triggering it from the generate demo for a better separation of concern
We could stop building the demo on tag in the regular 'build demo' workflow and create a new specific workflow in charge of managing the example: prepare data (the demo) and trigger the
This new workflow could also be run manually on demand if we configure it to be trigger on workflow_dispatch with the version (in x.y.z format) as input parameter

About the demo retrieval
This is the part we have to investigate, mainly to be able to know if we can have a demo artifact download url or an artifact id.
See

Passing the tag would make manual run easier, this is a nice to have. It implies being able to retrieve the GH worfklow run with the tag then retrieve the artifact url.

Solution 2: the lib release workflow also update the examples repositories

To be checked if we have issue with Solution 1 (mainly on the demo download part)

  • Pros: less investigation, could be a 1st implementation
  • Cons: less separation between the 2 repositories

Changes compared to Solution 1

  • do what we plan for solution 1, but don't trigger the workflow in the examples repo
  • instead add a new job/steps to manage the examples repo update directly here
  • for the demo artifact retrieval, we can directly use the download artifact action
  • we should create an overall script in the examples repository to manage most of the job to avoid spreading logic in the lib repository. This should make maintenance easier
@tbouffard tbouffard added enhancement New feature or request chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) labels Dec 2, 2020
@tbouffard tbouffard added this to the 0.9.0 milestone Dec 2, 2020
@aibcmars
Copy link
Contributor

aibcmars commented Dec 2, 2020

I like Solution 1

autonomous workflow_dispatch in bpmn-visualization-examples repository
triggered by the tag in bpmn-visualization-js repository

@csouchet
Copy link
Member

csouchet commented Dec 2, 2020

I prefere the first solution to keep separation between the 2 repo 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) enhancement New feature or request
Projects
None yet
3 participants