Skip to content

Commit 14e81ef

Browse files
committed
chore: remove dapper
Longhorn 12863 Signed-off-by: Derek Su <derek.su@suse.com>
1 parent 8fd580c commit 14e81ef

5 files changed

Lines changed: 38 additions & 39 deletions

File tree

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM golang:1.23-alpine AS base
2+
3+
ARG TARGETARCH
4+
5+
RUN apk -U add bash git gcc musl-dev vim less file curl wget ca-certificates
6+
7+
ENV ARCH=${TARGETARCH}
8+
9+
WORKDIR /go/src/github.com/longhorn/kbench
10+
COPY . .
11+
12+
FROM base AS build
13+
RUN ./scripts/build
14+
15+
FROM base AS validate
16+
RUN ./scripts/validate && touch /validate.done
17+
18+
FROM scratch AS build-artifacts
19+
COPY --from=build /go/src/github.com/longhorn/kbench/bin/ /bin/
20+
21+
FROM scratch AS ci-artifacts
22+
COPY --from=validate /validate.done /validate.done
23+
COPY --from=build /go/src/github.com/longhorn/kbench/bin/ /bin/

Dockerfile.dapper

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

Makefile

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
TARGETS := $(shell ls scripts)
1+
MACHINE := longhorn
22

3-
.dapper:
4-
@echo Downloading dapper
5-
@curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp
6-
@@chmod +x .dapper.tmp
7-
@./.dapper.tmp -v
8-
@mv .dapper.tmp .dapper
3+
.PHONY: build validate ci package clean
94

10-
$(TARGETS): .dapper
11-
./.dapper $@
5+
buildx-machine:
6+
@docker buildx create --name=$(MACHINE) 2>/dev/null || true
127

13-
deps: .dapper
14-
./.dapper -m bind env GO111MODULE=on go mod vendor
15-
./.dapper -m bind chown -R $$(id -u) vendor dist bin go.mod go.sum .cache
8+
build: buildx-machine
9+
docker buildx build --builder=$(MACHINE) --target build-artifacts --output type=local,dest=. -f Dockerfile .
10+
11+
validate:
12+
docker buildx build --target validate -f Dockerfile .
13+
14+
ci: buildx-machine
15+
docker buildx build --builder=$(MACHINE) --target ci-artifacts --output type=local,dest=. -f Dockerfile .
16+
17+
package: build
18+
./scripts/package
1619

1720
clean:
1821
rm -rf bin dist
1922

2023
.DEFAULT_GOAL := ci
2124

22-
.PHONY: $(TARGETS)
23-

scripts/ci

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ cd $(dirname $0)
55

66
./build
77
./validate
8-
./package

scripts/entry

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

0 commit comments

Comments
 (0)