I'm trying to automate deployments using Concourse-CI.
I have a go application that is checked into a local Gitlab with two branches (master and develop).
I have a pipeline setup for the develop branch that runs go unit tests and if they pass i want to automatically merge the changes from the develop branch to the master branch and tag it with the latest version.
Here is what I have so far:
jobs:
- name: run-unit-tests
public: true
plan:
- get: source-master
- get: source
trigger: true
- put: discord
params:
channel: "((channel_id))"
color: 6076508
title: Concourse CI
message: |
Starting Unit tests for manageGameData
- task: task-unit-tests
file: source/ci/tasks/task-unit-tests.yml
on_success:
do:
- put: discord
params:
channel: "((channel_id))"
color: 6076508
title: Concourse CI
message: |
All Unit tests passed for manageGameData
- put: version
params:
bump: minor
- get: version
- put: source-master
params:
merge: source
repository: source-master
tag: version/number
The problem is that this only tags the master branch with the new version.
Is there a way to merge the develop branch to master?
I guess i didn't understand the documentation at first but the answer was pretty easy.
First you have to get both branches in this case master and develop. Then you push the source local repo (a folder on the concourse worker) to master by using put.
There is no need for the merge parameter and i had the wrong repository parameter.
Hope this helps someone else.