https://github.com/levonet/ansible-ci-registry-rm-container
Remove docker container from registry
https://github.com/levonet/ansible-ci-registry-rm-container
Last synced: 5 months ago
JSON representation
Remove docker container from registry
- Host: GitHub
- URL: https://github.com/levonet/ansible-ci-registry-rm-container
- Owner: levonet
- License: mit
- Created: 2018-09-28T10:48:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-06T14:19:16.000Z (over 7 years ago)
- Last Synced: 2024-10-11T23:04:39.247Z (over 1 year ago)
- Homepage: https://galaxy.ansible.com/levonet/ci_registry_rm_container
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CI: Remove docker container from registry
This role is useful in CI pipeline after closing Pull Request and removing infrastructure.
## Role Variables
- `ci_registry_scheme` (default: http)
- `ci_registry_url` (default: localhost): Registry API url.
- `ci_registry_container` (required): Container name.
- `ci_registry_tag` (required): Container tag.
- `ci_registry_username ` (optional): Registry username.
- `ci_registry_password` (optional): Registry password.
## Example Playbook
```yaml
- hosts: 127.0.0.1
connection: local
gather_facts: no
vars:
ci_registry_url: registry.myorg.com
ci_registry_container: myorg/myapp
ci_registry_tag: "{{ myapp_tag }}"
roles:
- role: levonet.registry-rm-container
```
And run in Jenkins:
```bash
ansible-playbook myplaybook.yml -e myapp_tag="${GIT_BRANCH}"
```
## License
[MIT](https://opensource.org/licenses/MIT)
## Author Information
This role was created by [Pavlo Bashynskyi](https://github.com/levonet)