Skip to content

Commit

Permalink
debug-show-workflow gordo option (#193)
Browse files Browse the repository at this point in the history
* debug-show-workflow

* debug-show-workflow
  • Loading branch information
koropets authored Dec 28, 2020
1 parent b8a9428 commit f455541
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/crd/gordo/gordo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pub struct GordoSpec {
pub deploy_repository: Option<String>,
#[serde(rename = "docker-registry")]
pub docker_registry: Option<String>,
#[serde(rename = "debug-show-workflow")]
pub debug_show_workflow: Option<bool>,
pub config: GordoConfig,
}

Expand Down
5 changes: 5 additions & 0 deletions src/deploy_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ impl DeployJob {
let owner_references = Self::owner_references(&gordo);
let owner_ref_as_string = serde_json::to_string(&owner_references).unwrap();
let project_revision = chrono::Utc::now().timestamp_millis().to_string();
let mut debug_show_workflow = "";
if gordo.spec.debug_show_workflow.unwrap_or(false) {
debug_show_workflow = "true"
}

// Build up the gordo-deploy environment variables
let mut environment: Vec<EnvVar> = vec![
Expand All @@ -50,6 +54,7 @@ impl DeployJob {
Self::env_var("WORKFLOW_GENERATOR_PROJECT_VERSION", &project_revision),
Self::env_var("WORKFLOW_GENERATOR_DOCKER_REGISTRY", &env_config.docker_registry),
Self::env_var("WORKFLOW_GENERATOR_GORDO_VERSION", &gordo.spec.deploy_version),
Self::env_var("DEBUG_SHOW_WORKFLOW", debug_show_workflow),
];

// push in any that were supplied by the Gordo.spec.gordo_environment mapping
Expand Down

0 comments on commit f455541

Please sign in to comment.