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

🌱 Test image build when build related files change #1907

Merged
merged 2 commits into from
May 14, 2024

Conversation

sjd78
Copy link
Member

@sjd78 sjd78 commented May 10, 2024

If the workflow is run from a PR, and the PR includes a change to the Dockerfile or package-lock.json, then run image builds for all of our target platforms.

The images are built but not pushed to any repository.

We want to be reasonably sure that any major build file changes will not cause the image-build-and-push on PR merge workflow to break. Doing the image build here should reveal most problems much earlier. For example, a npm version update in the build container could break github action nofiles or network access capabilities for the npm install.

See #1742, #1746, and #1781 for some other examples of when this check could have caught issues before a PR merge.

Supports: #1883

If the workflow is run from a PR, and the PR includes
a change to the `Dockerfile` or `package-lock.json`, then
run image builds for all of our target platforms.

The images are built but not pushed to any repository.

We want to be reasonably sure that any major build file changes
will not cause the image-build-and-push on PR merge workflow
to break.  Doing the image build here should show up most
problems much earlier.  For example, a npm version update
in the build container could break github action `nofiles`
or network access capabilities for the npm install.

See konveyor#1742, konveyor#1746, and konveyor#1781 for some other examples of
when this check could have caught issues before a PR
merge.

Supports: konveyor#1883

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 requested review from djzager, ibolton336 and rszwajko May 10, 2024 21:14
@sjd78
Copy link
Member Author

sjd78 commented May 10, 2024

Note: This PR should be backported to release-0.3 and release-0.4 to help protect the active release branches.

Example of the action run against test PRs in my fork:

Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.22%. Comparing base (b654645) to head (655deda).
Report is 138 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1907      +/-   ##
==========================================
+ Coverage   39.20%   41.22%   +2.02%     
==========================================
  Files         146      158      +12     
  Lines        4857     5189     +332     
  Branches     1164     1323     +159     
==========================================
+ Hits         1904     2139     +235     
+ Misses       2939     2931       -8     
- Partials       14      119     +105     
Flag Coverage Δ
client 41.22% <ø> (+2.02%) ⬆️
server ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sjd78 sjd78 changed the title ✨ Test image build when build related files change 🌱 Test image build when build related files change May 10, 2024
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request May 10, 2024
Configure dependabot to create PRs when the images
we use in the `Dockerfile` have a newer version.  This
allows us to reference specific container images and
be automatically notified of newer versions.

Supports: konveyor#1883

CI added in konveyor#1907 will run against the PRs dependabot
will open for `Dockerfile` changes.  This will allow
us to have confidence that the update will be successful.

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 linked an issue May 10, 2024 that may be closed by this pull request
Copy link
Member

@djzager djzager left a comment

Choose a reason for hiding this comment

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

VISACK. Good idea.

Copy link
Collaborator

@rszwajko rszwajko left a comment

Choose a reason for hiding this comment

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

In the future it would be nice to include this capability into konveyor/release-tools/.github/workflows/build-push-images.yaml@main.

@djzager
Copy link
Member

djzager commented May 13, 2024

In the future it would be nice to include this capability into konveyor/release-tools/.github/workflows/build-push-images.yaml@main.

If you could document what you mean in an issue against the repo (because it isn't immediately obvious how I could put this into the reusable workflow in a way that benefits everyone) that would be supremely helpful to me.

@sjd78 sjd78 merged commit 7dc0a71 into konveyor:main May 14, 2024
12 checks passed
sjd78 added a commit that referenced this pull request May 14, 2024
Configure dependabot to create PRs when the images we use in the
`Dockerfile` have a newer version. This allows us to reference specific
container images and be automatically notified of newer versions.

Supports: #1883

CI added in #1907 will run against the PRs dependabot will open for
`Dockerfile` changes. This will allow us to have confidence that the
update will be successful.

Signed-off-by: Scott J Dickerson <[email protected]>
@sjd78 sjd78 deleted the test_build_changes branch May 14, 2024 16:23
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request May 15, 2024
…ange (konveyor#1907)

If the workflow is run from a PR, and the PR includes a change to the
`Dockerfile` or `package-lock.json`, then run image builds for all of
our target platforms.

The images are built but not pushed to any repository.

We want to be reasonably sure that any major build file changes will not
cause the image-build-and-push on PR merge workflow to break. Doing the
image build here should reveal most problems much earlier. For example,
a npm version update in the build container could break github action
`nofiles` or network access capabilities for the npm install.

See konveyor#1742, konveyor#1746, and konveyor#1781 for some other examples of when this check
could have caught issues before a PR merge.

Supports: konveyor#1883
Backport-of: konveyor#1907

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit to sjd78/tackle2-ui that referenced this pull request May 15, 2024
…ange (konveyor#1907)

If the workflow is run from a PR, and the PR includes a change to the
`Dockerfile` or `package-lock.json`, then run image builds for all of
our target platforms.

The images are built but not pushed to any repository.

We want to be reasonably sure that any major build file changes will not
cause the image-build-and-push on PR merge workflow to break. Doing the
image build here should reveal most problems much earlier. For example,
a npm version update in the build container could break github action
`nofiles` or network access capabilities for the npm install.

See konveyor#1742, konveyor#1746, and konveyor#1781 for some other examples of when this check
could have caught issues before a PR merge.

Supports: konveyor#1883
Backport-of: konveyor#1907

Note: build architectures updated to match the settings on the
      backport target branch

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit that referenced this pull request May 15, 2024
…ange (#1907) (#1914)

If the workflow is run from a PR, and the PR includes a change to the
`Dockerfile` or `package-lock.json`, then run image builds for all of
our target platforms.

The images are built but not pushed to any repository.

We want to be reasonably sure that any major build file changes will not
cause the image-build-and-push on PR merge workflow to break. Doing the
image build here should reveal most problems much earlier. For example,
a npm version update in the build container could break github action
`nofiles` or network access capabilities for the npm install.

See #1742, #1746, and #1781 for some other examples of when this check
could have caught issues before a PR merge.

Supports: #1883
Backport-of: #1907

Signed-off-by: Scott J Dickerson <[email protected]>
sjd78 added a commit that referenced this pull request May 15, 2024
…ange (#1907) (#1915)

If the workflow is run from a PR, and the PR includes a change to the
`Dockerfile` or `package-lock.json`, then run image builds for all of
our target platforms.

The images are built but not pushed to any repository.

We want to be reasonably sure that any major build file changes will not
cause the image-build-and-push on PR merge workflow to break. Doing the
image build here should reveal most problems much earlier. For example,
a npm version update in the build container could break github action
`nofiles` or network access capabilities for the npm install.

See #1742, #1746, and #1781 for some other examples of when this check
could have caught issues before a PR merge.

Supports: #1883
Backport-of: #1907

Note: build architectures updated to match the settings on the backport
target branch

Signed-off-by: Scott J Dickerson <[email protected]>
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.

Enable dependabot tracking and add CI tests for the Dockerfile
4 participants