Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leap_se
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
leap
leap_se
Commits
197ad25e
Commit
197ad25e
authored
5 years ago
by
micah
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml
Cleanup review app things that do not exist anymore
parent
70d38c30
No related branches found
No related tags found
No related merge requests found
Pipeline
#35075
passed
5 years ago
Stage: production
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+0
-64
0 additions, 64 deletions
.gitlab-ci.yml
with
0 additions
and
64 deletions
.gitlab-ci.yml
+
0
−
64
View file @
197ad25e
---
variables
:
OPENSHIFT_SERVER
:
hexacab.org:8443
OPENSHIFT_DOMAIN
:
apps.hexacab.org
PROJECT_NAME
:
leapse
# Configure this variable in Secure Variables:
# OPENSHIFT_TOKEN: my.openshift.token
stages
:
-
review
-
production
-
cleanup
.deploy
:
&deploy
image
:
ayufan/openshift-cli
before_script
:
-
oc login "${OPENSHIFT_SERVER}" --token="${OPENSHIFT_TOKEN}"
-
oc project "${PROJECT_NAME}-${CI_PROJECT_ID}" 2> /dev/null || oc new-project "${PROJECT_NAME}-${CI_PROJECT_ID}"
script
:
-
"
oc
get
services
${APP}
2>
/dev/null
||
oc
new-app
${CI_REPOSITORY_URL}#${CI_COMMIT_REF_NAME}
--name=${APP}
--strategy=docker
&&
sleep
3
&&
oc
logs
-f
bc/${APP}"
-
"
oc
status
-v"
-
"
oc
expose
dc
${APP}
--port=8080
&&
oc
expose
service
${APP}
--port=8080
--hostname=${PROJECT_NAME}-${CI_ENVIRONMENT_SLUG}.${OPENSHIFT_DOMAIN}"
review
:
<<
:
*deploy
stage
:
review
variables
:
APP
:
review-$CI_COMMIT_REF_NAME
APP_HOST
:
$PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
environment
:
name
:
review/$CI_COMMIT_REF_NAME
url
:
http://$PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
on_stop
:
stop-review
only
:
-
branches@leap/leap_se
-
branches@varac/leap_se
-
branches@kwadronaut/leap_se
-
branches@micah/leap_se
-
branches@elijah/leap_se
-
branches@meskio/leap_se
-
branches@drebs/leap_se
except
:
-
master
stop-review
:
<<
:
*deploy
stage
:
cleanup
script
:
-
oc delete all -l "app=$APP"
when
:
manual
variables
:
APP
:
review-$CI_COMMIT_REF_NAME
GIT_STRATEGY
:
none
environment
:
name
:
review/$CI_COMMIT_REF_NAME
action
:
stop
only
:
-
branches@leap/leap_se
-
branches@kwadronaut/leap_se
-
branches@varac/leap_se
-
branches@micah/leap_se
-
branches@elijah/leap_se
-
branches@meskio/leap_se
-
branches@drebs/leap_se
except
:
-
master
production
:
image
:
0xacab.org:4567/leap/docker/ruby:stretch_amd64
...
...
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