Skip to content
Snippets Groups Projects
Commit 88e6ab58 authored by jurgenhaas's avatar jurgenhaas
Browse files

Implement new mode "gitlabflow" for collect config

parent 72d5eda3
No related branches found
No related tags found
No related merge requests found
---
# file: roles/drupal/tasks/config_collect/commit/gitlabflow.yml
- include_tasks: git.yml
tags:
- deploy
---
# file: roles/drupal/tasks/config_collect/finish/gitlabflow.yml
- block:
- name: Push changes
shell: git {{ item }}
args:
chdir: '{{ webRoot }}'
become: no
with_items:
- checkout develop
- merge cc-{{ version }}
- push -o ci.skip
when: git_status.stdout != ''
- name: Delete webroot working copy
file:
path: '{{ webRoot }}'
state: absent
- name: Create MR
uri:
url: '{{ gitlab_issue.url }}/api/v4/projects/{{ drupal.gitlabid }}/merge_requests'
headers:
Private-Token: '{{ gitlab_issue.token }}'
method: POST
status_code: 201
body_format: form-urlencoded
body:
source_branch: develop
target_branch: main
title: Merging develop into main
register: merge_request
- name: Pause
pause:
seconds: 5
- name: Merge
uri:
url: '{{ gitlab_issue.url }}/api/v4/projects/{{ drupal.gitlabid }}/merge_requests/{{ merge_request["json"]["iid"] }}/merge'
headers:
Private-Token: '{{ gitlab_issue.token }}'
method: PUT
status_code: 200
body_format: form-urlencoded
body:
should_remove_source_branch: 0
tags:
- deploy
---
# file: roles/drupal/tasks/config_collect/prepare/gitlabflow.yml
- block:
- include_tasks: git.yml
- name: Checkout working branch
shell: git checkout -b cc-{{ version }} HEAD
args:
chdir: '{{ webRoot }}'
become: no
tags:
- deploy
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment