Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hep-workloads
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HEP-Benchmarks
hep-workloads
Merge requests
!175
Fix message on new release (
BMK-143
)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix message on new release (
BMK-143
)
valassi/hep-workloads:BMK-143
into
qa
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Andrea Valassi
requested to merge
valassi/hep-workloads:BMK-143
into
qa
6 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
BMK-143
0
0
Merge request reports
Compare
qa
qa (base)
and
latest version
latest version
590348b0
1 commit,
6 years ago
1 file
+
24
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
build-executor/main.sh
+
24
−
15
Options
@@ -28,6 +28,7 @@ function execute_command(){
# Load the spec file and validate it against common naming conventions (BMK-135)
# Input $1: path to the HEPWL spec file
# [Eventually this could use readonly bash variables and check if any HEPWL_ variables are already defined?]
function
load_and_validate_specfile
(){
if
[
"
$1
"
==
""
]
||
[
"
$2
"
!=
""
]
;
then
@@ -418,7 +419,10 @@ function publish_standalone_image(){
# Announce the standalone HEP workload image with a local /cvmfs (BMK-80)
# (send an email from ${CI_MAIL_FROM} to ${CI_ANNOUNCE_TO} announcing a new image created in ${CI_JOB_URL})
# Input $1: docker image, including registry prefix (registry/image_name:image_tag)
# Input environment variable ${HEPWL_DOCKERIMAGENAME}: image name for the HEP workload
# Input environment variable ${HEPWL_DOCKERIMAGETAG}: image tag for the standalone HEP workload
# Input environment variable ${CIENV_DOCKERREGISTRY}: registry where the image should be pushed
# Input environment variable ${CI_BUILD_TOKEN}: authentication token for the gitlab registry
# Input environment variables ${CI_MAIL_FROM}, ${CI_ANNOUNCE_TO} and ${CI_JOB_URL}
# Input environment variable ${HEPWL_BMKANNOUNCE}: if exists and "false", do not announce the release
function
announce_standalone_image
(){
@@ -427,21 +431,26 @@ function announce_standalone_image(){
echo
"[announce_standalone_image] current directory is
$(
pwd
)
"
echo
"[announce_standalone_image] send mail from CI_MAIL_FROM='
${
CI_MAIL_FROM
}
'"
echo
"[announce_standalone_image] send mail to CI_ANNOUNCE_TO='
${
CI_ANNOUNCE_TO
}
'"
if
[
"
${
HEPWL_BMKANNOUNCE
}
"
==
"false"
]
;
then
echo
"[announce_standalone_image] WARNING! no mail sent, HEPWL_BMKANNOUNCE is '
${
HEPWL_BMKANNOUNCE
}
'"
elif
[
"
${
CI_MAIL_FROM
}
"
==
""
]
||
[
"
${
CI_ANNOUNCE_TO
}
"
==
""
]
;
then
echo
"[announce_standalone_image] WARNING! no mail sent, invalid CI_MAIL_FROM or CI_ANNOUNCE_TO"
if
[
"
${
CIENV_DOCKERREGISTRY
}
"
==
""
]
;
then
echo
"[annnounce_standalone_image] WARNING: empty CIENV_DOCKERREGISTRY, nothing to do"
else
theimage
=
$1
postfix start
announcement
=
"announce.txt"
echo
-e
"Dear HEP Benchmark developers,
\n
"
>
$announcement
echo
-e
"we are pleased to inform that a new version has been released for the container image
\n\n
${
theimage
}
"
>>
$announcement
echo
-e
"
\n
Please DO NOT REPLY
\n
Report automatically generated from GitLab CI in job
${
CI_JOB_URL
}
\n
[
$(
date
)
]"
>>
$announcement
echo
-e
"
\n
Yours sincerely,
\n
HEPiX Benchmarking Working Group
\n\n
"
>>
$announcement
cat
$announcement
cat
$announcement
| mail
-r
${
CI_MAIL_FROM
}
-s
"New Docker container available
$theimage
"
${
CI_ANNOUNCE_TO
}
sleep
100s
# keep the container alive, otherwise no email is sent (emails are sent only once per minute, see BMK-80)
theimage
=
"
${
CIENV_DOCKERREGISTRY
}
/
${
HEPWL_DOCKERIMAGENAME
}
:
${
HEPWL_DOCKERIMAGETAG
}
"
echo
"[announce_standalone_image] theimage:
$theimage
"
if
[
"
${
HEPWL_BMKANNOUNCE
}
"
==
"false"
]
;
then
echo
"[announce_standalone_image] WARNING! no mail sent, HEPWL_BMKANNOUNCE is '
${
HEPWL_BMKANNOUNCE
}
'"
elif
[
"
${
CI_MAIL_FROM
}
"
==
""
]
||
[
"
${
CI_ANNOUNCE_TO
}
"
==
""
]
;
then
echo
"[announce_standalone_image] WARNING! no mail sent, invalid CI_MAIL_FROM or CI_ANNOUNCE_TO"
else
postfix start
announcement
=
"announce.txt"
echo
-e
"Dear HEP Benchmark developers,
\n
"
>
$announcement
echo
-e
"we are pleased to inform that a new version has been released for the container image
\n\n
${
theimage
}
"
>>
$announcement
echo
-e
"
\n
Please DO NOT REPLY
\n
Report automatically generated from GitLab CI in job
${
CI_JOB_URL
}
\n
[
$(
date
)
]"
>>
$announcement
echo
-e
"
\n
Yours sincerely,
\n
HEPiX Benchmarking Working Group
\n\n
"
>>
$announcement
cat
$announcement
cat
$announcement
| mail
-r
${
CI_MAIL_FROM
}
-s
"New Docker container available
$theimage
"
${
CI_ANNOUNCE_TO
}
sleep
100s
# keep the container alive, otherwise no email is sent (emails are sent only once per minute, see BMK-80)
fi
fi
echo
"[announce_standalone_image] finished at
$(
date
)
"
return
0
Loading