GithubHelp home page GithubHelp logo

isabella232 / ansible-gitlab-ci-variables Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adswizz/ansible-gitlab-ci-variables

0.0 0.0 0.0 9 KB

Ansible role to manage Gitlab CI variables

License: MIT License

ansible-gitlab-ci-variables's Introduction

gitlab-ci-variables

This role allows to manage Gitlab CI variables using Ansible.

The role can create or update variable value, and also track existing Gitlab CI variables that are not specified in the role configuration.

Build Status Ansible Galaxy

Requirements

Gitlab with v4 API (Gitlab 9.0+).

Installation

ansible-galaxy install peay.gitlab-ci-variables

Usage

Variables are documented in defaults/main.yml.

API URL and token can be specified via

# API token for Gitlab
gitlab_token: "XXXXXXXXXXXXXXXXXXXX"

# API URL for Gitlab
gitlab_api_url: https://some-url-to-gitlab.com/api/v4

Gitlab CI variables can be managed per project. The following example manages variables for two projects.

# Variables to manage for each Gitlab project
gitlab_ci_variables:
  - name: "group/project"
    kind: "project"
    variables:
      - key: VARIABLE_1
        value: value

  - name: "group/project2"
    kind: "project"
    variables:
      - key: VARIABLE_1
        value: value
      - key: VARIABLE_2
        value: value

  - name: "group"
    kind: "group"
    variables:
      - key: VARIABLE_3
        value: value
      - key: VARIABLE_4
        value: value

By default, the role will also check for Gitlab CI variables that are unknown (i.e., not specified in gitlab_ci_variables). This can be disabled using

# When enabled, check for unknown variables in Gitlab
# not managed by this role
gitlab_ci_check_unknown: false

This is purely a check. The role will not remove existing variables that are unknown.

ansible-gitlab-ci-variables's People

Contributors

peay avatar tchemineau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.