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

Makefile: Copy things around less #316

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ docker/Dockerfile.service: docker/Dockerfile.service.in Makefile
@sed -e 's/@@GIT_HASH@@/$(GIT_HASH)/g' < $< > [email protected] && mv [email protected] $@

build/.%.done: docker/Dockerfile.%
mkdir -p ./build/docker/$*
cp -r $^ ./build/docker/$*/
${DOCKER} build --build-arg=revision=$(GIT_HASH) -t weaveworks/launcher-$* -t weaveworks/launcher-$*:$(IMAGE_TAG) -f build/docker/$*/Dockerfile.$* ./build/docker/$*
${DOCKER} build --build-arg=revision=$(GIT_HASH) -t weaveworks/launcher-$* -t weaveworks/launcher-$*:$(IMAGE_TAG) -f docker/Dockerfile.$* .
touch $@

#
Expand Down Expand Up @@ -96,7 +94,7 @@ build/.bootstrap.done: bootstrap/*.go
# Service
#

build/.service.done: build/service build/static
build/.service.done: build/service service/static/* service/static/agent.yaml

build/service: $(SERVICE_DEPS)
build/service: service/*.go
Expand All @@ -113,11 +111,6 @@ service/static/agent.yaml: service/static/agent.yaml.in
sed -e 's|@@IMAGE_URL@@|weaveworks/build-tmp-public:launcher-agent-$(IMAGE_TAG)|g' < $< > [email protected] && mv [email protected] $@; \
fi

build/static: service/static/* service/static/agent.yaml
mkdir -p $@
cp $^ $@


#
# Local integration tests
#
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3.7
RUN apk add --no-cache ca-certificates
COPY ./agent /usr/bin/launcher-agent
COPY ./kubectl /usr/bin/kubectl
COPY ./build/agent /usr/bin/launcher-agent
COPY ./build/kubectl /usr/bin/kubectl
ENTRYPOINT ["/usr/bin/launcher-agent"]
CMD ["-help"]

Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile.service.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM alpine:3.7
WORKDIR /
COPY service /launcher-service
COPY build/service /launcher-service
RUN mkdir static
COPY static/install.sh /static/
COPY static/agent.yaml /static/
COPY service/static/install.sh /static/
COPY service/static/agent.yaml /static/
EXPOSE 80
ENTRYPOINT ["/launcher-service", "--bootstrap-version=@@GIT_HASH@@"]

Expand Down