Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106-2024-07
frontend
Commits
eb97d50f
Commit
eb97d50f
authored
1 year ago
by
Henrik
Browse files
Options
Downloads
Patches
Plain Diff
fix: fix 2
parent
b2eadf5e
No related branches found
No related tags found
1 merge request
!91
Feat/deployment
Pipeline
#283707
passed with warnings
1 year ago
Stage: docker_build_and_push
Stage: deploy_docker
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+1
-45
1 addition, 45 deletions
.gitlab-ci.yml
OLDgitlab-ci.yml
+84
-0
84 additions, 0 deletions
OLDgitlab-ci.yml
with
85 additions
and
45 deletions
.gitlab-ci.yml
+
1
−
45
View file @
eb97d50f
...
@@ -10,53 +10,9 @@ cache:
...
@@ -10,53 +10,9 @@ cache:
-
build/
-
build/
stages
:
stages
:
-
install
-
build
-
test
-
lint
-
docker_build_and_push
-
docker_build_and_push
-
deploy_docker
-
deploy_docker
install_dependencies
:
stage
:
install
script
:
-
npm ci
build_project
:
stage
:
build
script
:
-
npm ci
-
npm run build
dependencies
:
-
install_dependencies
vitest_unit-tests
:
stage
:
test
cache
:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
policy
:
pull
script
:
-
npm ci
-
npm run test:unit
dependencies
:
-
install_dependencies
eslint_run-lint
:
stage
:
lint
cache
:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
policy
:
pull
script
:
-
npm ci
-
npm run lint
dependencies
:
-
install_dependencies
allow_failure
:
true
docker_build_and_push
:
docker_build_and_push
:
stage
:
docker_build_and_push
stage
:
docker_build_and_push
image
:
docker:latest
image
:
docker:latest
...
@@ -80,5 +36,5 @@ deploy_docker:
...
@@ -80,5 +36,5 @@ deploy_docker:
-
apt-get -yqq install ssh
-
apt-get -yqq install ssh
-
apt-get install sshpass
-
apt-get install sshpass
script
:
script
:
-
sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker
ps -q --filter 'name=^frontend$' | grep -q . && docker
kill frontend && docker rm frontend
&&
docker run -d --name frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend"
-
sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker kill frontend && docker rm frontend
;
docker run -d --name frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend"
when
:
manual
when
:
manual
\ No newline at end of file
This diff is collapsed.
Click to expand it.
OLDgitlab-ci.yml
0 → 100644
+
84
−
0
View file @
eb97d50f
image
:
node:alpine
# Much smaller than other variants, faster and more resource effective
variables
:
DOCKER_TLS_CERTDIR
:
"
"
cache
:
key
:
"
${CI_COMMIT_REF_SLUG}"
# Branch-specific cache keys to have separate caches across branches.
paths
:
-
node_modules/
-
build/
stages
:
-
install
-
build
-
test
-
lint
-
docker_build_and_push
-
deploy_docker
install_dependencies
:
stage
:
install
script
:
-
npm ci
build_project
:
stage
:
build
script
:
-
npm ci
-
npm run build
dependencies
:
-
install_dependencies
vitest_unit-tests
:
stage
:
test
cache
:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
policy
:
pull
script
:
-
npm ci
-
npm run test:unit
dependencies
:
-
install_dependencies
eslint_run-lint
:
stage
:
lint
cache
:
key
:
${CI_COMMIT_REF_SLUG}
paths
:
-
node_modules/
policy
:
pull
script
:
-
npm ci
-
npm run lint
dependencies
:
-
install_dependencies
allow_failure
:
true
docker_build_and_push
:
stage
:
docker_build_and_push
image
:
docker:latest
services
:
-
docker:dind
tags
:
-
dind
script
:
-
docker login -u $DOCKER_USER -p $DOCKER_PAT registry.gitlab.com
-
docker build -t registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend .
-
docker push registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend
when
:
manual
deploy_docker
:
stage
:
deploy_docker
image
:
ubuntu:latest
dependencies
:
-
docker_build_and_push
before_script
:
-
apt-get -yq update
-
apt-get -yqq install ssh
-
apt-get install sshpass
script
:
-
sshpass -p sParest1en ssh -v -o StrictHostKeyChecking=no root@128.199.53.153 "docker ps -q --filter 'name=^frontend$' | grep -q . && docker kill frontend && docker rm frontend && docker run -d --name frontend registry.gitlab.com/$DOCKER_USER/sparesti-registry:frontend"
when
:
manual
\ No newline at end of file
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