From 38d3b029617e4483e69d5974793f226254e7be46 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 9 Oct 2019 13:03:55 +0200 Subject: [PATCH] cleanup --- .drone.jsonnet | 16 +++++++++++++++- .drone.yml | 22 ++++++++++++++++------ README.md | 3 --- manifest.tmpl | 6 +++--- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 064944e..93db437 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -117,6 +117,20 @@ local PipelineBuildPackage = { "cd dist/ && sha256sum * > sha256sum.txt" ], }, + { + name: "publish-pypi", + image: "plugins/pypi", + pull: "always", + settings: { + username: { "from_secret": "pypi_username" }, + password: { "from_secret": "pypi_password" }, + repository: "https://upload.pypi.org/legacy/", + skip_build: true + }, + when: { + ref: [ "refs/tags/**" ], + }, + }, { name: "publish-github", image: "plugins/github-release", @@ -209,7 +223,7 @@ local PipelineNotifications = { pull: "always", settings: { ignore_missing: true, - tags: ["${DRONE_TAG}", "${DRONE_TAG%-*}", "${DRONE_TAG%.*}", "${DRONE_TAG%%.*}"], + auto_tag: true, username: { from_secret: "docker_username" }, password: { from_secret: "docker_password" }, spec: "manifest.tmpl", diff --git a/.drone.yml b/.drone.yml index 3c6df2f..7187397 100644 --- a/.drone.yml +++ b/.drone.yml @@ -138,6 +138,20 @@ steps: commands: - "cd dist/ && sha256sum * > sha256sum.txt" +- name: publish-pypi + pull: always + image: plugins/pypi + settings: + password: + from_secret: pypi_password + repository: https://upload.pypi.org/legacy/ + skip_build: true + username: + from_secret: pypi_username + when: + ref: + - "refs/tags/**" + - name: publish-github pull: always image: plugins/github-release @@ -335,15 +349,11 @@ steps: pull: always image: plugins/manifest settings: + auto_tag: true ignore_missing: true password: from_secret: docker_password spec: manifest.tmpl - tags: - - "${DRONE_TAG}" - - "${DRONE_TAG%-*}" - - "${DRONE_TAG%.*}" - - "${DRONE_TAG%%.*}" username: from_secret: docker_username when: @@ -403,6 +413,6 @@ depends_on: --- kind: signature -hmac: 8e2fd7a3c62cabf6824d72b6aee4d486b4a7a8234e43ae8629510c3334c4626f +hmac: c058f002db91849e25873dfd440bb27949e6bb0de7087ceada91ba7fedcb93c2 ... diff --git a/README.md b/README.md index 46be30f..b87e2a2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,4 @@ [![Build Status](https://cloud.drone.io/api/badges/xoxys/ansible-doctor/status.svg)](https://cloud.drone.io/xoxys/ansible-doctor) [![](https://images.microbadger.com/badges/image/xoxys/ansible-doctor.svg)](https://microbadger.com/images/xoxys/ansible-doctor "Get your own image badge on microbadger.com") -[![](https://images.microbadger.com/badges/version/xoxys/ansible-doctor.svg)](https://microbadger.com/images/xoxys/ansible-doctor "Get your own version badge on microbadger.com") -[![](https://images.microbadger.com/badges/version/xoxys/ansible-doctor:amd64.svg)](https://microbadger.com/images/xoxys/ansible-doctor:amd64 "Get your own version badge on microbadger.com") -[![](https://images.microbadger.com/badges/version/xoxys/ansible-doctor:arm.svg)](https://microbadger.com/images/xoxys/ansible-doctor:arm "Get your own version badge on microbadger.com") ![License](https://img.shields.io/github/license/xoxys/ansible-doctor) diff --git a/manifest.tmpl b/manifest.tmpl index acc9559..18afbdd 100644 --- a/manifest.tmpl +++ b/manifest.tmpl @@ -2,9 +2,7 @@ image: xoxys/ansible-doctor:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else} {{#if build.tags}} tags: {{#each build.tags}} -{{#if this}} - - {{trimPrefix "v" this}} -{{/if}} + - {{this}} {{/each}} {{/if}} manifests: @@ -17,8 +15,10 @@ manifests: platform: architecture: arm64 os: linux + variant: v8 - image: xoxys/ansible-doctor:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm platform: architecture: arm os: linux + variant: v7