-
Notifications
You must be signed in to change notification settings - Fork 379
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
Pieces of multiplatform support #696
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ea25850
docs(CONTRIBUTING.md): clarify audience
jsoref cf0856b
docs(CONTRIBUTING.md): clarify instructions
jsoref 3cd50e6
feat(CONTRIBUTING.md): simplify tagging instructions
jsoref d3e3605
feat(base): generate multiplatform images
jsoref 50de9fe
feat(browser): generate multiplatform images
jsoref b3465b2
feat(included): generate multiplatform images
jsoref File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env perl | ||
|
||
use File::Temp qw/ tempfile /; | ||
use File::Which; | ||
|
||
my $default_tag='latest'; | ||
|
||
sub usage { | ||
print STDERR "$0 IMAGE_TO_RETAG [TAG] | ||
|
||
Use manifest-tool to assign an additional TAG to IMAGE_TO_RETAG. | ||
|
||
TAG defaults to ${default_tag} | ||
"; | ||
} | ||
|
||
unless (which('manifest-tool')) { | ||
print STDERR "Please install manifest-tool <https://github.com/estesp/manifest-tool>"; | ||
exit 1; | ||
} | ||
|
||
my $image=shift @ARGV; | ||
unless (defined $image) { | ||
usage(); | ||
exit 1; | ||
} | ||
|
||
if ($image eq '--help' || $image eq '-h') { | ||
usage(); | ||
exit 0; | ||
} | ||
|
||
my $tag=shift @ARGV || $default_tag; | ||
my $manifest_info=`manifest-tool inspect "$image"`; | ||
my ($fh, $manifest)=tempfile(); | ||
|
||
for (split /\n/, $manifest_info) { | ||
if (/^Name:\s+(\S+):/) { | ||
$name=$1; | ||
print $fh "image: $name:$tag\n"."manifests:\n"; | ||
} elsif (/Digest: (\S+)/) { | ||
$digest=$1; | ||
} elsif (/OS: (\S+)/) { | ||
$os=$1; | ||
} elsif (/Arch: (\S+)/) { | ||
print $fh "- image: $name\@$digest\n platform:\n architecture: $1\n os: $os\n"; | ||
$os=""; | ||
$digest=""; | ||
} | ||
} | ||
close $fh; | ||
my $result=system "manifest-tool push from-spec $manifest"; | ||
exit $result if $result; | ||
unlink $manifest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 hadn't seen this, I've only been messing with
docker buildx
anddocker manifest
, both of which have... limitations... I might pull this in after #700 to make it easier for us to add arm64 builds to existing tags.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm told one of these:
... might be a bit cleaner. But either way, downloading to just add a tag is silly (and potentially expensive use of bandwidth).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsoref I noticed you removed the branch but I wanted to update you on what happened to my progress. I did remove the redirection and I then got passed that but then got the infamous qemu error that a lot of folks are getting with arm. Are you running your images on a Mac M1 or what machine are you using?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can still access them, either by giving a new branch name to a thing, by visiting https://github.com/cypress-io/cypress-docker-images/commits/b3465b26da55d3c41febc56dab3f5364ae9dd78e and using the branch chooser.
or by doing something like
git fetch origin refs/pull/696/head:my-new-branch
As for the error, the goal is to run the arm version of cypress on our M1s, not the x64 versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rnunezil: if you point me to the specific shas you're using and commands you're running, I'm happy to try to help.
(This isn't my primary task, but we do use cypress, so I'm glad to try to help out.)