Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Automation2
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Giorgio Pizzati
Automation2
Commits
571a2662
Commit
571a2662
authored
2 years ago
by
Simone Pigazzini
Browse files
Options
Downloads
Patches
Plain Diff
Deploy ecal env
parents
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+18
-0
18 additions, 0 deletions
.gitignore
Jenkinsfile
+42
-0
42 additions, 0 deletions
Jenkinsfile
README.org
+13
-0
13 additions, 0 deletions
README.org
with
73 additions
and
0 deletions
.gitignore
0 → 100644
+
18
−
0
View file @
571a2662
# Editors temp files
*.swp
*~
*\#*
.\#*
# Other temp files
*.txt
*.log
*.png
*.pdf
*.dat
*.tmp
*.o
*.so
# Python cache
*__pycache__/*
This diff is collapsed.
Click to expand it.
Jenkinsfile
0 → 100644
+
42
−
0
View file @
571a2662
import
static
ectrl
.
vars
.
GlobalVars
.*
def
jobname
=
env
.
JOB_BASE_NAME
+
"-$text"
setenv
(
this
,
jobname
.
toLowerCase
())
pipeline
{
agent
{
label
'lxplus'
}
stages
{
stage
(
'Install ecalautoctrl'
)
{
steps
{
httpRequest
(
httpMode:
'POST'
,
contentType:
'APPLICATION_JSON'
,
requestBody:
"{\"attachments\": [{ \"color\" : \"#4287f5\", \"text\" : \"Deployment request for environment $text received\", \"pretext\" : \"$BUILD_URL\"}]}"
,
url:
"$response_url"
)
sh
"""
cd $ecal_cmssw
eval `scramv1 runtime -sh`
python3 -m pip install git+https://gitlab.cern.ch/cms-ecal-dpg/ECALELFS/automation-control.git -I
cp ~/.local/bin/ecal* bin/\$SCRAM_ARCH/
"""
}
}
}
post
{
success
{
httpRequest
(
httpMode:
'POST'
,
contentType:
'APPLICATION_JSON'
,
requestBody:
"{\"attachments\": [{ \"color\" : \"#1be800\", \"text\" : \"Environment $text deployed successfully\", \"pretext\" : \"$BUILD_URL\" }]}"
,
url:
"$response_url"
)
}
unsuccessful
{
httpRequest
(
httpMode:
'POST'
,
contentType:
'APPLICATION_JSON'
,
requestBody:
"{\"attachments\": [{ \"color\" : \"#cf0000\", \"text\" : \"Environment $text deploument failed\", \"pretext\" : \"$BUILD_URL\" }]}"
,
url:
"$response_url"
)
}
}
}
This diff is collapsed.
Click to expand it.
README.org
0 → 100644
+
13
−
0
View file @
571a2662
* Deploy ECAL environment on lxplus
** How to use this branch:
This branch should be setup in as a Jenkins jobs that is trigger via a generic webhook.
A Mattermost slash command (=ectrl-deploy=) can be then setup to trigger the deployment
of either the TEST or PROD environment.
The Mattermost slash command provides two parameters that are used by this job to
steer the deployment:
- =text=: this is the argument passed to the slash command and allow the user
to select between PROD and TEST. The =text= is appended to the job name in
order to use the function defined in the shared library (branch =ectrl-shared-lib=)
to set all the relevant global variables.
- =response_url=: this parameter is used by the job to send back notification to
Mattermost.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment