Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture-devops-app
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
Service Desk
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
s80984
lecture-devops-app
Commits
c1dd1c78
Commit
c1dd1c78
authored
3 years ago
by
s80984
Browse files
Options
Downloads
Patches
Plain Diff
Update build pipeline
parent
9954dc46
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14127
failed
3 years ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+6
-12
6 additions, 12 deletions
.gitlab-ci.yml
docker-compose.yml
+3
-2
3 additions, 2 deletions
docker-compose.yml
with
9 additions
and
14 deletions
.gitlab-ci.yml
+
6
−
12
View file @
c1dd1c78
...
@@ -16,12 +16,6 @@ stages:
...
@@ -16,12 +16,6 @@ stages:
-
deploy
-
deploy
-
release
-
release
# .get-container-id: &get-container-id
# |
# # Getting Container ID
# CONTAINER_ID=$(basename $(cat /proc/1/cpuset))
# echo $CONTAINER_ID
job_build-image
:
job_build-image
:
stage
:
build
stage
:
build
tags
:
tags
:
...
@@ -34,17 +28,17 @@ job_build-image:
...
@@ -34,17 +28,17 @@ job_build-image:
-
docker info
-
docker info
-
docker-compose --version
-
docker-compose --version
script
:
script
:
-
docker-compose up -d --build
# - docker-compose up #--tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}" ps
# - docker-compose up #--tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}" ps
# - docker-compose build
-
docker-compose up -d --build
# --file "server/Containerfile"
-
docker build
# --tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}"
--file "server/Containerfile"
--tag "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}"
-
docker ps
-
docker ps
-
docker network list
-
docker network list
# # NOTE: push image to local registry so that it can be accessed in subsequent jobs
# # NOTE: push image to local registry so that it can be accessed in subsequent jobs
#
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
-
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
#
- docker push "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}"
-
docker push "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}"
after_script
:
after_script
:
-
docker-compose logs ||
true
-
docker-compose logs ||
true
-
docker-compose down ||
true
-
docker-compose down ||
true
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
3
−
2
View file @
c1dd1c78
version
:
'
3'
version
:
'
3'
services
:
services
:
mongo
:
mongo
:
container_name
:
mongo
container_name
:
mongo
db
image
:
mongo
image
:
mongo
ports
:
ports
:
-
'
27017:27017'
-
'
27017:27017'
volumes
:
volumes
:
-
mongodb:/.local/db/data/db
-
mongodb:/.local/db/data/db
app
:
app
:
container_name
:
docker-node-mongo
container_name
:
node-mongo-app
# image: .name:rc2
restart
:
always
restart
:
always
build
:
./app/server
build
:
./app/server
ports
:
ports
:
...
...
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