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

cork: add --sdk-url #240

Merged
merged 3 commits into from
Oct 5, 2021
Merged

cork: add --sdk-url #240

merged 3 commits into from
Oct 5, 2021

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Oct 5, 2021

This PR superseeds #238 - we add a new flag --sdk-url in order to provide more flexibility.

It defaults to mirror.release.flatcar-linux.net for the UX.

Testing done

$ ./bin/cork create --verbose
2021-10-05T10:42:14Z cli: Started logging at level INFO
2021-10-05T10:42:14Z cork: Detecting SDK version
2021-10-05T10:42:14Z cork: Found SDK version 3005.0.0 from remote repo
2021-10-05T10:42:14Z cork: Downloading SDK version 3005.0.0
2021-10-05T10:42:14Z sdk: Downloading https://mirror.release.flatcar-linux.net/sdk/amd64/3005.0.0/flatcar-sdk-amd64-3005.0.0.tar.bz2 to /home/mathieu/go/src/github.com/kinvolk/mantle/.cache/sdks/flatcar-sdk-amd64-3005.0.0.tar.bz2
2021-10-05T10:42:14Z sdk: Resuming from byte 7405568
^Catcar-sdk-amd64-3005.0.0.tar.bz2: [                          ] 23.5 MB/1.36 GB
$ ./bin/cork create --json-key=$HOME/.gce/release.json --verbose --sdk-url storage.googleapis.com --sdk-url-path "/flatcar-jenkins/sdk"
2021-10-05T10:45:01Z cli: Started logging at level INFO
2021-10-05T10:45:01Z cork: Detecting SDK version
2021-10-05T10:45:03Z cork: Found SDK version 3005.0.0 from remote repo
2021-10-05T10:45:03Z cork: Downloading SDK version 3005.0.0
2021-10-05T10:45:03Z sdk: Downloading https://storage.googleapis.com/flatcar-jenkins/sdk/amd64/3005.0.0/flatcar-sdk-amd64-3005.0.0.tar.bz2 to /home/mathieu/go/src/github.com/kinvolk/mantle/.cache/sdks/flatcar-sdk-amd64-3005.0.0.tar.bz2
^Catcar-sdk-amd64-3005.0.0.tar.bz2: [=                         ] 53.7 MB/1.37 GB

Signed-off-by: Mathieu Tortuyaux <[email protected]>
@tormath1 tormath1 requested a review from a team October 5, 2021 10:52
@tormath1 tormath1 marked this pull request as ready for review October 5, 2021 10:52
@@ -122,7 +124,9 @@ func init() {

creationFlags = pflag.NewFlagSet("creation", pflag.ExitOnError)
creationFlags.StringVar(&sdkUrlPath,
"sdk-url-path", "/flatcar-jenkins/sdk", "SDK URL path")
"sdk-url-path", "sdk", "SDK URL path")
Copy link
Member

Choose a reason for hiding this comment

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

Any reason to change this?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I think I know now - the default SDK URL is https://mirror.release.flatcar-linux.net, and there we store the SDKs in the sdk directory.

Nevermind then. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly - it decreases user friction and the CI always passes the --sdk-url-path value.

@tormath1 tormath1 merged commit 703938f into flatcar-master Oct 5, 2021
@tormath1 tormath1 deleted the tormath1/sdk-url branch October 5, 2021 11:57
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.

2 participants