Skip to content

Commit

Permalink
Make Job return pulumi exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-br committed Mar 3, 2024
1 parent d06eff2 commit 808cc85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions pulumi-operator-kubernetes-job/src/pulumi_execution.rs
Expand Up @@ -20,6 +20,7 @@ use springtime_di::instance_provider::ErrorPtr;
use springtime_di::{component_alias, Component};
use std::env::VarError;
use std::fs::read_to_string;
use std::process::exit;
use std::sync::Arc;
use thiserror::Error;
use tokio::process::Command;
Expand Down Expand Up @@ -175,9 +176,7 @@ impl PulumiExecution {
})
.await;

dbg!(exit);

Ok(())
std::process::exit(exit.code().unwrap_or(0));
}

pub async fn get_stack(&self) -> Result<PulumiStack, PulumiExecutionError> {
Expand Down
4 changes: 2 additions & 2 deletions pulumi-operator-kubernetes/src/stack/service.rs
Expand Up @@ -59,7 +59,7 @@ impl KubernetesPulumiStackService {

let mut main_container: Container = serde_json::from_value(json!({
"name": "pulumi",
"image": "ghcr.io/stromee/pulumi-operator/pulumi-operator-kubernetes-job:1.0.29",
"image": "ghcr.io/stromee/pulumi-operator/pulumi-operator-kubernetes-job:1.0.30",
"env": [{
"name": "PULUMI_STACK",
"value": name
Expand Down Expand Up @@ -113,6 +113,7 @@ impl KubernetesPulumiStackService {
"jobTemplate": {
"spec": {
"activeDeadlineSeconds": 300,
"backoffLimit": 10000,
"template": {
"metadata": {
"name": "pulumi",
Expand All @@ -130,7 +131,6 @@ impl KubernetesPulumiStackService {
"failedJobsHistoryLimit": 1
},
},
"backoffLimit": 100,
"successfulJobsHistoryLimit": 1,
"failedJobsHistoryLimit": 1
}
Expand Down

0 comments on commit 808cc85

Please sign in to comment.