diff --git a/.woodpecker/.build.yml b/.woodpecker/.build.yml index 2f9221c..5ece461 100644 --- a/.woodpecker/.build.yml +++ b/.woodpecker/.build.yml @@ -1,12 +1,7 @@ -matrix: - PLATFORM: - - linux/amd64 - - linux/arm64 - # These checks already get performed on the feature branches branches: exclude: [ main, dev ] -platform: $PLATFORM +platform: linux/amd64 pipeline: vieter: diff --git a/build_arm64.yml b/.woodpecker/.build_arm64.yml similarity index 100% rename from build_arm64.yml rename to .woodpecker/.build_arm64.yml diff --git a/.woodpecker/.publish.yml b/.woodpecker/.publish.yml index 6399d7f..d23f63c 100644 --- a/.woodpecker/.publish.yml +++ b/.woodpecker/.publish.yml @@ -3,25 +3,24 @@ platform: linux/amd64 pipeline: dev: - image: woodpeckerci/plugin-docker-buildx + image: plugins/docker secrets: [ docker_username, docker_password ] settings: repo: chewingbever/vieter tag: dev - platforms: [ linux/arm64/v8, linux/amd64 ] when: event: push branch: dev release: - image: woodpeckerci/plugin-docker-buildx + image: plugins/docker secrets: [ docker_username, docker_password ] settings: repo: chewingbever/vieter tag: - latest - $CI_COMMIT_TAG - platforms: [ linux/arm64/v8, linux/amd64 ] + mtu: 1000 when: event: tag branch: main diff --git a/Dockerfile b/Dockerfile index 5564e34..556ca58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,15 +5,17 @@ WORKDIR /app # Copy over source code & build production binary COPY src ./src COPY Makefile ./ - -ENV LDFLAGS='-lz -lbz2 -llzma -lexpat -lzstd -llz4 -static' -RUN v -o pvieter -cflags "-O3" src +RUN make prod FROM alpine:3.15 ENV REPO_DIR=/data +RUN apk update && \ + apk add --no-cache \ + libarchive + COPY --from=builder /app/pvieter /usr/local/bin/vieter ENTRYPOINT [ "/usr/local/bin/vieter" ] diff --git a/Makefile b/Makefile index dc2273b..103aca6 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ LARCHIVE_LIB := $(LARCHIVE_DIR)/libarchive/libarchive.so # Custom V command for linking libarchive # V := LDFLAGS=$(PWD)/$(LARCHIVE_LIB) v -cflags '-I$(PWD)/$(LARCHIVE_DIR) -I $(PWD)/$(LARCHIVE_DIR)' -V := v -showcc +V := v all: vieter