Skip to content
Merged
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
60 changes: 0 additions & 60 deletions .dockerignore

This file was deleted.

6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ run/pipecd: BUILD_LDFLAGS_PREFIX := -X github.com/pipe-cd/pipecd/pkg/version
run/pipecd: BUILD_OPTS ?= -ldflags "$(BUILD_LDFLAGS_PREFIX).version=$(BUILD_VERSION) $(BUILD_LDFLAGS_PREFIX).gitCommit=$(BUILD_COMMIT) $(BUILD_LDFLAGS_PREFIX).buildDate=$(BUILD_DATE) -w"
run/pipecd: CONTROL_PLANE_VALUES ?= ./quickstart/control-plane-values.yaml
run/pipecd:
@echo "Building go binary of Control Plane..."
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 $(BUILD_ENV) go build $(BUILD_OPTS) -o ./.artifacts/pipecd ./cmd/pipecd

@echo "Building web static files..."
yarn --cwd web build

@echo "Building docker image and pushing it to local registry..."
docker build -f cmd/pipecd/Dockerfile -t localhost:5001/pipecd:$(BUILD_VERSION) .
docker push localhost:5001/pipecd:$(BUILD_VERSION)
Expand Down
13 changes: 4 additions & 9 deletions cmd/pipecd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ FROM --platform=$BUILDPLATFORM node:20.19.0-alpine3.21 AS web

WORKDIR /app

RUN apk add --no-cache make git
COPY . .

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

COPY .git ./.git
COPY web ./web
COPY Makefile .
RUN make update/web-deps
RUN make build/web

# pipecd builder
Expand All @@ -26,9 +23,7 @@ WORKDIR /app
COPY go.* ./
RUN go mod download

COPY pkg/ ./pkg/
COPY cmd/ ./cmd/
COPY Makefile .
COPY . ./

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

Expand Down