Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WEB_ADMIN
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
3SPA
WEB_ADMIN
Commits
9e368321
Commit
9e368321
authored
1 month ago
by
MARTIN Pierre-Alexandre
Browse files
Options
Downloads
Patches
Plain Diff
Ajout d'une étape de build d'image docker à la pipeline
parent
2b1c4c9c
No related branches found
No related tags found
1 merge request
!3
Ajout d'une étape de build d'image docker à la pipeline
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+25
-2
25 additions, 2 deletions
.gitlab-ci.yml
with
25 additions
and
2 deletions
.gitlab-ci.yml
+
25
−
2
View file @
9e368321
...
...
@@ -4,6 +4,7 @@ image: node:22
stages
:
-
build
-
test
-
docker
cache
:
-
&global_cache_node_mods
...
...
@@ -34,7 +35,6 @@ install:
build
:
stage
:
build
script
:
-
npm ci
-
npm run build
artifacts
:
paths
:
...
...
@@ -59,6 +59,29 @@ lint:
stage
:
test
needs
:
-
job
:
build
artifacts
:
true
artifacts
:
true
script
:
-
npm run lint
build-image
:
stage
:
docker
rules
:
-
if
:
$CI_COMMIT_BRANCH == "main" ||
$CI_COMMIT_BRANCH == "dev"
image
:
name
:
gcr.io/kaniko-project/executor:v1.23.2-debug
entrypoint
:
[
"
"
]
script
:
-
|
if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then
TAG="latest"
else
TAG="dev"
fi
echo "Branch: $CI_COMMIT_BRANCH"
echo "Tag to be used: ${CI_REGISTRY_IMAGE}:$TAG"
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${TAG}"
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