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

Build stable image paths using symlinks in build/latest/ #767

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Feb 21, 2020

Issue number:

Fixes #725

Description of changes:

This adds stable paths for the most recently built artifacts of each arch/variant combination. Stable paths make our builds easier for newcomers to understand, make the setup experience easier to document, and make it easier to do informal scripting around build processes. The links are in a new directory to reduce the chance of using them accidentally.

Testing done:

I built aws-k8s and saw the links in place:

$ ll build/latest
total 80K
drwxr-xr-x 2 tjk domain^users 4.0K 02-21 12:13 ./
drwxr-xr-x 3 tjk domain^users  52K 02-21 12:13 ../
lrwxrwxrwx 1 tjk domain^users   65 02-21 12:13 bottlerocket-x86_64-aws-k8s-boot.ext4.lz4 -> ../bottlerocket-x86_64-aws-k8s-0.2.2-a1d831a5-dirty-boot.ext4.lz4
lrwxrwxrwx 1 tjk domain^users   64 02-21 12:13 bottlerocket-x86_64-aws-k8s-data.img.lz4 -> ../bottlerocket-x86_64-aws-k8s-0.2.2-a1d831a5-dirty-data.img.lz4
lrwxrwxrwx 1 tjk domain^users   59 02-21 12:13 bottlerocket-x86_64-aws-k8s.img.lz4 -> ../bottlerocket-x86_64-aws-k8s-0.2.2-a1d831a5-dirty.img.lz4
lrwxrwxrwx 1 tjk domain^users   66 02-21 12:13 bottlerocket-x86_64-aws-k8s-migrations.tar -> ../bottlerocket-x86_64-aws-k8s-0.2.2-a1d831a5-dirty-migrations.tar
lrwxrwxrwx 1 tjk domain^users   65 02-21 12:13 bottlerocket-x86_64-aws-k8s-root.ext4.lz4 -> ../bottlerocket-x86_64-aws-k8s-0.2.2-a1d831a5-dirty-root.ext4.lz4
lrwxrwxrwx 1 tjk domain^users   67 02-21 12:13 bottlerocket-x86_64-aws-k8s-root.verity.lz4 -> ../bottlerocket-x86_64-aws-k8s-0.2.2-a1d831a5-dirty-root.verity.lz4

I rebuilt aws-k8s and saw the links disappear during the build, then reappear at the end.

I built aws-dev and saw that the aws-k8s links were not touched, and aws-dev links were created at the end.

@tjkirch
Copy link
Contributor Author

tjkirch commented Feb 21, 2020

This push makes cargo make clean remove the latest directory, too, since it's removing all built images.

@tjkirch tjkirch merged commit 8b67de4 into develop Feb 21, 2020
@tjkirch tjkirch deleted the image-links branch February 21, 2020 23:01
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.

Add symlinks to latest built images
3 participants