Skip to content

Commit f78e981

Browse files
committed
load eefault envs for PR's
1 parent 6af1afc commit f78e981

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

server/src/kubero.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ export class Kubero {
705705
let appOptions:IApp = {
706706
name: websaveTitle,
707707
pipeline: pipelaneName,
708-
sleep: '600s', //TODO use config value
708+
sleep: 'disabled', //TODO use config value. This is BETA and should be disabled by default
709709
gitrepo: pipeline.git.repository,
710710
buildpack: pipeline.buildpack.name,
711711
deploymentstrategy: pipeline.deploymentstrategy,
@@ -715,7 +715,7 @@ export class Kubero {
715715
autodeploy: true,
716716
podsize: this.config.podSizeList[0], //TODO select from podsizelist
717717
autoscale: false,
718-
envVars: [], //TODO use custom env vars,
718+
envVars: pipeline.phases.find(p => p.name == phaseName)?.defaultEnvvars || [],
719719
extraVolumes: [], //TODO Not sure how to handlle extra Volumes on PR Apps
720720
serviceAccount: {
721721
annotations: {},
@@ -767,7 +767,7 @@ export class Kubero {
767767
enabled: true,
768768
hosts: [
769769
{
770-
host: websaveTitle+"."+pipeline.domain,
770+
host: websaveTitle+"."+pipeline.phases.find(p => p.name == phaseName)?.domain,
771771
paths: [
772772
{
773773
path: "/",

server/src/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ export interface IPipelinePhase {
243243
name: string;
244244
enabled: boolean;
245245
context: string;
246-
apps: IApp[];
246+
defaultEnvvars: {}[];
247+
domain: string;
248+
//apps: IApp[];
247249
}
248250

249251
// TODO replace with default kubeclt Interface

0 commit comments

Comments
 (0)