levonet.ci_github_rm_branch
CI: Remove branch from GitHub repository
This task is helpful in a CI pipeline after a Pull Request has been merged.
Role Variables
ci_github_api(default: https://api.github.com)ci_github_username(required): Your GitHub username.ci_github_password(required): GitHub access token.ci_github_owner(required): The name of your GitHub account or organization.ci_github_repo(required): The name of your GitHub project repository.ci_github_ref(required): The name of the GitHub branch you want to remove.ci_github_ignore_error(default: yes): Whether to ignore errors.
Example Playbook
- hosts: 127.0.0.1
  connection: local
  gather_facts: no
  vars:
    ci_github_username: ci-bot
    ci_github_password: secret
    ci_github_owner: myorg
    ci_github_repo: myapp
    ci_github_ref: "heads/{{ github_branch }}"
  roles:
    - role: levonet.ci_github_rm_branch
Run this in Jenkins:
ansible-playbook myplaybook.yml -e github_branch="${X_GH_BRANCH}"
License
Author Information
This task was created by Pavlo Bashynskyi
Installa
 ansible-galaxy install levonet.ci_github_rm_branchLicenza
 
            mit
          
Download
 
            17.6k
          
Proprietario
 