Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DLCM-Portal
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
Container Registry
Model registry
Operate
Environments
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
DLCM
UI
DLCM-Portal
Commits
b1c562d7
Commit
b1c562d7
authored
5 years ago
by
Homada.Boumedane
Browse files
Options
Downloads
Patches
Plain Diff
chore(dlcm-portal): jenkinsfile
refactor jenkinsfile
parent
bb8bde09
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
+14
-111
14 additions, 111 deletions
Jenkinsfile
src/environments/environment.ts
+0
-1
0 additions, 1 deletion
src/environments/environment.ts
with
14 additions
and
112 deletions
Jenkinsfile
+
14
−
111
View file @
b1c562d7
#
!
/usr/
bin
/
env
groovy
properties
([
parameters
([
pipeline
{
booleanParam
(
name:
'RELEASE'
,
description:
'Build a release from current commit.'
,
defaultValue:
false
),
string
(
name:
'RELEASE_VERSION'
,
defaultValue:
'1.0.0'
,
description:
'RELEASE Version'
),
agent
any
string
(
name:
'SNAPSHOT_VERSION'
,
defaultValue:
'1.4.0-SNAPSHOT'
,
description:
'SNAPSHOT Version'
),
string
(
name:
'TAG_NAME'
,
defaultValue:
'dlcm-1.4.0'
,
description:
'TAG Name'
),
options
{
])
timestamps
()
])
buildDiscarder
(
logRotator
(
numToKeepStr:
'5'
))
disableConcurrentBuilds
()
@Library
(
'solidify-pipelinelibrary@master'
)
_
}
angularWithMavenTemplate
{
masterBranchName
=
'master'
tools
{
skipTests
=
false
maven
'Maven 3.3.9'
skipCodeInspection
=
true
}
environment
{
CHROME_BIN
=
'/usr/bin/chromium'
}
parameters
{
booleanParam
(
name:
'RELEASE'
,
description:
'Build a release from current commit.'
,
defaultValue:
false
)
string
(
name:
'RELEASE_VERSION'
,
defaultValue:
'1.0.0'
,
description:
'RELEASE Version'
)
string
(
name:
'SNAPSHOT_VERSION'
,
defaultValue:
'1.4.0-SNAPSHOT'
,
description:
'SNAPSHOT Version'
)
string
(
name:
'TAG_NAME'
,
defaultValue:
'dlcm-1.4.0'
,
description:
'TAG Name'
)
}
triggers
{
cron
(
'@midnight'
)
}
stages
{
stage
(
'Checkout'
){
steps
{
checkout
([
$class
:
'GitSCM'
,
branches:
scm
.
branches
,
doGenerateSubmoduleConfigurations:
false
,
extensions:
[[
$class
:
'LocalBranch'
,
localBranch:
'master'
]],
submoduleCfg:
[],
userRemoteConfigs:
[[
credentialsId:
'GitLabRelease'
,
url:
'git@gitlab.unige.ch:dlcm/ui/dlcm-portal.git'
]]
])
}
}
stage
(
'Install node_modules'
){
steps
{
sh
'npm install --verbose -d'
}
}
stage
(
'Unit tests'
){
steps
{
sh
'ng test --watch=false --no-progress --browsers=ChromeNoSandboxHeadless'
}
}
stage
(
'Code quality'
){
steps
{
sh
'ng lint --format=checkstyle > checkstyle-result.xml'
}
}
stage
(
'Build & Deploying SNAPSHOT'
){
environment
{
WEB_CONTEXT_ROOT
=
'portal'
}
steps
{
withMaven
(
maven:
'Maven 3.3.9'
,
mavenSettingsConfig:
'829b97c1-b457-48ad-a48b-f8140b5a5821'
){
sh
"mvn clean deploy -Dweb.context.root=${WEB_CONTEXT_ROOT}"
}
}
}
stage
(
"Release"
)
{
when
{
allOf
{
branch
'master'
expression
{
params
.
RELEASE
}
}
}
steps
{
echo
"Tag name is ${params.TAG_NAME}"
echo
"Release version is ${params.RELEASE_VERSION}"
echo
"Snapshot version is ${params.SNAPSHOT_VERSION}"
withMaven
(
maven:
'Maven 3.3.9'
,
mavenSettingsConfig:
'829b97c1-b457-48ad-a48b-f8140b5a5821'
){
sshagent
(
credentials:
[
'GitLabRelease'
])
{
sh
"mvn -B release:clean release:prepare release:perform -Dtag=${params.TAG_NAME} -DreleaseVersion=${params.RELEASE_VERSION} -DdevelopmentVersion=${params.SNAPSHOT_VERSION}"
}
}
}
}
}
post
{
always
{
recordIssues
tool:
tsLint
(
pattern:
'checkstyle-result.xml'
),
enabledForFailure:
true
}
failure
{
mail
to:
'homada.boumedane@unige.ch, hugues.cazeaux@unige.ch, florent.poittevin@unige.ch'
,
subject:
"Angular Fontend Build: ${env.JOB_NAME} - Failed"
,
body:
"Job Failed - \"${env.JOB_NAME}\" build: ${env.BUILD_NUMBER}\n\nView the log at:\n ${env.BUILD_URL}\n\nBlue Ocean:\n${env.RUN_DISPLAY_URL}"
}
cleanup
{
echo
'...Cleaning up workspace'
cleanWs
()
}
}
}
}
This diff is collapsed.
Click to expand it.
src/environments/environment.ts
+
0
−
1
View file @
b1c562d7
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
// The list of file replacements can be found in `angular.json`.
// The list of file replacements can be found in `angular.json`.
import
{
InjectionToken
}
from
"
@angular/core
"
;
import
{
ThemeEnum
}
from
"
@app/shared/enums/theme.enum
"
;
import
{
ThemeEnum
}
from
"
@app/shared/enums/theme.enum
"
;
import
{
defaultEnvironment
}
from
"
./environment.defaults
"
;
import
{
defaultEnvironment
}
from
"
./environment.defaults
"
;
import
{
environmentLocal
}
from
"
./environment.local
"
;
import
{
environmentLocal
}
from
"
./environment.local
"
;
...
...
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