levonet.ci_registry_rm_container

CI: Docker-Container aus dem Registry entfernen

Diese Rolle ist im CI-Pipeline nützlich, nachdem ein Pull Request abgeschlossen und die Infrastruktur entfernt wurde.

Rollenvariablen

  • ci_registry_scheme (Standard: http)
  • ci_registry_url (Standard: localhost): URL der Registry-API.
  • ci_registry_container (erforderlich): Name des Containers.
  • ci_registry_tag (erforderlich): Container-Tag.
  • ci_registry_username (optional): Benutzername für die Registry.
  • ci_registry_password (optional): Passwort für die Registry.

Beispiel-Playbook

- hosts: 127.0.0.1
  connection: local
  gather_facts: no
  vars:
    ci_registry_url: registry.meineorganisation.com
    ci_registry_container: meineorganisation/meineanwendung
    ci_registry_tag: "{{ meineanwendung_tag }}"
  roles:
  - role: levonet.registry-rm-container

Und in Jenkins ausführen:

ansible-playbook meinspielbuch.yml -e meineanwendung_tag="${GIT_BRANCH}"

Lizenz

MIT

Autorinformationen

Diese Rolle wurde von Pavlo Bashynskyi erstellt.

Über das Projekt

Remove docker container from registry

Installieren
ansible-galaxy install levonet.ci_registry_rm_container
GitHub Repository
Lizenz
mit
Downloads
8.1k