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

allow passing previous image in rebase cmd #985

Merged
merged 10 commits into from
Jan 12, 2023

Conversation

joeybrown-sf
Copy link
Contributor

@joeybrown-sf joeybrown-sf commented Jan 6, 2023

This allows a rebase by a image digest reference.

Resolves #983

Here is an example command & output:

➜ lifecycle rebase -previous-image localhost:5003/cnb/rebase/demo@sha256:916a9e100569ee521b86d03b8499b9b93d7d256d6e838868ae720295f2ea2f76 localhost:5003/cnb/rebase/demo:v1 localhost:5003/cnb/rebase/demo:rebased
Saving localhost:5003/cnb/rebase/demo:v1...
*** Images (sha256:07c07bba660126053df38987bbb6098784b9348226ac689ded17f588c6708ed5):
      localhost:5003/cnb/rebase/demo:v1
      localhost:5003/cnb/rebase/demo:rebased

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
@joeybrown-sf joeybrown-sf force-pushed the feature/rebase-digest branch from 9466859 to e8b5735 Compare January 6, 2023 16:59
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
@joeybrown-sf joeybrown-sf force-pushed the feature/rebase-digest branch from 736ffbd to 90cdc81 Compare January 6, 2023 20:18
@joeybrown-sf joeybrown-sf marked this pull request as ready for review January 6, 2023 20:27
@joeybrown-sf joeybrown-sf requested a review from a team as a code owner January 6, 2023 20:27
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
@joeybrown-sf joeybrown-sf force-pushed the feature/rebase-digest branch from 31bfbb7 to 5064683 Compare January 6, 2023 20:44
cmd/lifecycle/rebaser.go Outdated Show resolved Hide resolved
rebaser_test.go Show resolved Hide resolved
cmd/lifecycle/rebaser.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Merging #985 (62e5236) into main (4b1f2c3) will increase coverage by 0.02%.
The diff coverage is 85.72%.

❗ Current head 62e5236 differs from pull request most recent head 9614cad. Consider uploading reports for the commit 9614cad to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #985      +/-   ##
==========================================
+ Coverage   64.87%   64.88%   +0.02%     
==========================================
  Files          86       86              
  Lines        6139     6141       +2     
==========================================
+ Hits         3982     3984       +2     
  Misses       1781     1781              
  Partials      376      376              
Flag Coverage Δ
os_linux 64.34% <85.72%> (+0.02%) ⬆️
os_windows 59.19% <85.72%> (+0.02%) ⬆️
unit 64.34% <85.72%> (+0.02%) ⬆️

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

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
go.mod Outdated Show resolved Hide resolved
cmd/lifecycle/rebaser.go Outdated Show resolved Hide resolved
rebaser_test.go Outdated Show resolved Hide resolved
@joeybrown-sf
Copy link
Contributor Author

joeybrown-sf commented Jan 9, 2023

Depends on updates from imgutil PR 167. ✅ done

Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
@joeybrown-sf joeybrown-sf force-pushed the feature/rebase-digest branch from ee292bf to 9e8d9f5 Compare January 10, 2023 19:49
joeybrown-sf and others added 2 commits January 10, 2023 13:53
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
Co-authored-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
@joeybrown-sf joeybrown-sf requested review from jabrown85 and natalieparellano and removed request for jabrown85 and natalieparellano January 10, 2023 20:00
Copy link
Contributor

@jabrown85 jabrown85 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

rebaser_test.go Outdated Show resolved Hide resolved
Co-authored-by: Jesse Brown <jabrown85@gmail.com>
Signed-off-by: Joey Brown <brown.joseph@salesforce.com>
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.

[RFC 0115] Add -previous-image to rebase
3 participants