mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-22 10:21:01 +00:00
gosuper for other GOARCH should never get to the supervisor image
This commit is contained in:
parent
c2496d30c2
commit
2f09413096
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,6 +2,4 @@
|
|||||||
*.swp
|
*.swp
|
||||||
data
|
data
|
||||||
bin/gosuper
|
bin/gosuper
|
||||||
bin/linux_amd64
|
gosuper/bin/
|
||||||
bin/linux_386
|
|
||||||
bin/linux_arm
|
|
||||||
|
@ -32,9 +32,7 @@ RUN chmod +x /app/src/enterContainer.sh \
|
|||||||
&& /app/node_modules/.bin/coffee -c /app/src \
|
&& /app/node_modules/.bin/coffee -c /app/src \
|
||||||
&& ln -sf /app/entry.sh /start # Needed for legacy
|
&& ln -sf /app/entry.sh /start # Needed for legacy
|
||||||
|
|
||||||
RUN mv /app/bin/linux_amd64/gosuper /app/bin/ && \
|
RUN chmod +x /app/bin/gosuper
|
||||||
chmod +x /app/bin/gosuper && \
|
|
||||||
rm -rf /app/bin/linux_*
|
|
||||||
|
|
||||||
ENV SUPERVISOR_IMAGE resin/amd64-supervisor
|
ENV SUPERVISOR_IMAGE resin/amd64-supervisor
|
||||||
ENV CONFIG_MOUNT_POINT /boot/config.json
|
ENV CONFIG_MOUNT_POINT /boot/config.json
|
||||||
|
@ -32,9 +32,7 @@ RUN chmod +x /app/src/enterContainer.sh \
|
|||||||
&& /app/node_modules/.bin/coffee -c /app/src \
|
&& /app/node_modules/.bin/coffee -c /app/src \
|
||||||
&& ln -sf /app/entry.sh /start # Needed for legacy
|
&& ln -sf /app/entry.sh /start # Needed for legacy
|
||||||
|
|
||||||
RUN mv /app/bin/linux_arm/gosuper /app/bin/ && \
|
RUN chmod +x /app/bin/gosuper
|
||||||
chmod +x /app/bin/gosuper && \
|
|
||||||
rm -rf /app/bin/linux_*
|
|
||||||
|
|
||||||
ENV SUPERVISOR_IMAGE resin/armv7hf-supervisor
|
ENV SUPERVISOR_IMAGE resin/armv7hf-supervisor
|
||||||
ENV CONFIG_MOUNT_POINT /boot/config.json
|
ENV CONFIG_MOUNT_POINT /boot/config.json
|
||||||
|
@ -32,9 +32,7 @@ RUN chmod +x /app/src/enterContainer.sh \
|
|||||||
&& /app/node_modules/.bin/coffee -c /app/src \
|
&& /app/node_modules/.bin/coffee -c /app/src \
|
||||||
&& ln -sf /app/entry.sh /start # Needed for legacy
|
&& ln -sf /app/entry.sh /start # Needed for legacy
|
||||||
|
|
||||||
RUN mv /app/bin/linux_386/gosuper /app/bin/ && \
|
RUN chmod +x /app/bin/gosuper
|
||||||
chmod +x /app/bin/gosuper && \
|
|
||||||
rm -rf /app/bin/linux_*
|
|
||||||
|
|
||||||
ENV SUPERVISOR_IMAGE resin/i386-supervisor
|
ENV SUPERVISOR_IMAGE resin/i386-supervisor
|
||||||
ENV CONFIG_MOUNT_POINT /boot/config.json
|
ENV CONFIG_MOUNT_POINT /boot/config.json
|
||||||
|
@ -32,8 +32,6 @@ RUN chmod +x /app/src/enterContainer.sh \
|
|||||||
&& /app/node_modules/.bin/coffee -c /app/src \
|
&& /app/node_modules/.bin/coffee -c /app/src \
|
||||||
&& ln -sf /app/entry.sh /start # Needed for legacy
|
&& ln -sf /app/entry.sh /start # Needed for legacy
|
||||||
|
|
||||||
RUN mv /app/bin/linux_arm/gosuper /app/bin/ && \
|
RUN chmod +x /app/bin/gosuper
|
||||||
chmod +x /app/bin/gosuper && \
|
|
||||||
rm -rf /app/bin/linux_*
|
|
||||||
|
|
||||||
CMD ["/app/entry.sh"]
|
CMD ["/app/entry.sh"]
|
||||||
|
11
Makefile
11
Makefile
@ -58,24 +58,25 @@ go-builder:
|
|||||||
-rm ./gosuper/config.json
|
-rm ./gosuper/config.json
|
||||||
|
|
||||||
gosuper: go-builder
|
gosuper: go-builder
|
||||||
-mkdir -p gosuper/bin
|
-mkdir -p bin
|
||||||
-docker rm --volumes -f resin_build_gosuper_$(JOB_NAME) || true
|
-docker rm --volumes -f resin_build_gosuper_$(JOB_NAME) || true
|
||||||
docker run --name resin_build_gosuper_$(JOB_NAME) -v $(shell pwd)/bin:/usr/src/app/bin -e USER_ID=$(shell id -u) -e GROUP_ID=$(shell id -g) -e GOARCH=$(GOARCH) resin/go-supervisor-builder:$(SUPERVISOR_VERSION)
|
docker run --name resin_build_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper/bin:/usr/src/app/bin -e USER_ID=$(shell id -u) -e GROUP_ID=$(shell id -g) -e GOARCH=$(GOARCH) resin/go-supervisor-builder:$(SUPERVISOR_VERSION)
|
||||||
docker rm --volumes -f resin_build_gosuper_$(JOB_NAME)
|
docker rm --volumes -f resin_build_gosuper_$(JOB_NAME)
|
||||||
|
mv gosuper/bin/linux_$(GOARCH)/gosuper bin/gosuper
|
||||||
|
|
||||||
test-gosuper: go-builder
|
test-gosuper: go-builder
|
||||||
-docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true
|
-docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true
|
||||||
docker run --name resin_test_gosuper_$(JOB_NAME) -v $(shell pwd)/bin:/usr/src/app/bin resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && ./test_formatting.sh && go test -v ./gosuper"
|
docker run --name resin_test_gosuper_$(JOB_NAME) resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && ./test_formatting.sh && go test -v ./gosuper"
|
||||||
docker rm --volumes -f resin_test_gosuper_$(JOB_NAME)
|
docker rm --volumes -f resin_test_gosuper_$(JOB_NAME)
|
||||||
|
|
||||||
format-gosuper: go-builder
|
format-gosuper: go-builder
|
||||||
-docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true
|
-docker rm --volumes -f resin_test_gosuper_$(JOB_NAME) || true
|
||||||
docker run --name resin_test_gosuper_$(JOB_NAME) -v $(shell pwd)/bin:/usr/src/app/bin -v $(shell pwd)/gosuper:/usr/src/app/src/resin-supervisor/gosuper resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go fmt ./..."
|
docker run --name resin_test_gosuper_$(JOB_NAME) -v $(shell pwd)/gosuper:/usr/src/app/src/resin-supervisor/gosuper resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go fmt ./..."
|
||||||
docker rm --volumes -f resin_test_gosuper_$(JOB_NAME)
|
docker rm --volumes -f resin_test_gosuper_$(JOB_NAME)
|
||||||
|
|
||||||
test-integration: go-builder
|
test-integration: go-builder
|
||||||
-docker rm --volumes -f resin_test_integration_$(JOB_NAME) || true
|
-docker rm --volumes -f resin_test_integration_$(JOB_NAME) || true
|
||||||
docker run --name resin_test_integration_$(JOB_NAME) --net=host -e SUPERVISOR_IP="$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' resin_supervisor_1)" -v $(shell pwd)/bin:/usr/src/app/bin --volumes-from resin_supervisor_1 resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go test -v ./supertest"
|
docker run --name resin_test_integration_$(JOB_NAME) --net=host -e SUPERVISOR_IP="$(shell docker inspect --format '{{ .NetworkSettings.IPAddress }}' resin_supervisor_1)" --volumes-from resin_supervisor_1 resin/go-supervisor-builder:$(SUPERVISOR_VERSION) bash -c "cd src/resin-supervisor/gosuper && go test -v ./supertest"
|
||||||
docker rm --volumes -f resin_test_integration_$(JOB_NAME)
|
docker rm --volumes -f resin_test_integration_$(JOB_NAME)
|
||||||
|
|
||||||
.PHONY: supervisor deploy supervisor-dind run-supervisor
|
.PHONY: supervisor deploy supervisor-dind run-supervisor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user