Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
eduroam
eduroam-configurator-build
Commits
74d73a02
Commit
74d73a02
authored
Sep 01, 2020
by
Jørn Åne de Jong
Browse files
Try re-importing hello-world so we get builds for branches
parent
98dfdf1e
Pipeline
#31782
failed with stages
in 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
74d73a02
image
:
registry.uninett.no/asm/kubernetes-deploy:v0.22
include
:
-
project
:
'
asm/gitlab-ci-helpers'
file
:
'
/gitlab-ci-helpers.yml'
variables
:
KUBE_PROD_DOMAIN
:
cat_eduroam_no.paas2.uninett.no
KUBE_TEST_ID
:
cat
HTTP_PORT
:
'
80'
# The port number of the web server.
REPLICAS
:
'
2
'
REPLICAS
:
'
1
'
stages
:
-
build
-
test
-
review
-
staging
-
production
build
:
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
extends
:
.docker-build
stage
:
build
script
:
-
build
only
:
-
branches
imagescan
:
extends
:
.imagescan
stage
:
test
only
:
-
branches
production
:
extends
:
.production
stage
:
production
variables
:
CI_ENVIRONMENT_URL
:
$KUBE_PROD_URL
REPLICAS
:
"
2"
script
:
-
deploy kubernetes.yaml
environment
:
name
:
production
url
:
$KUBE_PROD_URL
when
:
manual
only
:
-
master
-
deploy deployment.yaml
staging
:
extends
:
.staging
stage
:
staging
variables
:
CI_ENVIRONMENT_URL
:
$KUBE_STAGING_URL
REPLICAS
:
'
1'
script
:
-
deploy kubernetes.yaml
environment
:
name
:
staging
url
:
$KUBE_STAGING_URL
only
:
-
master
-
deploy deployment.yaml
review
:
extends
:
.review
stage
:
review
script
:
-
deploy deployment.yaml
stop_review
:
extends
:
.stop_review
stage
:
review
kubernetes.yaml
View file @
74d73a02
...
...
@@ -3,6 +3,9 @@ kind: Deployment
metadata
:
name
:
$CI_ENVIRONMENT_SLUG
namespace
:
$KUBE_NAMESPACE
annotations
:
app.gitlab.com/env
:
$CI_ENVIRONMENT_SLUG
app.gitlab.com/app
:
$CI_PROJECT_PATH_SLUG
labels
:
app
:
$CI_ENVIRONMENT_SLUG
pipeline_id
:
"
$CI_PIPELINE_ID"
...
...
@@ -14,6 +17,9 @@ spec:
app
:
$CI_ENVIRONMENT_SLUG
template
:
metadata
:
annotations
:
app.gitlab.com/env
:
$CI_ENVIRONMENT_SLUG
app.gitlab.com/app
:
$CI_PROJECT_PATH_SLUG
labels
:
name
:
$CI_ENVIRONMENT_SLUG
app
:
$CI_ENVIRONMENT_SLUG
...
...
@@ -21,12 +27,6 @@ spec:
containers
:
-
name
:
app
image
:
$CI_REGISTRY_IMAGE:$CI_REGISTRY_TAG
imagePullPolicy
:
Always
resources
:
limits
:
memory
:
500Mi
requests
:
memory
:
300Mi
ports
:
-
name
:
web
containerPort
:
$HTTP_PORT
...
...
@@ -42,3 +42,16 @@ spec:
port
:
$HTTP_PORT
initialDelaySeconds
:
5
timeoutSeconds
:
15
lifecycle
:
preStop
:
# Give ingress container time to stop sending requests to this container during shutdown.
exec
:
command
:
[
'
/bin/sleep'
,
'
15'
]
affinity
:
podAntiAffinity
:
preferredDuringSchedulingIgnoredDuringExecution
:
-
podAffinityTerm
:
labelSelector
:
matchLabels
:
name
:
$CI_ENVIRONMENT_SLUG
topologyKey
:
failure-domain.beta.kubernetes.io/zone
weight
:
10
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment