Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
O
odoo-demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ndoumbe
odoo-demo
Commits
89cdc5c4
Commit
89cdc5c4
authored
Dec 23, 2024
by
Mame Bineta Diakite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Jenkinsfile
parent
a209095b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
Jenkinsfile
Jenkinsfile
+18
-7
No files found.
Jenkinsfile
View file @
89cdc5c4
...
@@ -5,29 +5,40 @@ pipeline {
...
@@ -5,29 +5,40 @@ pipeline {
DOCKER_IMAGE
=
"odoo-app"
DOCKER_IMAGE
=
"odoo-app"
DOCKER_REGISTRY
=
"registry.gitlab.com/binetaci/image-odoo"
DOCKER_REGISTRY
=
"registry.gitlab.com/binetaci/image-odoo"
CHART_PATH
=
"odoo-chart"
CHART_PATH
=
"odoo-chart"
KUBE_NAMESPACE
=
"
odoo
KUBE_NAMESPACE
=
"odoo
"
HELM_RELEASE
=
"odoo"
HELM_RELEASE
=
"odoo"
KUBE_CONTEXT
=
"minikube"
KUBE_CONTEXT
=
"minikube"
GIT_CREDENTIALS_ID
=
"gitlab-credentials-id"
// Jenkins ID pour GitLab
DOCKER_CREDENTIALS_ID
=
"docker-credentials-id"
// Jenkins ID pour Docker
}
}
stages
{
stages
{
stage
(
'Cloner le dépôt'
)
{
stage
(
'Cloner le dépôt'
)
{
steps
{
steps
{
checkout
scm
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
'*/main'
]],
// Remplace "main" par ta branche
userRemoteConfigs:
[[
url:
'https://gitlab.baamtu.com/diopbe/odoo-demo.git'
,
credentialsId:
"${GIT_CREDENTIALS_ID}"
]]
])
}
}
}
}
stage
(
'Construire l’image Docker'
)
{
stage
(
'Construire l’image Docker'
)
{
steps
{
steps
{
script
{
script
{
withCredentials
([
usernamePassword
(
credentialsId:
"${DOCKER_CREDENTIALS_ID}"
,
usernameVariable:
'DOCKER_USERNAME'
,
passwordVariable:
'DOCKER_PASSWORD'
)])
{
sh
"""
sh
"""
docker build -t ${DOCKER_REGISTRY}:${env.BUILD_NUMBER} .
docker build -t ${DOCKER_REGISTRY}:${env.BUILD_NUMBER} .
docker login ${DOCKER_REGISTRY} -u ${env.GITLAB_USERNAME} -p ${env.GITLAB_ACCESS_TOKEN
}
docker login ${DOCKER_REGISTRY} -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD
}
docker push ${DOCKER_REGISTRY}:${env.BUILD_NUMBER}
docker push ${DOCKER_REGISTRY}:${env.BUILD_NUMBER}
"""
"""
}
}
}
}
}
}
}
stage
(
'Déployer avec Helm'
)
{
stage
(
'Déployer avec Helm'
)
{
steps
{
steps
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment