Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CaCaoCritics
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bilel El Yaagoubi
CaCaoCritics
Commits
6e2ca4d5
Commit
6e2ca4d5
authored
3 years ago
by
Bilel El Yaagoubi
Browse files
Options
Downloads
Patches
Plain Diff
configure CI
parent
760cdbfb
Branches
Branches containing commit
No related tags found
1 merge request
!2
Ocotbranche
Pipeline
#42232
failed
3 years ago
Stage: lint
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+56
-0
56 additions, 0 deletions
.gitlab-ci.yml
backend/package.json
+2
-1
2 additions, 1 deletion
backend/package.json
with
58 additions
and
1 deletion
.gitlab-ci.yml
0 → 100644
+
56
−
0
View file @
6e2ca4d5
stages
:
-
lint
-
build
.eslint
:
image
:
node:16.14.0-alpine
stage
:
lint
script
:
-
cd $CONTEXT
# install packages
-
npm install
# Run eslint
-
npm run lint
.build
:
stage
:
build
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_BRANCH
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
if [ $CI_COMMIT_BRANCH = $CI_DEFAULT_BRANCH ] ; then
-
TAG="latest" ; else
-
TAG=$CI_COMMIT_BRANCH ; fi
-
mkdir -p /kaniko/.docker
-
echo "{\"auths\":{\"${REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "robot\$${REGISTRY_USERNAME}" "${REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
-
>-
/kaniko/executor
--context $CONTEXT
--dockerfile $CONTEXT/Dockerfile
--destination "${REGISTRY}/$IMAGE_NAME:${TAG}"
--cache
lint-front
:
extends
:
.eslint
variables
:
CONTEXT
:
frontend/
lint-back
:
extends
:
.eslint
variables
:
CONTEXT
:
backend/
build-front
:
extends
:
.build
variables
:
CONTEXT
:
frontend/
IMAGE_NAME
:
front
build-back
:
extends
:
.build
variables
:
CONTEXT
:
backend/
IMAGE_NAME
:
back
This diff is collapsed.
Click to expand it.
backend/package.json
+
2
−
1
View file @
6e2ca4d5
...
...
@@ -5,7 +5,8 @@
"scripts"
:
{
"dev"
:
"dotenv nodemon ./server.js"
,
"start"
:
"dotenv node ./server.js"
,
"lint"
:
"eslint . --fix"
"lint"
:
"eslint . "
,
"format"
:
"eslint . --fix"
},
"dependencies"
:
{
"cors"
:
"^2.8.5"
,
...
...
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