diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 749778d1..2626b4ed 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -39,6 +39,7 @@ stages: -f kubernetes -v image_tag=$(Build.BuildId) -v hostname=docs-dev.steeltoe.io + -v doc_environment=Staging --output-files manifests/staging - task: ShellScript@2 displayName: Generate Production Manifest @@ -49,6 +50,7 @@ stages: -v image_tag=$(Build.BuildId) -v replica_count=2 -v hostname=docs.steeltoe.io + -v doc_environment=Production --output-files manifests/production - task: PublishPipelineArtifact@1 displayName: Publish Manifests diff --git a/docker/docker-entrypoint.d/70-documentation-site.sh b/docker/docker-entrypoint.d/70-documentation-site.sh index edb96702..d8d3ff47 100755 --- a/docker/docker-entrypoint.d/70-documentation-site.sh +++ b/docker/docker-entrypoint.d/70-documentation-site.sh @@ -30,7 +30,8 @@ else log "using $docenv configuration" docenv_file=$docenv_home/$docenv.env if [[ ! -f $docenv_file ]]; then - die "env file not found: $docenv_file" + log "env file not found: $docenv_file" + return fi source $docenv_file fi diff --git a/kubernetes/defaults.yaml b/kubernetes/defaults.yaml index 009ada7c..5e487112 100644 --- a/kubernetes/defaults.yaml +++ b/kubernetes/defaults.yaml @@ -10,5 +10,6 @@ container_memory: 128Mi container_cpu: 500m service_port: 80 replica_count: 1 +doc_environment: "" hostname: "" tls_secret: documentation-tls diff --git a/kubernetes/documentation.yaml b/kubernetes/documentation.yaml index 6f95e5ea..0e90d75c 100644 --- a/kubernetes/documentation.yaml +++ b/kubernetes/documentation.yaml @@ -23,6 +23,9 @@ spec: image: #@ "{}:{}".format(data.values.image_name, data.values.image_tag) ports: - containerPort: #@ int(data.values.container_port) + env: + - name: DOC_ENVIRONMENT + value: #@ data.values.doc_environment resources: limits: memory: #@ data.values.container_memory