Skip to content
Snippets Groups Projects
Commit 867d89ac authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Merge branch 'ruby3-sync-pipeline' into 'ruby3-sync'

Add a new ruby3 branch synchronization pipeline schedule

See merge request gitlab-org/gitlab!94121
parents c9078c05 522b9bcc
No related branches found
No related tags found
No related merge requests found
stages:
- sync
- notify
default:
image:
name: alpine/git
entrypoint: ['']
variables:
GIT_DEPTH: "20"
# 'GIT_STRATEGY: clone' optimizes the pack-objects cache hit ratio
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "none"
GET_SOURCES_ATTEMPTS: "3"
.rules:
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- when: manual
allow_failure: true
gitlab:
stage: sync
extends: .rules
variables:
REPOSITORY: "https://dummy:${RUBY3_SYNC_TOKEN}@gitlab.com/gitlab-org/gitlab.git"
MERGE_FROM: "master"
MERGE_INTO: "ruby3"
USER_EMAIL: "project278964_bot10@noreply.gitlab.com"
USER_NAME: "project_278964_bot10"
environment:
name: ruby3-sync
before_script:
- git clone --filter=tree:0 "${REPOSITORY}" "${CI_JOB_NAME}"
- cd ${CI_JOB_NAME}
- git config user.email "${USER_EMAIL}"
- git config user.name "${USER_NAME}"
- git checkout "${MERGE_INTO}"
- git merge "origin/${MERGE_FROM}"
script:
- git push origin "${MERGE_INTO}"
notify:
stage: notify
image: curlimages/curl
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: on_failure
allow_failure: true
variables:
NOTIFY_CHANNEL: f_ruby3
script:
- echo "NOTIFY_CHANNEL is ${NOTIFY_CHANNEL}"
- echo "CI_PIPELINE_URL is ${CI_PIPELINE_URL}"
- scripts/slack ${NOTIFY_CHANNEL} "☠️ synchronization for ruby3 failed! ☠️ See ${CI_PIPELINE_URL}" "x" "ruby3-sync"
See https://gitlab.com/gitlab-org/gitlab/-/issues/340298#note_1041169793
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