chore: build xfsprogs before binaries (#197)
Building xfsprogs before adding the soruce code will speed up builds.
This commit is contained in:
parent
ab82aa7577
commit
edbc84bfbe
@ -55,7 +55,11 @@ pipeline:
|
||||
- image
|
||||
stages:
|
||||
base:
|
||||
artifacts:
|
||||
- source: /src/github.com/autonomy/dianemo/src/initramfs/vendor
|
||||
destination: ./vendor
|
||||
tasks:
|
||||
- xfsprogs
|
||||
- src
|
||||
osd:
|
||||
tasks:
|
||||
@ -79,7 +83,6 @@ stages:
|
||||
- blockd
|
||||
initramfs:
|
||||
tasks:
|
||||
- xfsprogs
|
||||
- init
|
||||
- initramfs
|
||||
image:
|
||||
@ -88,11 +91,11 @@ stages:
|
||||
generate:
|
||||
artifacts:
|
||||
- source: /src/github.com/autonomy/dianemo/src/initramfs/cmd/osd/proto
|
||||
destination: ./cmd/osd
|
||||
destination: ./cmd/osd/proto
|
||||
- source: /src/github.com/autonomy/dianemo/src/initramfs/cmd/trustd/proto
|
||||
destination: ./cmd/trustd
|
||||
destination: ./cmd/trustd/proto
|
||||
- source: /src/github.com/autonomy/dianemo/src/initramfs/cmd/blockd/proto
|
||||
destination: ./cmd/blockd
|
||||
destination: ./cmd/blockd/proto
|
||||
tasks:
|
||||
- proto
|
||||
test:
|
||||
@ -124,6 +127,7 @@ tasks:
|
||||
CMD false
|
||||
init:
|
||||
template: |
|
||||
FROM {{ .Repository }}:base AS {{ .Docker.CurrentStage }}
|
||||
WORKDIR /src/github.com/autonomy/dianemo/src/initramfs/cmd/{{ .Docker.CurrentStage }}
|
||||
{{ if and .Git.IsClean .Git.IsTag }}
|
||||
RUN GOOS=linux GOARCH=amd64 go build \
|
||||
@ -232,11 +236,12 @@ tasks:
|
||||
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10.1
|
||||
ENV GO111MODULE auto
|
||||
WORKDIR /src/github.com/autonomy/dianemo/src/initramfs
|
||||
RUN cp /tools/lib/libblkid.* /lib \
|
||||
&& cp /tools/lib/libuuid.* /lib
|
||||
COPY --from=xfsprogs {{ index .Variables "rootfs" }} {{ index .Variables "rootfs" }}
|
||||
COPY ./ ./
|
||||
RUN go mod download
|
||||
RUN go mod verify
|
||||
RUN go mod vendor
|
||||
CMD ["false"]
|
||||
test:
|
||||
template: |
|
||||
FROM {{ .Repository }}:base AS {{ .Docker.CurrentStage }}
|
||||
@ -263,7 +268,12 @@ tasks:
|
||||
ENTRYPOINT ["/{{ .Docker.CurrentStage }}"]
|
||||
xfsprogs:
|
||||
template: |
|
||||
FROM {{ .Repository }}:base AS {{ .Docker.CurrentStage }}
|
||||
FROM dianemo/tools:{{ .Docker.Image.Tag }} AS {{ .Docker.CurrentStage }}
|
||||
RUN ln -s /tools/lib64 /lib64
|
||||
RUN mkdir -p /etc/ssl/certs
|
||||
RUN ln -s /tools/etc/ssl/certs/ca-certificates /etc/ssl/certs/ca-certificates
|
||||
RUN cp /tools/lib/libblkid.* /lib \
|
||||
&& cp /tools/lib/libuuid.* /lib
|
||||
WORKDIR /tmp/{{ .Docker.CurrentStage }}
|
||||
RUN curl -L {{index .Variables "srcXfsprogs" }} | tar -xJ --strip-components=1
|
||||
RUN make \
|
||||
|
Loading…
x
Reference in New Issue
Block a user