Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWK Project Effort Estimation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
oh14.dev
SWK Project Effort Estimation
Commits
35377652
Verified
Commit
35377652
authored
2 years ago
by
Jonas Zohren
Browse files
Options
Downloads
Patches
Plain Diff
Add oh14.dev CI/CD
parent
d514c543
Branches
master
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#145966
passed
2 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+54
-9
54 additions, 9 deletions
.gitlab-ci.yml
with
54 additions
and
9 deletions
.gitlab-ci.yml
+
54
−
9
View file @
35377652
include
:
-
template
:
Security/License-Scanning.gitlab-ci.yml
stages
:
-
"
build"
-
"
deploy"
build_docker_main
:
needs
:
[]
stage
:
"
build"
image
:
name
:
"
gcr.io/kaniko-project/executor:debug"
entrypoint
:
[
"
"
]
script
:
-
"
mkdir
-p
/kaniko/.docker"
-
'
echo
"{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}"
>
/kaniko/.docker/config.json'
-
"
/kaniko/executor
--context
$CI_PROJECT_DIR
--dockerfile
$CI_PROJECT_DIR/Dockerfile
--destination
$CI_REGISTRY_IMAGE:commit-$CI_COMMIT_SHORT_SHA
--destination
$CI_REGISTRY_IMAGE:latest"
rules
:
-
if
:
"
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH"
build_docker_branches
:
needs
:
[]
stage
:
"
build"
image
:
name
:
"
gcr.io/kaniko-project/executor:debug"
entrypoint
:
[
"
"
]
script
:
-
"
mkdir
-p
/kaniko/.docker"
-
'
echo
"{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}"
>
/kaniko/.docker/config.json'
-
"
/kaniko/executor
--context
$CI_PROJECT_DIR
--dockerfile
$CI_PROJECT_DIR/Dockerfile
--destination
$CI_REGISTRY_IMAGE:commit-$CI_COMMIT_SHORT_SHA
--destination
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-latest"
rules
:
-
if
:
"
$CI_COMMIT_BRANCH
!=
$CI_DEFAULT_BRANCH"
pages
:
needs
:
[]
im
age
:
node:14-alpine
st
age
:
deploy
st
age
:
"
deploy"
im
age
:
"
node:18-alpine"
script
:
-
npm install
-
npm run build
-
"
npm
install
"
-
"
npm
run
build
"
artifacts
:
paths
:
-
public
only
:
-
master
-
"
public"
rules
:
-
if
:
"
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH"
deploy_to_caprover
:
needs
:
-
"
build_docker_main"
stage
:
"
deploy"
image
:
name
:
"
caprover/cli-caprover:latest"
entrypoint
:
[
"
"
]
variables
:
# We don't need the files, just tell CapRover to use the built docker image:
GIT_STRATEGY
:
none
script
:
-
"
caprover
deploy
-h
https://captain.$CAPROVER_URL
-a
$CAPROVER_APP
--imageName
$CI_REGISTRY_IMAGE:commit-$CI_COMMIT_SHORT_SHA"
environment
:
name
:
"
production"
url
:
"
https://swk-project-effort-estimation.oh14.dev/"
rules
:
-
if
:
"
$CI_COMMIT_BRANCH
==
$CI_DEFAULT_BRANCH
&&
$CAPROVER_URL
&&
$CAPROVER_APP_TOKEN
&&
$CAPROVER_APP"
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