Commit d2beb364 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] gitlab-ci: Drop notify stage

gerrit voting and slack nightly reporting is now done
with a gitlab webhook instead of a CI stage.

Change-Id: I6498c41229cb3b6a9178d2a91dbbfbb657034cce
Resolves: #94035
Releases: master, 10.4, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68958

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 7953e777
......@@ -4,13 +4,6 @@ default:
# Any job taking longer than this is considered 'failed'
timeout: 30m
variables:
# When a branch derives from master or 10.4 or something, composer stumbles
# if the repo has been 'shallow cloned', can't determine the source branch
# and fails with package conflicts. Having a full clone by setting depth 0
# prevents this, so we don't need to fiddle with COMPOSER_ROOT_VERSION env var.
GIT_DEPTH: 0
cache:
# Default caching of .cache directory if a job does not override it.
# General rule: Keep them as small as possibles since that is less unpack work.
......@@ -48,8 +41,6 @@ stages:
- acceptance
- functional
- functional2
# Notify gerrit-adapter as last pipeline stage
- notify
include:
# Pre-merge tests are triggered by pushing to changes to gerrit.
......@@ -61,11 +52,9 @@ include:
- local: 'Build/gitlab-ci/pre-merge/integrity.yml'
- local: 'Build/gitlab-ci/pre-merge/functional.yml'
- local: 'Build/gitlab-ci/pre-merge/unit.yml'
- local: 'Build/gitlab-ci/pre-merge/notify.yml'
# Nightly tests are triggered by gitlab schedules
- local: 'Build/gitlab-ci/nightly/integrity.yml'
- local: 'Build/gitlab-ci/nightly/unit.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-install.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-backend.yml'
- local: 'Build/gitlab-ci/nightly/functional.yml'
- local: 'Build/gitlab-ci/nightly/notify.yml'
slack notification success:
stage: notify
only:
- schedules
when: on_success
dependencies: []
script: |
curl -X POST \
--header "cache-control: no-cache" \
--header "content-type: application/json" \
--data "{ \
\"branch\": \"$CI_COMMIT_REF_NAME\", \
\"pipeline\": \"$CI_PIPELINE_URL\", \
\"status\": \"success\" \
}" \
https://gerrit-adapter.core.b13.dev/gitlab-nightly
slack notification failed:
stage: notify
only:
- schedules
when: on_failure
dependencies: []
script: |
curl -X POST \
--header "cache-control: no-cache" \
--header "content-type: application/json" \
--data "{ \
\"branch\": \"$CI_COMMIT_REF_NAME\", \
\"pipeline\": \"$CI_PIPELINE_URL\", \
\"status\": \"failed\" \
}" \
https://gerrit-adapter.core.b13.dev/gitlab-nightly
gerrit vote positive:
stage: notify
except:
refs:
- schedules
- "9.5"
when: on_success
dependencies: []
script: |
# When branch is of form 'gerrit-12345-12', vote on gerrit
if [[ "$CI_COMMIT_REF_NAME" =~ ^gerrit\-[[:digit:]]+\-[[:digit:]]+$ ]]; then
CHANGE=`echo $CI_COMMIT_REF_NAME | cut -d '-' -f2`
PATCHSET=`echo $CI_COMMIT_REF_NAME | cut -d '-' -f3`
curl -X POST \
--header "cache-control: no-cache" \
--header "content-type: application/json" \
--data "{ \
\"change\": $CHANGE, \
\"patchset\": $PATCHSET, \
\"pipeline\": \"$CI_PIPELINE_URL\", \
\"status\": \"success\" \
}" \
https://gerrit-adapter.core.b13.dev/gitlab-patch
fi
gerrit vote negative:
stage: notify
except:
refs:
- schedules
- "9.5"
when: on_failure
dependencies: []
script: |
# When branch is of form 'gerrit-12345-12', vote on gerrit
if [[ "$CI_COMMIT_REF_NAME" =~ ^gerrit\-[[:digit:]]+\-[[:digit:]]+$ ]]; then
CHANGE=`echo $CI_COMMIT_REF_NAME | cut -d '-' -f2`
PATCHSET=`echo $CI_COMMIT_REF_NAME | cut -d '-' -f3`
curl -X POST \
--header "cache-control: no-cache" \
--header "content-type: application/json" \
--data "{ \
\"change\": $CHANGE, \
\"patchset\": $PATCHSET, \
\"pipeline\": \"$CI_PIPELINE_URL\", \
\"status\": \"failed\" \
}" \
https://gerrit-adapter.core.b13.dev/gitlab-patch
fi
......@@ -654,12 +654,15 @@ services:
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
environment:
COMPOSER_ROOT_VERSION: "9.5"
COMPOSER_CACHE_DIR: ".cache/composer"
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
COMPOSER_CACHE_DIR=".cache/composer" composer install --no-progress --no-interaction;
composer install --no-progress --no-interaction;
"
composer_install_max:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment