Actually fix arm64 build

This commit is contained in:
Tulir Asokan 2020-02-25 23:13:19 +02:00
parent e20a712dce
commit ab98ef4e3b
2 changed files with 6 additions and 8 deletions

View file

@ -16,12 +16,10 @@ build:
- mkdir -p .cache
- export GOPATH="$CI_PROJECT_DIR/.cache"
script:
- GOARCH=amd64 go build -o mautrix-whatsapp-amd64
- GOARCH=arm64 go build -o mautrix-whatsapp-arm64
- go build -o mautrix-whatsapp
artifacts:
paths:
- mautrix-whatsapp-amd64
- mautrix-whatsapp-arm64
- mautrix-whatsapp
- example-config.yaml
build docker amd64:
@ -33,7 +31,7 @@ build docker amd64:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --pull --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-amd64 . --file Dockerfile.ci --build-args EXECUTABLE=./mautrix-whatsapp-amd64
- docker build --pull --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-amd64 . --file Dockerfile.ci
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-amd64
- docker rmi $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-amd64
@ -46,8 +44,8 @@ build docker arm64:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --pull --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-amd64 . --file Dockerfile.ci --build-args EXECUTABLE=./mautrix-whatsapp-arm64
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-amd64
- docker build --pull --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-arm64 .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-arm64
- docker rmi $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA-arm64
manifest:

View file

@ -1,4 +1,4 @@
FROM golang:1.12-alpine AS builder
FROM golang:1-alpine AS builder
RUN apk add --no-cache git ca-certificates build-base su-exec