Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
advDaba_labo2
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lucas.landrecy
advDaba_labo2
Commits
c3fe0921
Commit
c3fe0921
authored
1 month ago
by
lucas.landrecy
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
baa0ee36
No related branches found
No related tags found
No related merge requests found
Pipeline
#40541
failed
1 month ago
Stage: build
Stage: push
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+22
-3
22 additions, 3 deletions
.gitlab-ci.yml
with
22 additions
and
3 deletions
.gitlab-ci.yml
+
22
−
3
View file @
c3fe0921
stages
:
stages
:
-
build
-
build
-
push
-
push
-
deploy
variables
:
variables
:
CLIENT_IMAGE
:
$DOCKER_REGISTRY/$DOCKER_REPO_NAMESPACE/client:$CI_COMMIT_SHORT_SHA
DOCKER_DRIVER
:
overlay2
NEO4J_IMAGE
:
$DOCKER_REGISTRY/$DOCKER_REPO_NAMESPACE/neo4j:$CI_COMMIT_SHORT_SHA
CLIENT_IMAGE
:
$CI_REGISTRY_IMAGE/client:$CI_COMMIT_SHORT_SHA
NEO4J_IMAGE
:
$CI_REGISTRY_IMAGE/neo4j:$CI_COMMIT_SHORT_SHA
.default-docker-job
:
.default-docker-job
:
image
:
docker:24.0
image
:
docker:24.0
services
:
services
:
-
docker:24.0-dind
-
docker:24.0-dind
before_script
:
before_script
:
-
docker login -u "$
DOCKER
_USER" -p "$
DOCKER
_PASSWORD" $
DOCKER
_REGISTRY
-
docker login -u "$
CI_REGISTRY
_USER" -p "$
CI_REGISTRY
_PASSWORD" $
CI
_REGISTRY
# Build both images
build_client
:
build_client
:
extends
:
.default-docker-job
extends
:
.default-docker-job
stage
:
build
stage
:
build
...
@@ -25,6 +28,7 @@ build_neo4j:
...
@@ -25,6 +28,7 @@ build_neo4j:
script
:
script
:
-
docker build -t $NEO4J_IMAGE ./neo4j
-
docker build -t $NEO4J_IMAGE ./neo4j
# Push both images
push_client
:
push_client
:
extends
:
.default-docker-job
extends
:
.default-docker-job
stage
:
push
stage
:
push
...
@@ -38,3 +42,18 @@ push_neo4j:
...
@@ -38,3 +42,18 @@ push_neo4j:
script
:
script
:
-
docker push $NEO4J_IMAGE
-
docker push $NEO4J_IMAGE
needs
:
[
build_neo4j
]
needs
:
[
build_neo4j
]
# Optional deployment (e.g., via kubectl or Helm)
# deploy:
# stage: deploy
# image:
# name: bitnami/kubectl:latest
# entrypoint: [""]
# script:
# - echo "$KUBECONFIG" > kubeconfig.yaml
# - export KUBECONFIG=$CI_PROJECT_DIR/kubeconfig.yaml
# - kubectl set image deployment/client client-container=$CLIENT_IMAGE --namespace=mon-namespace
# - kubectl set image deployment/neo4j neo4j-container=$NEO4J_IMAGE --namespace=mon-namespace
# only:
# - main
# needs: [push_client, push_neo4j]
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