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

Add shared matrix.json for actions #11

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Conversation

ladisgin
Copy link
Member

No description provided.

@ladisgin ladisgin force-pushed the add_shared_docker_tag branch 3 times, most recently from 0bef04a to 684fcd5 Compare November 25, 2021 14:15
@ladisgin ladisgin changed the title Changes for access private members Add shared matrix.json for actions Nov 25, 2021
@ladisgin ladisgin force-pushed the add_shared_docker_tag branch 7 times, most recently from b1939bb to 5a09e5b Compare November 25, 2021 14:48
@ladisgin ladisgin force-pushed the add_shared_docker_tag branch from 5a09e5b to e823943 Compare November 25, 2021 14:57
@ladisgin ladisgin marked this pull request as ready for review November 25, 2021 15:33
@ladisgin ladisgin force-pushed the add_shared_docker_tag branch 2 times, most recently from ee1a40d to 7aed38a Compare November 25, 2021 16:50
@ladisgin ladisgin marked this pull request as draft November 26, 2021 15:52
@ladisgin ladisgin force-pushed the add_shared_docker_tag branch from 7aed38a to e823943 Compare November 26, 2021 16:03
@korifey
Copy link
Contributor

korifey commented Nov 30, 2021

@akuleshov7 @petertrr could you please tell is "matrix" the only way to parametrize the build?

@petertrr
Copy link

@akuleshov7 @petertrr could you please tell is "matrix" the only way to parametrize the build?

There is also an option with triggering a workflow manually and providing parameters as inputs: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch. I haven't tried this approach myself, though.

In our projects the only parameter we use is a git tag, and we deduce current version from it. We use matrix only when it's required to execute CI in different environments, like different OS, different JDK version and so on.

@orchestr7
Copy link

@korifey also there is no mechanism for sharing the os matrix between actions, and I suppose it is done intentionally. In this case you will always understand what you are doing and in which OS.

Are you sure that you really need that?

@korifey
Copy link
Contributor

korifey commented Nov 30, 2021

@akuleshov7 in our build, we have to make same dependency in several places of yml.
Also because of this issue it can't be parametrized normally.

This piece of code:

      # It is impossible to parametrize image via workflow environment,
      # so its name is hard-coded.
      # https://github.com/actions/runner/issues/480
      image: ghcr.io/unittestbot/utbotcpp/base_env:24-11-2021

@korifey
Copy link
Contributor

korifey commented Nov 30, 2021

@akuleshov7 @petertrr could you please tell is "matrix" the only way to parametrize the build?

There is also an option with triggering a workflow manually and providing parameters as inputs: https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#workflow_dispatch. I haven't tried this approach myself, though.

In our projects the only parameter we use is a git tag, and we deduce current version from it. We use matrix only when it's required to execute CI in different environments, like different OS, different JDK version and so on.

@petertrr here I misused word "parameter". I mean that we need some constants storage, like .properties in Java for deduplication of exact versions like base_env:24-11-2021

@korifey
Copy link
Contributor

korifey commented Dec 2, 2021

@ladisgin LGTM!

@ladisgin ladisgin marked this pull request as ready for review December 7, 2021 09:05
@ladisgin ladisgin merged commit 9fe8e81 into main Dec 7, 2021
@ladisgin ladisgin deleted the add_shared_docker_tag branch December 7, 2021 12:17
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