diff --git a/.drone.jsonnet b/.drone.jsonnet index 3f47cb0..592fea5 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -175,7 +175,7 @@ local PipelineBuildContainer(arch='amd64') = { settings: { dry_run: true, dockerfile: 'Dockerfile', - repo: 'xoxys/git-batch', + repo: 'thegeeklab/git-batch', username: { from_secret: 'docker_username' }, password: { from_secret: 'docker_password' }, }, @@ -184,20 +184,37 @@ local PipelineBuildContainer(arch='amd64') = { }, }, { - name: 'publish', + name: 'publish-dockerhub', image: 'plugins/docker:18-linux-' + arch, - pull: 'always', settings: { auto_tag: true, auto_tag_suffix: arch, - dockerfile: 'Dockerfile', - repo: 'xoxys/git-batch', + dockerfile: 'docker/Dockerfile', + repo: 'thegeeklab/${DRONE_REPO_NAME}', username: { from_secret: 'docker_username' }, password: { from_secret: 'docker_password' }, }, when: { ref: ['refs/heads/master', 'refs/tags/**'], }, + depends_on: ['dryrun'], + }, + { + name: 'publish-quay', + image: 'plugins/docker:18-linux-' + arch, + settings: { + auto_tag: true, + auto_tag_suffix: arch, + dockerfile: 'docker/Dockerfile', + registry: 'quay.io', + repo: 'quay.io/thegeeklab/${DRONE_REPO_NAME}', + username: { from_secret: 'quay_username' }, + password: { from_secret: 'quay_password' }, + }, + when: { + ref: ['refs/heads/master', 'refs/tags/**'], + }, + depends_on: ['dryrun'], }, ], depends_on: [ @@ -218,25 +235,62 @@ local PipelineNotifications = { steps: [ { image: 'plugins/manifest', - name: 'manifest', + name: 'manifest-dockerhub', settings: { ignore_missing: true, auto_tag: true, username: { from_secret: 'docker_username' }, password: { from_secret: 'docker_password' }, - spec: 'manifest.tmpl', + spec: 'docker/manifest.tmpl', + }, + when: { + status: ['success'], }, }, { - name: 'readme', - image: 'sheogorath/readme-to-dockerhub', + image: 'plugins/manifest', + name: 'manifest-quay', + settings: { + ignore_missing: true, + auto_tag: true, + username: { from_secret: 'quay_username' }, + password: { from_secret: 'quay_password' }, + spec: 'docker/manifest-quay.tmpl', + }, + when: { + status: ['success'], + }, + }, + { + name: 'pushrm-dockerhub', + image: 'chko/docker-pushrm:1', environment: { - DOCKERHUB_USERNAME: { from_secret: 'docker_username' }, - DOCKERHUB_PASSWORD: { from_secret: 'docker_password' }, - DOCKERHUB_REPO_PREFIX: 'xoxys', - DOCKERHUB_REPO_NAME: 'git-batch', - README_PATH: 'README.md', - SHORT_DESCRIPTION: 'git-batch - Automate cloning a single branch from a repo list', + DOCKER_PASS: { + from_secret: 'docker_password', + }, + DOCKER_USER: { + from_secret: 'docker_username', + }, + PUSHRM_FILE: 'README.md', + PUSHRM_SHORT: 'GitHub release notification bot', + PUSHRM_TARGET: 'thegeeklab/${DRONE_REPO_NAME}', + }, + when: { + status: ['success'], + }, + }, + { + name: 'pushrm-quay', + image: 'chko/docker-pushrm:1', + environment: { + APIKEY__QUAY_IO: { + from_secret: 'quay_token', + }, + PUSHRM_FILE: 'README.md', + PUSHRM_TARGET: 'quay.io/thegeeklab/${DRONE_REPO_NAME}', + }, + when: { + status: ['success'], }, }, { diff --git a/.drone.yml b/.drone.yml index e39db5c..bb28f63 100644 --- a/.drone.yml +++ b/.drone.yml @@ -200,29 +200,49 @@ steps: dry_run: true password: from_secret: docker_password - repo: xoxys/git-batch + repo: thegeeklab/git-batch username: from_secret: docker_username when: ref: - refs/pull/** -- name: publish - pull: always +- name: publish-dockerhub image: plugins/docker:18-linux-amd64 settings: auto_tag: true auto_tag_suffix: amd64 - dockerfile: Dockerfile + dockerfile: docker/Dockerfile password: from_secret: docker_password - repo: xoxys/git-batch + repo: thegeeklab/${DRONE_REPO_NAME} username: from_secret: docker_username when: ref: - refs/heads/master - refs/tags/** + depends_on: + - dryrun + +- name: publish-quay + image: plugins/docker:18-linux-amd64 + settings: + auto_tag: true + auto_tag_suffix: amd64 + dockerfile: docker/Dockerfile + password: + from_secret: quay_password + registry: quay.io + repo: quay.io/thegeeklab/${DRONE_REPO_NAME} + username: + from_secret: quay_username + when: + ref: + - refs/heads/master + - refs/tags/** + depends_on: + - dryrun trigger: ref: @@ -256,29 +276,49 @@ steps: dry_run: true password: from_secret: docker_password - repo: xoxys/git-batch + repo: thegeeklab/git-batch username: from_secret: docker_username when: ref: - refs/pull/** -- name: publish - pull: always +- name: publish-dockerhub image: plugins/docker:18-linux-arm64 settings: auto_tag: true auto_tag_suffix: arm64 - dockerfile: Dockerfile + dockerfile: docker/Dockerfile password: from_secret: docker_password - repo: xoxys/git-batch + repo: thegeeklab/${DRONE_REPO_NAME} username: from_secret: docker_username when: ref: - refs/heads/master - refs/tags/** + depends_on: + - dryrun + +- name: publish-quay + image: plugins/docker:18-linux-arm64 + settings: + auto_tag: true + auto_tag_suffix: arm64 + dockerfile: docker/Dockerfile + password: + from_secret: quay_password + registry: quay.io + repo: quay.io/thegeeklab/${DRONE_REPO_NAME} + username: + from_secret: quay_username + when: + ref: + - refs/heads/master + - refs/tags/** + depends_on: + - dryrun trigger: ref: @@ -312,29 +352,49 @@ steps: dry_run: true password: from_secret: docker_password - repo: xoxys/git-batch + repo: thegeeklab/git-batch username: from_secret: docker_username when: ref: - refs/pull/** -- name: publish - pull: always +- name: publish-dockerhub image: plugins/docker:18-linux-arm settings: auto_tag: true auto_tag_suffix: arm - dockerfile: Dockerfile + dockerfile: docker/Dockerfile password: from_secret: docker_password - repo: xoxys/git-batch + repo: thegeeklab/${DRONE_REPO_NAME} username: from_secret: docker_username when: ref: - refs/heads/master - refs/tags/** + depends_on: + - dryrun + +- name: publish-quay + image: plugins/docker:18-linux-arm + settings: + auto_tag: true + auto_tag_suffix: arm + dockerfile: docker/Dockerfile + password: + from_secret: quay_password + registry: quay.io + repo: quay.io/thegeeklab/${DRONE_REPO_NAME} + username: + from_secret: quay_username + when: + ref: + - refs/heads/master + - refs/tags/** + depends_on: + - dryrun trigger: ref: @@ -354,28 +414,58 @@ platform: arch: amd64 steps: -- name: manifest +- name: manifest-dockerhub image: plugins/manifest settings: auto_tag: true ignore_missing: true password: from_secret: docker_password - spec: manifest.tmpl + spec: docker/manifest.tmpl username: from_secret: docker_username + when: + status: + - success -- name: readme - image: sheogorath/readme-to-dockerhub +- name: manifest-quay + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + password: + from_secret: quay_password + spec: docker/manifest-quay.tmpl + username: + from_secret: quay_username + when: + status: + - success + +- name: pushrm-dockerhub + image: chko/docker-pushrm:1 environment: - DOCKERHUB_PASSWORD: + DOCKER_PASS: from_secret: docker_password - DOCKERHUB_REPO_NAME: git-batch - DOCKERHUB_REPO_PREFIX: xoxys - DOCKERHUB_USERNAME: + DOCKER_USER: from_secret: docker_username - README_PATH: README.md - SHORT_DESCRIPTION: git-batch - Automate cloning a single branch from a repo list + PUSHRM_FILE: README.md + PUSHRM_SHORT: GitHub release notification bot + PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME} + when: + status: + - success + +- name: pushrm-quay + image: chko/docker-pushrm:1 + environment: + APIKEY__QUAY_IO: + from_secret: quay_token + PUSHRM_FILE: README.md + PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME} + when: + status: + - success - name: matrix image: plugins/matrix @@ -406,6 +496,6 @@ depends_on: --- kind: signature -hmac: 036a13c26fb62c830f919c9154fe647c70173f088cd8e59e0fc8b133b4cd4359 +hmac: b460d6f3e540ccfe73ddca52125517a858429b3de7e7354065cb4130b4238358 ... diff --git a/.github/settings.yml b/.github/settings.yml index 7dcdb47..e4b83b7 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -1,8 +1,8 @@ --- repository: name: git-batch - description: Simple tool to automate cloning a single branch from a list of repositories - topics: git, batch, automation, python + description: Automate cloning a single branch from a list of repositories + topics: git, automation, python private: false has_issues: true diff --git a/CHANGELOG.md b/CHANGELOG.md index de4f062..c1af4ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1,2 @@ -* initial release +- INTERNAL + - publish to dockerhub and quay.io diff --git a/README.md b/README.md index ef1d33b..82bb64e 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,23 @@ # git-batch -[![Build Status](https://img.shields.io/drone/build/xoxys/git-batch?logo=drone)](https://cloud.drone.io/xoxys/git-batch) -[![Docker Hub](https://img.shields.io/badge/docker-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/xoxys/git-batch) + +Automate cloning a single branch from a list of repositories + +[![Build Status](https://img.shields.io/drone/build/thegeeklab/git-batch?logo=drone)](https://cloud.drone.io/thegeeklab/git-batch) +[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/git-batch) +[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/git-batch) [![Python Version](https://img.shields.io/pypi/pyversions/git-batch.svg)](https://pypi.org/project/git-batch/) [![PyPi Status](https://img.shields.io/pypi/status/git-batch.svg)](https://pypi.org/project/git-batch/) [![PyPi Release](https://img.shields.io/pypi/v/git-batch.svg)](https://pypi.org/project/git-batch/) -[![License: MIT](https://img.shields.io/github/license/xoxys/git-batch)](LICENSE) +[![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/git-batch)](https://github.com/thegeeklab/git-batch/graphs/contributors) +[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/git-batch) +[![License: MIT](https://img.shields.io/github/license/thegeeklab/git-batch)](<[LICENSE](https://github.com/thegeeklab/git-batch/blob/master/LICENSE)>) Simple tool to automate cloning a single branch from a list of repositories. +## Contributors + +Special thanks goes to all [contributors](https://github.com/thegeeklab/git-batch/graphs/contributors). + ## License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. - -## Maintainers and Contributors - -[Robert Kaussow](https://github.com/xoxys) +This project is licensed under the MIT License - see the [LICENSE](https://github.com/thegeeklab/git-batch/blob/master/LICENSE) file for details. diff --git a/Dockerfile b/docker/Dockerfile similarity index 81% rename from Dockerfile rename to docker/Dockerfile index 1b24a5b..dcf50fa 100644 --- a/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,8 @@ FROM python:3.7-alpine -LABEL maintainer="Robert Kaussow " \ +LABEL maintainer="Robert Kaussow " \ org.label-schema.name="git-batch" \ - org.label-schema.vcs-url="https://github.com/xoxys/git-batch" \ + org.label-schema.vcs-url="https://github.com/thegeeklab/git-batch" \ org.label-schema.vendor="Robert Kaussow" \ org.label-schema.schema-version="1.0" diff --git a/docker/manifest-quay.tmpl b/docker/manifest-quay.tmpl new file mode 100644 index 0000000..4af212a --- /dev/null +++ b/docker/manifest-quay.tmpl @@ -0,0 +1,24 @@ +image: quay.io/thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: quay.io/thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64 + platform: + architecture: amd64 + os: linux + + - image: quay.io/thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + + - image: quay.io/thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm + platform: + architecture: arm + os: linux + variant: v7 diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl new file mode 100644 index 0000000..1748358 --- /dev/null +++ b/docker/manifest.tmpl @@ -0,0 +1,24 @@ +image: thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64 + platform: + architecture: amd64 + os: linux + + - image: thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + + - image: thegeeklab/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm + platform: + architecture: arm + os: linux + variant: v7 diff --git a/gitbatch/__init__.py b/gitbatch/__init__.py index 3ce08c9..be61ddf 100644 --- a/gitbatch/__init__.py +++ b/gitbatch/__init__.py @@ -5,5 +5,5 @@ __project__ = "git-batch" __version__ = "0.2.0" __license__ = "MIT" __maintainer__ = "Robert Kaussow" -__email__ = "mail@geeklabor.de" -__url__ = "https://github.com/xoxys/git-batch" +__email__ = "mail@thegeeklab.de" +__url__ = "https://github.com/thegeeklab/git-batch" diff --git a/manifest.tmpl b/manifest.tmpl deleted file mode 100644 index c4d86a1..0000000 --- a/manifest.tmpl +++ /dev/null @@ -1,24 +0,0 @@ -image: xoxys/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} -{{#if build.tags}} -tags: -{{#each build.tags}} - - {{this}} -{{/each}} -{{/if}} -manifests: - - image: xoxys/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}amd64 - platform: - architecture: amd64 - os: linux - - - image: xoxys/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm64 - platform: - architecture: arm64 - os: linux - variant: v8 - - - image: xoxys/git-batch:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm - platform: - architecture: arm - os: linux - variant: v7