Commit 016544ba authored by Adelina Eleonora Lintuluoto's avatar Adelina Eleonora Lintuluoto
Browse files

Remove on_success on_failure

parent b26f0eeb
......@@ -104,32 +104,4 @@ build_standalone_pipeline:
REPO_NAME: standalone
BASE_IMAGE: "$CI_REGISTRY_IMAGE/$OS-cms:latest"
# Necessary variables to be passed to Dockerfile for building a standalone image is CMSSW_VERSION=$RELEASE,
# SCRAM_ARCH=$SCRAM_ARCH and BASEIMAGE="gitlab-registry.cern.ch/cms-cloud/cmssw-docker/$OS-cms:latest"
# On success of standalone build remove labels and close corresponding Gitlab issue
# If email provided send an email notification
standalone_build_success:
stage: clean_up
only:
variables:
- $RELEASE && $SCRAM_ARCH && $OS && $ISSUE_IID
refs:
- master
when: on_success
script:
- "curl -X PUT -H PRIVATE-TOKEN:${GITLAB_TOKEN} https://gitlab.cern.ch/api/v4/projects/${BACKEND_IID}/issues/${ISSUE_IID}?state_event=close&labels=" # close and remove labels
- source standalone_image_path.env
- if ! [[ -z $EMAIL ]]; then curl -X POST -H Content-Type:application/json -H X-Gitlab-Token:${API_TOKEN} -d '{"recipient_email":"'"${EMAIL}"'","image_path":"'"${IMAGE_PATH}"'"}' ${BACKEND_URL}/email; fi # send email notification
# On failure change label of corresponding Gitlab issue and comment on issue
standalone_build_failure:
stage: clean_up
only:
variables:
- $RELEASE && $SCRAM_ARCH && $OS && $ISSUE_IID
refs:
- master
when: on_failure
script:
- "curl -X PUT -H PRIVATE-TOKEN:${GITLAB_TOKEN} https://gitlab.cern.ch/api/v4/projects/${BACKEND_IID}/issues/${ISSUE_IID}?labels=Pipeline%20failed" # change label
- "curl -X POST -H PRIVATE-TOKEN:${GITLAB_TOKEN} https://gitlab.cern.ch/api/v4/projects/${BACKEND_IID}/issues/${ISSUE_IID}/notes?body=The%20pipeline%20of%20this%20request%20just%20failed" # comment on issue
\ No newline at end of file
# SCRAM_ARCH=$SCRAM_ARCH and BASEIMAGE="gitlab-registry.cern.ch/cms-cloud/cmssw-docker/$OS-cms:latest"
\ No newline at end of file
Supports Markdown
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