-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add Windows builder and buildpacks #85
Conversation
Closes #53 |
bb6c0d0
to
7b5438b
Compare
7b5438b
to
0461571
Compare
6b0b061
to
0022039
Compare
- Change to pack flags to new syntax Signed-off-by: Micah Young <ymicah@vmware.com>
- Add Makefile targets for Windows - Fix ASCII art bin bash-app - Change stack to use ContainerUser (avoid permissions issues on k8s and docker) Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Micah Young <ymicah@vmware.com>
- tar up buildpacks when make runs on Windows Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Javier Romero <rjavier@vmware.com>
- missing path option Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Micah Young <ymicah@vmware.com>
- Add missing PATH env var to run image so that it gets properly set in app images - Can be removed once buildpacks/pack#800 is resolved Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Micah Young <ymicah@vmware.com>
Signed-off-by: Micah Young <ymicah@vmware.com>
- Workaround for missing Windows pack support for directory-based buildpacks - Pivot samples-root to a temp path with tgz-buildpacks of the same name Signed-off-by: Micah Young <ymicah@vmware.com>
8d3d888
to
ef63fb5
Compare
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.
Ready for review! All green now thanks to pack 0.13.
- uses: azure/docker-login@v1 | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
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 had to gate this so it would pass on my repo branch which doesn't have a valid secret.
I also moved the step below Build
so make build-*
, which is usually more likely to fail than docker login
, happen sooner.
@@ -6,7 +6,7 @@ PACK_CMD?=pack | |||
## Linux | |||
#################### | |||
|
|||
build-linux: build-linux-stacks build-packages build-builders build-buildpacks | |||
build-linux: build-linux-stacks build-linux-packages build-linux-builders build-linux-buildpacks |
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 moved all Linux targets that don't have alpine
or bionic
to have the linux
in the name
ifeq ($(OS),Windows_NT) | ||
SAMPLES_ROOT:=$(shell mkdir -p .tmp && mktemp --directory -p . .tmp/samples-XXX) | ||
build-sample-root: | ||
@mkdir -p $(SAMPLES_ROOT)/buildpacks/ | ||
|
||
@for bp_dir in ./buildpacks/*/; do \ | ||
tar -czf $(SAMPLES_ROOT)/buildpacks/$$(basename $$bp_dir) -C $$bp_dir . ; \ | ||
done | ||
|
||
@cp -r builders packages $(SAMPLES_ROOT)/ | ||
else | ||
# No-op for posix pack | ||
SAMPLES_ROOT:=. | ||
build-sample-root: | ||
endif |
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.
This makes build-linux-
targets work for LCOW for anyone using bash.exe
, and also let's build-windows-
targets work for WCOW (if they are run from a Mac using DOCKER_HOST, this branch is not used).
This can all be removed once directory buildpacks are supported for pack on Windows.
RUN net users /ADD cnb /passwordreq:no /expires:never | ||
# non-zero sets all user-owned directories to BUILTIN\Users | ||
ARG cnb_uid=1 | ||
ARG cnb_gid=1 | ||
|
||
ENV CNB_USER_ID=${cnb_uid} |
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.
These vars are only needed in the build image, according to the spec
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.
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.
In general this looks great! I added a few nits and a couple suggestions for how the README / examples could be clearer.
84b9a20
to
80bd014
Compare
80bd014
to
da4115f
Compare
Signed-off-by: Micah Young <ymicah@vmware.com>
da4115f
to
cc1684c
Compare
This adds:
buildpacks/hello-world-windows
.bat
clone ofhello-world
nanoserver-1809
buildpacks/hello-world-windows
.bat
clone ofbash-script
.bat
clone ofbash-script-buildpack
Additional:
bash-script
app ASCII artKnown issues:
Signed-off-by: Micah Young ymicah@vmware.com