open-traffic-generator / models

Open Traffic Generator Core Models
https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/master/artifacts/openapi.yaml&nocors
MIT License
61 stars 16 forks source link

Setup GitHub Actions in order to avail permalink for each built version of openapi.yaml #5

Closed ashutshkumr closed 4 years ago

ashutshkumr commented 4 years ago

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,

ashutshkumr commented 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.

Status of all jobs can be checked here: https://github.com/ashutshkumr/openactions/actions

ajbalogh commented 4 years ago

That looks great - thanks for that!

ajbalogh commented 4 years ago

Is it possible for you to also add an email action for when the workflow is complete?

ashutshkumr commented 4 years ago

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.

ajbalogh commented 4 years ago

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 .

ajbalogh commented 4 years ago

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

ashutshkumr commented 4 years ago

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
ashutshkumr commented 4 years ago

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.

ajbalogh commented 4 years ago

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$.

ashutshkumr commented 4 years ago

Definitely, I'll look into it tomorrow. Will push 0.0.2 for now (with proper version updates).

ajbalogh commented 4 years ago

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$.

ashutshkumr commented 4 years ago

So https://github.com/open-traffic-generator/models/commit/2385c0acb73081ba15f87bffd1e23bf4a3bb8e40 got a little complicated.

To summarize,

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: