Closed ashutshkumr closed 4 years ago
@ajbalogh I have this ready on a forked repository: https://github.com/ashutshkumr/openactions Waiting for you to take a quick look so I can create a PR.
./do.sh version 1.0.1
will,
./do.sh art
to:
Status of all jobs can be checked here: https://github.com/ashutshkumr/openactions/actions
That looks great - thanks for that!
Is it possible for you to also add an email action for when the workflow is complete?
I just directly pushed all the changes (sorry about that, it's always better to open a PR) to check if it works. It does but unfortunately, I did not receive any email (maybe it has something to do with permission). e.g. I am receiving email on my private fork.
@ajbalogh , could you please check if you received any ? (https://github.com/open-traffic-generator/models/releases)
Another thing I see is not everything is visible (to me) on landing page - e.g. "Releases" section should be visible on RHS. https://github.com/ashutshkumr/openactions vs https://github.com/open-traffic-generator/models
We might have to change some settings to show relevant information that may currently be hidden.
got the notification and i enabled the releases to show on the landing page of the repo
On Tue, Sep 1, 2020 at 2:21 AM Ashutosh Kumar notifications@github.com wrote:
I just directly pushed all the changes (sorry about that, it's always better to open a PR) to check if it works. It does but unfortunately, I did not receive any email (maybe it has something to do with permission). e.g. I am receiving email on my private fork.
@ajbalogh https://github.com/ajbalogh , could you please check if you received any ? (https://github.com/open-traffic-generator/models/releases)
Another thing I see is not everything is visible (to me) on landing page - e.g. "Releases" section should be visible on RHS. https://github.com/ashutshkumr/openactions vs https://github.com/open-traffic-generator/models
We might have to change some settings to show relevant information that may currently be hidden.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/open-traffic-generator/models/issues/5#issuecomment-684644637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHHFTFVP745SLEYQJMSS3ADSDS4JNANCNFSM4QOAIA5A .
i did the following to create a tag but did not see the version number in the generated release openapi.yaml change - am i missing something? git tag -v0.0.1 -m "annotation message here" git push origin v0.0.1
I think this will need to be documented as contrib guidelines. That part is automated if you do it from inside container.
git clone https://github.com/open-traffic-generator/models.git
cd models
docker build . -t models
docker run -it models
# this will increment patch number in latest tag, update all .yaml files and then push both the changes and the tag itself
./do.sh version
# this will do the same as above, except it uses the version you provide
./do.sh version 0.0.1
We could also proceed like this: If somebody pushes a new tag, update version numbers in openapi yaml files. But we will end up with inconsistency where versions inside yaml files are upgraded after tag release.
i think it should be part of the tag process and the only time it can be updated - as opposed to be user initiated from within the docker. so regardless of what is done to the files they will be normalized as part of the tag process.
what do you think?
From: Ashutosh Kumar notifications@github.com Sent: Tuesday, September 1, 2020 9:02 AM To: open-traffic-generator/models models@noreply.github.com Cc: Andy Balogh andy.balogh@keysight.com; Mention mention@noreply.github.com Subject: Re: [open-traffic-generator/models] Setup GitHub Actions in order to avail permalink for each built version of openapi.yaml (#5)
[EXTERNAL]
We could also proceed like this: If somebody pushes a new tag, update version numbers in openapi yaml files. But we will end up with inconsistency where versions inside yaml files are upgraded after tag release.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/open-traffic-generator/models/issues/5*issuecomment-684962295__;Iw!!I5pVk4LIGAfnvw!3jouSiNWtQtbxNSJZYysJsQFm6KoGg9ngnUA0yvBkPNTrVPEL3wsGDuRjeWsIiC2JzAr$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AHHFTFX7DDBW5AVYZYDY3XTSDULKNANCNFSM4QOAIA5A__;!!I5pVk4LIGAfnvw!3jouSiNWtQtbxNSJZYysJsQFm6KoGg9ngnUA0yvBkPNTrVPEL3wsGDuRjeWsItRyyH-J$.
Definitely, I'll look into it tomorrow. Will push 0.0.2 for now (with proper version updates).
excellent - thanks!!!
From: Ashutosh Kumar notifications@github.com Sent: Tuesday, September 1, 2020 9:06 AM To: open-traffic-generator/models models@noreply.github.com Cc: Andy Balogh andy.balogh@keysight.com; Mention mention@noreply.github.com Subject: Re: [open-traffic-generator/models] Setup GitHub Actions in order to avail permalink for each built version of openapi.yaml (#5)
[EXTERNAL]
Definitely, I'll look into it tomorrow. Will push 0.0.2 for now (with proper version updates).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/open-traffic-generator/models/issues/5*issuecomment-684964959__;Iw!!I5pVk4LIGAfnvw!yLzUaPftErgo1bwURAVqLVi7JLeqmpBMglb8jYiay5p-edmkKlGwP2ALTacChQlKqMPf$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AHHFTFXBW5ATMIOXOOA5AETSDULYPANCNFSM4QOAIA5A__;!!I5pVk4LIGAfnvw!yLzUaPftErgo1bwURAVqLVi7JLeqmpBMglb8jYiay5p-edmkKlGwP2ALTacChXO3DdFr$.
So https://github.com/open-traffic-generator/models/commit/2385c0acb73081ba15f87bffd1e23bf4a3bb8e40 got a little complicated.
To summarize,
api/api.yaml
and push (no need to create/push tags)More details with comments: https://github.com/open-traffic-generator/models/blob/master/.github/workflows/workflow.yml
I'll explain more here based on intended goals
:
Perform Actions
and generate artifacts on every push - Done.
But the artifacts are posted to Actions
page and are not permanent (persists for about 90 days).
NOTE: Creating a tag and release for every push is bad practice and hence I refrained.
Create Release only when intended, and it should reflect in base and generated .yaml - Done.
As part of the workflow, if version number is changed in api/api.yaml
(and if there are no tags for that version number), then create new tag + release and upload artifacts to that release page as well (persists unless release page is deleted)
Avoid commit pollution. Do not make changes to all yaml files every time there's a new release - Done.
As mentioned above, new releases are now only created upon detecting change in api/api.yaml
. Thus other yaml files need not be updated. But, to be semantically correct, I have versioned all those files as ^0.0.0
which is ignored by bundler.py anyway.
Follow the example for, src: https://github.com/protocolbuffers/protobuf build: https://github.com/protocolbuffers/protobuf/releases/tag/v3.13.0
@ajbalogh I'm assigning it to myself. Is it ok to,