Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ss22-devops-project-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
Dobromir Palushev
ss22-devops-project-app
Merge requests
!10
pipeline multiple updates
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
pipeline multiple updates
just-a-test
into
staging
Overview
0
Commits
16
Pipelines
0
Changes
1
Merged
Dobromir Palushev
requested to merge
just-a-test
into
staging
2 years ago
Overview
0
Commits
16
Pipelines
0
Changes
1
Expand
updated workflow rules
updated job names
updated container versions
added a template for gke-initialization
0
0
Merge request reports
Compare
staging
version 2
14688bc5
2 years ago
version 1
609ed3f4
2 years ago
staging (base)
and
latest version
latest version
60aef9c3
16 commits,
2 years ago
version 2
14688bc5
15 commits,
2 years ago
version 1
609ed3f4
14 commits,
2 years ago
1 file
+
28
−
15
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
28
−
15
Options
@@ -27,28 +27,41 @@ stages:
-
gcloud config set compute/zone ${GCP_COMPUTE_REGION}
-
gcloud container clusters get-credentials ${GCP_PROJECT_ID}-gke
test-image
:
run-tests
:
stage
:
test
tags
:
-
docker-privileged
image
:
docker:${DOCKER_VERSION}
services
:
-
name
:
docker:${DOCKER_VERSION}-dind
# - docker-privileged
-
docker
# image: docker:${DOCKER_VERSION}
image
:
node:16.17.0-alpine
# services:
# - name: docker:${DOCKER_VERSION}-dind
script
:
-
docker run -p 27017:27017 -d --name mongo-container --rm mongo:${MONGO_VERSION}
-
docker build
--tag "${CONTAINER_TAG}-test"
--target=test
"./app"
after_script
:
-
docker stop mongo-container
-
docker images -a | grep "mongo" | awk '{print $3}' | xargs docker rmi --force
-
docker image rm --force "${CONTAINER_TAG}-test"
# - docker run -p 27017:27017 -d --name mongo-container --rm mongo:${MONGO_VERSION}
# - docker build
# --tag "${CONTAINER_TAG}-test"
# --target=test
# "./app"
-
echo ‘http://dl-cdn.alpinelinux.org/alpine/v3.6/main’ >> /etc/apk/repositories
-
echo ‘http://dl-cdn.alpinelinux.org/alpine/v3.6/community’ >> /etc/apk/repositories
-
apk add mongodb mongodb-tools
-
mongod --config "./app/server/dev.mongo.conf"
-
cd "./app/client"
-
npm ci --no-audit --no-fund
-
npm run test
-
cd "../server"
-
npm ci --no-audit --no-fund
-
MONGODB_URL=mongodb://localhost:27017/todo-app JWT_SECRET=a-big-secret npm run test
-
jest --ci
# after_script:
# - docker stop mongo-container
# - docker images -a | grep "mongo" | awk '{print $3}' | xargs docker rmi --force
# - docker image rm --force "${CONTAINER_TAG}-test"
build-image
:
stage
:
build
needs
:
-
'
test-image
'
-
'
run-tests
'
tags
:
-
docker-privileged
image
:
docker:${DOCKER_VERSION}
Loading