Skip to content

Break CI Github Action Into Smaller Jobs #121

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

Merged
merged 5 commits into from
Apr 5, 2024

Conversation

Jdubrick
Copy link
Contributor

@Jdubrick Jdubrick commented Apr 3, 2024

What does this PR do / why we need it

This PR breaks apart the large job that was being run as part of our CI workflow and splits it into multiple smaller jobs. This is because we were running into storage problems during some runs. By splitting the larger job into multiple smaller ones we can take advantage of having different environments and thus separate storage constraints for each job.

When working on this PR I initially tried to implement reusable workflows so that the copy-paste of the checkout, setup, sha, and install steps did not need to be duplicated for each job. However, since each job is a new virtual environment it is unable to run the rest of the job without those steps also being present and run within them.

Additionally, in order for nx to allow my push to go through it was requiring me to rename ci.yml to ci.yaml, this may be a format setting that is defined as part of nx cloud that I do not have access to. I am assuming this because I found nothing in the repo that suggests a naming convention for yaml files, only through nx docs stating that .yaml is the preferred.

Which issue(s) does this PR fix

Fixes devfile/api#1464

PR acceptance criteria

  • Unit Tests
  • E2E Tests
  • Documentation
    Update the sidebar if there is a new file added or an existing filename is changed

How to test changes / Special notes to the reviewer

Jdubrick added 2 commits April 3, 2024 15:49
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@openshift-ci openshift-ci bot requested a review from elsony April 3, 2024 20:28
@openshift-ci openshift-ci bot added the approved label Apr 3, 2024
Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

Aside from my comment and the feedback from code scanning, we'll need to remove the required constraint from the removed Main Job:

image

FYI @elsony

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@Jdubrick
Copy link
Contributor Author

Jdubrick commented Apr 4, 2024

Added top level permission so token can only read for the CI job as it was being flagged by the scorecard. Additionally pinned the version of setup-node and nx-set-shas to v4.0.0 for each, an upgrade in version from what they previously were at as they were severely outdated.

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

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

/lgtm

PR changes looks good, just need the branch protection changed to remove the old job.

@openshift-ci openshift-ci bot added the lgtm label Apr 4, 2024
Copy link

openshift-ci bot commented Apr 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jdubrick, michael-valdron

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Jdubrick,michael-valdron]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@michael-valdron
Copy link
Member

just need the branch protection changed to remove the old job

Fixed.

FYI @Jdubrick

@Jdubrick Jdubrick merged commit 306a3a9 into devfile:main Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failing CI check for devfile-web
2 participants