Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
geant-swd
dashboardv3
inventory-provider
Commits
5fd53714
Commit
5fd53714
authored
4 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
initial Jenkinsfile
parent
f8eb2568
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Jenkinsfile
+84
-0
84 additions, 0 deletions
Jenkinsfile
sonar.properties
+5
-0
5 additions, 0 deletions
sonar.properties
with
89 additions
and
0 deletions
Jenkinsfile
0 → 100644
+
84
−
0
View file @
5fd53714
// make sure the pip cache is accessible
def
container_args
=
"-v ${env.JENKINS_HOME}/.cache:/cache:rw,z -e XDG_CACHE_HOME=/cache"
pipeline
{
agent
none
stages
{
stage
(
'init'
)
{
agent
any
steps
{
script
{
def
matcher
=
env
.
GIT_URL
=~
/\/(.*)\.git/
if
(
matcher
.
find
())
{
gitProjectId
=
matcher
[
0
][
1
];
}
}
echo
gitProjectId
}
}
stage
(
'test'
)
{
parallel
{
stage
(
'test Python 3.6.8 (Centos 7)'
)
{
agent
{
docker
{
image
'python:3.6.8'
args
container_args
}
}
steps
{
run_unit_tests
(
'py36'
)
}
}
stage
(
'test Python 3.7.6'
)
{
agent
{
docker
{
image
'python:3.7.6'
args
container_args
}
}
steps
{
run_unit_tests
(
'py37'
)
}
}
stage
(
'test Python 3.8.3'
)
{
agent
{
docker
{
image
'python:3.8.3'
args
container_args
}
}
steps
{
run_unit_tests
(
'py38'
)
}
}
}
}
stage
(
'SonarQube analysis'
)
{
agent
any
steps
{
script
{
// must match 'Name' from Jenkins 'Global Tool Configuration'
scannerHome
=
tool
'sonar-scaner'
;
}
// must match 'Name' from Jenkins 'Configure System'
withSonarQubeEnv
(
'Project SonarQube'
)
{
sh
"${scannerHome}/bin/sonar-scanner -Dproject.settings=./sonar.properties"
}
}
}
}
}
void
run_unit_tests
(
tox_env
)
{
sh
'python -m venv venv'
sh
'venv/bin/pip install tox'
sh
"venv/bin/tox -e $tox_env"
}
This diff is collapsed.
Click to expand it.
sonar.properties
0 → 100644
+
5
−
0
View file @
5fd53714
sonar.projectKey
=
inventory-provider
sonar.projectName
=
Inventory Provider
sonar.projectVersion
=
0.x
sonar.sources
=
inventory_provider
sonar.python.coverage.reportPaths
=
coverage.xml
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