Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 531f06c5 authored by Alexandre Roux's avatar Alexandre Roux
Browse files

automerge children branch

parent 6be90454
Loading
Loading
Loading
Loading
+30 −10
Original line number Diff line number Diff line
@@ -5,13 +5,9 @@
variables:
  CI_PROJECT_SSH_URL: git@gitlab.e.foundation:$CI_PROJECT_PATH

.update-from-upstream:
  image: registry.gitlab.e.foundation/e/tools/docker-tools:latest
  stage: update-from-upstream
  rules:
    - if: '$CI_PIPELINE_SOURCE =~ /schedule/ && $CI_COMMIT_REF_NAME == $LOCAL_BRANCH'
  variables:
    GIT_STRATEGY: none
stages:
  - merge-to-main

before_script:
  - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
  - eval $(ssh-agent -s)
@@ -23,6 +19,30 @@ variables:
  - chmod 644 ~/.ssh/known_hosts
  - git config --global user.email $GITLAB_USER_EMAIL
  - git config --global user.name "$GITLAB_USER_NAME"

.merge-to-main:
  image: registry.gitlab.e.foundation/e/tools/docker-tools:latest
  stage: merge-to-main
  rules:
    - if: '$CI_PIPELINE_SOURCE =~ /schedule/ && $CI_COMMIT_REF_NAME == v1.*-$VERSION'
  before_script:
    - cd $CI_BUILD_DIR
    - rm -rf $CI_PROJECT_DIR
    - git clone $CI_PROJECT_SSH_URL $CI_PROJECT_DIR
  script:
    - git fetch origin
    - git checkout v1-$VERSION
    - git merge $CI_COMMIT_REF_NAME
    - git push
    
.update-from-upstream:
  image: registry.gitlab.e.foundation/e/tools/docker-tools:latest
  stage: update-from-upstream
  rules:
    - if: '$CI_PIPELINE_SOURCE =~ /schedule/ && $CI_COMMIT_REF_NAME == $LOCAL_BRANCH'
  variables:
    GIT_STRATEGY: none
  before_script:
    - cd $CI_BUILD_DIR
    - rm -rf $CI_PROJECT_DIR
    - git clone $CI_PROJECT_SSH_URL $CI_PROJECT_DIR