From ab98ef4e3b6ceb03822a6fc9591ccb00c566f2f4 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 25 Feb 2020 23:13:19 +0200 Subject: [PATCH] Actually fix arm64 build --- .gitlab-ci.yml | 12 +++++------- Dockerfile | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f5a5e5..33b38da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: diff --git a/Dockerfile b/Dockerfile index 869ab98..a06dbe8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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