diff --git a/.drone.yml b/.drone.yml index e86f1ea..56045c2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,5 @@ ---- kind: pipeline -name: default +name: amd64 platform: os: linux @@ -11,18 +10,16 @@ steps: pull: default image: rancher/dapper:v0.4.1 commands: - - dapper ci + - dapper ci volumes: - name: docker path: /var/run/docker.sock - name: github_binary_release - image: drone/github-release + image: plugins/github-release settings: api_key: from_secret: github_token - checksum: - - sha256 files: - "dist/artifacts/*" when: @@ -33,8 +30,44 @@ steps: - refs/tags/* event: - tag - volumes: -- name: docker - host: + - name: docker + host: + path: /var/run/docker.sock +--- +kind: pipeline +name: arm64 + +platform: + os: linux + arch: arm64 + +steps: +- name: build + pull: default + image: rancher/dapper:v0.4.1 + commands: + - dapper ci + volumes: + - name: docker path: /var/run/docker.sock + +- name: github_binary_release + image: plugins/github-release + settings: + api_key: + from_secret: github_token + files: + - "dist/artifacts/*" + when: + instance: + - drone-publish.rancher.io + ref: + - refs/head/master + - refs/tags/* + event: + - tag +volumes: + - name: docker + host: + path: /var/run/docker.sock diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 359ba25..1ef8efc 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -8,7 +8,7 @@ RUN apt-get update && \ apt-get install -y gcc ca-certificates git wget curl vim less file && \ rm -f /bin/sh && ln -s /bin/bash /bin/sh -ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ +ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash RUN wget -O - https://storage.googleapis.com/golang/go1.9.7.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ @@ -16,6 +16,7 @@ RUN wget -O - https://storage.googleapis.com/golang/go1.9.7.linux-${!GOLANG_ARCH ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \ DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \ + DOCKER_URL_arm64=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm64 \ DOCKER_URL=DOCKER_URL_${ARCH} RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker diff --git a/scripts/version b/scripts/version index c52f0f7..307fbb5 100755 --- a/scripts/version +++ b/scripts/version @@ -4,6 +4,8 @@ if [ -n "$(git status --porcelain --untracked-files=no)" ]; then DIRTY="-dirty" fi +git fetch + COMMIT=$(git rev-parse --short HEAD) GIT_TAG=$(git tag -l --contains HEAD | head -n 1)