Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitlab CI/CD settings configuration. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ gitlab_privaterunner_image: alpine:latest
gitlab_privaterunner_network_mode: bridge # or host
gitlab_ci_mode: "overwrite" # or insert
gitlab_use_chainedci: false
gitlab_ci_variables: []
purge_gitlab_ci_variables: false

# s3
publish_to_s3: true
Expand Down
6 changes: 6 additions & 0 deletions tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@
when:
- gitlab_deploy or gitlab_configure
- ansible_python.version.major==3
- name: Installing python-gitlab via pip
become: "{{ not lookup('env','VIRTUAL_ENV') }}"
pip:
name: python-gitlab
when:
- gitlab_deploy or gitlab_configure
- name: Installing git
become: true
apt:
Expand Down
9 changes: 9 additions & 0 deletions tasks/gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -525,3 +525,12 @@
when:
- gitlab_configure
- gitlab_create_jobs
- name: Set or update CI/CD variables
community.general.gitlab_project_variable:
api_url: '{{ gitlab_url }}'
api_oauth_token: '{{ oauth.json.access_token }}'
project: 'xtesting/{{ project }}'
purge: '{{ purge_gitlab_ci_variables }}'
variables: '{{ gitlab_ci_variables }}'
when:
- gitlab_configure
6 changes: 6 additions & 0 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@
when:
- gitlab_deploy or gitlab_configure
- ansible_python.version.major==3
- name: Installing python-gitlab via pip
become: "{{ not lookup('env','VIRTUAL_ENV') }}"
pip:
name: python-gitlab
when:
- gitlab_deploy or gitlab_configure
- name: Installing git
become: true
yum:
Expand Down