From bb44468fb034e86be931d5132317cfaf11091403 Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Fri, 14 Feb 2020 00:12:38 +0100 Subject: [PATCH] buildx --- .drone.yml | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/.drone.yml b/.drone.yml index d077179..d71b94b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,20 +10,20 @@ global-variables: from_secret: prop_dir_sdr PROP_DIR_DECODER: from_secret: prop_dir_decoder - default_settings: &default_settings - build_args_from_env: - - PROP_SERVER - - PROP_DIR_SDR - - PROP_DIR_DECODER - - PROP_SERVER_USER - - PROP_SERVER_KEY - - UI_MODE - username: - from_secret: docker_username - password: - from_secret: docker_password - repo: registry.chrz.de:443/move2docker - registry: registry.chrz.de:443 + default_commands: &default_commands + - docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 + - docker buildx create --use --name crosscomp + - docker buildx inspect --bootstrap + - docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --output=type=image,push=true --progress tty \ + --build-arg UI_MODE --build-arg PROP_SERVER --build-arg PROP_SERVER_USER \ + --build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER \ + -t registry.chrz.de:443:move2docker:$UI_MODE-multi . + + +volumes: + - name: docker_socket + host: + path: /var/run/docker.sock kind: pipeline @@ -31,30 +31,29 @@ name: default steps: - name: build-cli - image: plugins/docker - depends_on: [ clone ] + image: alexviscreanu/buildx + volumes: + - name: docker_socket + path: /var/run/docker.sock + commands: + <<: *default_commands environment: <<: *default_environment UI_MODE: cli - settings: - <<: *default_settings - tags: - - 'cli-x86_64' - name: build-gui - image: plugins/docker - depends_on: [ clone ] + image: alexviscreanu/buildx + volumes: + - name: docker_socket + path: /var/run/docker.sock + commands: + <<: *default_commands environment: <<: *default_environment UI_MODE: gui - settings: - <<: *default_settings - tags: - - 'gui-x86_64' - name: notify image: drillster/drone-email - depends_on: [ build-cli, build-gui ] settings: host: smtp port: 25