Skip to content

Commit 536a275

Browse files
authored
Revert "Improve make run/pipecd execution speed (#6184)" (#6235)
This reverts commit 86d8b66. Signed-off-by: Yoshiki Fujikane <40124947+ffjlabo@users.noreply.github.com>
1 parent 453583f commit 536a275

3 files changed

Lines changed: 10 additions & 69 deletions

File tree

.dockerignore

Lines changed: 0 additions & 60 deletions
This file was deleted.

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,12 @@ run/pipecd: BUILD_LDFLAGS_PREFIX := -X github.com/pipe-cd/pipecd/pkg/version
156156
run/pipecd: BUILD_OPTS ?= -ldflags "$(BUILD_LDFLAGS_PREFIX).version=$(BUILD_VERSION) $(BUILD_LDFLAGS_PREFIX).gitCommit=$(BUILD_COMMIT) $(BUILD_LDFLAGS_PREFIX).buildDate=$(BUILD_DATE) -w"
157157
run/pipecd: CONTROL_PLANE_VALUES ?= ./quickstart/control-plane-values.yaml
158158
run/pipecd:
159+
@echo "Building go binary of Control Plane..."
160+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(BUILD_ENV) go build $(BUILD_OPTS) -o ./.artifacts/pipecd ./cmd/pipecd
161+
162+
@echo "Building web static files..."
163+
yarn --cwd web build
164+
159165
@echo "Building docker image and pushing it to local registry..."
160166
docker build -f cmd/pipecd/Dockerfile -t localhost:5001/pipecd:$(BUILD_VERSION) .
161167
docker push localhost:5001/pipecd:$(BUILD_VERSION)

cmd/pipecd/Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ FROM --platform=$BUILDPLATFORM node:20.19.0-alpine3.21 AS web
55

66
WORKDIR /app
77

8-
RUN apk add --no-cache make git
8+
COPY . .
99

10-
COPY web/package.json web/yarn.lock ./web/
11-
RUN yarn --cwd web install --prefer-offline
10+
RUN apk add --no-cache make git
1211

13-
COPY .git ./.git
14-
COPY web ./web
15-
COPY Makefile .
12+
RUN make update/web-deps
1613
RUN make build/web
1714

1815
# pipecd builder
@@ -26,9 +23,7 @@ WORKDIR /app
2623
COPY go.* ./
2724
RUN go mod download
2825

29-
COPY pkg/ ./pkg/
30-
COPY cmd/ ./cmd/
31-
COPY Makefile .
26+
COPY . ./
3227

3328
RUN make build/go MOD=pipecd BUILD_OS=${TARGETOS} BUILD_ARCH=${TARGETARCH}
3429

0 commit comments

Comments
 (0)