Re-adding 386 arch build, added pipeline steps
This commit is contained in:
parent
d8e10b7fd3
commit
5003a98020
@ -6,4 +6,5 @@ set -x
|
||||
# compile the main binary
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/amd64/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm64/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
GOOS=linux GOARCH=arm CGO_ENABLED=0 GOARM=7 go build -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
GOOS=linux GOARCH=arm CGO_ENABLED=0 GOARM=7 go build -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/arm/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
GOOS=linux GOARCH=386 CGO_ENABLED=0 go build -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/linux/i386/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
43
.drone.yml
43
.drone.yml
@ -67,48 +67,67 @@ pipeline:
|
||||
# go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/arm/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
# fi
|
||||
|
||||
# build_linux_386:
|
||||
# image: golang:1.10
|
||||
# pull: true
|
||||
# group: build
|
||||
# environment:
|
||||
# - GOOS=linux
|
||||
# - GOARCH=386
|
||||
# - CGO_ENABLED=0
|
||||
# commands:
|
||||
# - |
|
||||
# if test "${DRONE_TAG}" = ""; then
|
||||
# go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
# else
|
||||
# go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/linux/i386/drone-hugo github.com/drone-plugins/drone-hugo/cmd/drone-hugo
|
||||
# fi
|
||||
|
||||
publish_linux_amd64:
|
||||
image: plugins/docker:17.12
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password, hugo_version ]
|
||||
secrets: [ docker_username, docker_password ]
|
||||
group: docker
|
||||
repo: plugins/hugo
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
dockerfile: Dockerfile
|
||||
build_args:
|
||||
- HUGO_VERSION=${HUGO_VERSION}
|
||||
- HUGO_ARCH=64bit
|
||||
when:
|
||||
event: [ push, tag ]
|
||||
|
||||
# publish_linux_arm64:
|
||||
# image: plugins/docker:17.12
|
||||
# pull: true
|
||||
# secrets: [ docker_username, docker_password, hugo_version ]
|
||||
# secrets: [ docker_username, docker_password ]
|
||||
# group: docker
|
||||
# repo: plugins/hugo
|
||||
# auto_tag: true
|
||||
# auto_tag_suffix: linux-arm64
|
||||
# dockerfile: Dockerfile.arm64
|
||||
# build_args:
|
||||
# - HUGO_VERSION=${HUGO_VERSION}
|
||||
# - HUGO_ARCH=arm64
|
||||
# when:
|
||||
# event: [ push, tag ]
|
||||
|
||||
# publish_linux_arm:
|
||||
# image: plugins/docker:17.12
|
||||
# pull: true
|
||||
# secrets: [ docker_username, docker_password, hugo_version ]
|
||||
# secrets: [ docker_username, docker_password ]
|
||||
# group: docker
|
||||
# repo: plugins/hugo
|
||||
# auto_tag: true
|
||||
# auto_tag_suffix: linux-arm
|
||||
# dockerfile: Dockerfile.arm
|
||||
# when:
|
||||
# event: [ push, tag ]
|
||||
|
||||
# publish_linux_386:
|
||||
# image: plugins/docker:17.12
|
||||
# pull: true
|
||||
# secrets: [ docker_username, docker_password ]
|
||||
# group: docker
|
||||
# repo: plugins/hugo
|
||||
# auto_tag: true
|
||||
# auto_tag_suffix: linux-arm
|
||||
# dockerfile: Dockerfile.arm
|
||||
# build_args:
|
||||
# - HUGO_VERSION=${HUGO_VERSION}
|
||||
# - HUGO_ARCH=arm
|
||||
# when:
|
||||
# event: [ push, tag ]
|
||||
|
||||
|
18
Dockerfile.i386
Normal file
18
Dockerfile.i386
Normal file
@ -0,0 +1,18 @@
|
||||
FROM plugins/base:arm64
|
||||
|
||||
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" \
|
||||
org.label-schema.name="Drone Hugo" \
|
||||
org.label-schema.vendor="Drone.IO Community" \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
ENV HUGO_VERSION=0.46
|
||||
ENV HUGO_ARCH=32bit
|
||||
ENV PLUGIN_HUGO_ARCH=$HUGO_ARCH
|
||||
ENV PLUGIN_HUGO_SHIPPED_VERSION=$HUGO_VERSION
|
||||
|
||||
RUN apk --no-cache add git && \
|
||||
wget -O- https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-${HUGO_ARCH}.tar.gz | tar xz -C /bin
|
||||
|
||||
ADD release/linux/i386/drone-hugo /bin/
|
||||
|
||||
ENTRYPOINT ["/bin/drone-hugo"]
|
11
Makefile
11
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: test build amd64 arm64 arm
|
||||
.PHONY: test build amd64 arm64 arm i386
|
||||
|
||||
test:
|
||||
dep ensure
|
||||
@ -8,10 +8,13 @@ build: .drone.sh
|
||||
./.drone.sh
|
||||
|
||||
amd64: Dockerfile
|
||||
docker build -t "plugins/hugo:amd64" --build-arg HUGO_VERSION="$(hugo)" --build-arg HUGO_ARCH=64bit .
|
||||
docker build -t "plugins/hugo:amd64" .
|
||||
|
||||
arm64: Dockerfile.arm64
|
||||
docker build -t "plugins/hugo:arm64" --build-arg HUGO_VERSION="$(hugo)" --build-arg HUGO_ARCH=arm64 .
|
||||
docker build -t "plugins/hugo:arm64" .
|
||||
|
||||
arm: Dockerfile.arm
|
||||
docker build -t "plugins/hugo:arm" --build-arg HUGO_VERSION="$(hugo)" --build-arg HUGO_ARCH=arm .
|
||||
docker build -t "plugins/hugo:arm" .
|
||||
|
||||
arm: Dockerfile.i386
|
||||
docker build -t "plugins/hugo:i386" .
|
Loading…
Reference in New Issue
Block a user