From dd8b2f32ad6d2d67bd0bb583f28bfa36d9dd8da9 Mon Sep 17 00:00:00 2001 From: Eric Ribeiro Date: Mon, 19 Sep 2022 09:13:42 -0700 Subject: [PATCH] feat: add `no_output_timeout` to commands and jobs (#32) * feat: add `no_output_timeout` to all commands * feat: add `no_output_timeout` to `build` and `test` jobs --- src/commands/build.yml | 5 +++++ src/commands/prepare-env.yml | 5 +++++ src/commands/test.yml | 5 +++++ src/jobs/build.yml | 6 ++++++ src/jobs/test.yml | 6 ++++++ 5 files changed, 27 insertions(+) diff --git a/src/commands/build.yml b/src/commands/build.yml index 9b92024..92d7b20 100644 --- a/src/commands/build.yml +++ b/src/commands/build.yml @@ -47,10 +47,15 @@ parameters: Whether to compress the build output to a ".tar.gz" archive. This is recommended if you want to download the built artifacts from the CircleCI web app. If left to "false" for decompressed WebGL builds, you can run the project directly from the CircleCI web app. + no_output_timeout: + type: string + default: "10m" + description: Elapsed time the command can run without output. steps: - run: name: << parameters.step-name >> + no_output_timeout: << parameters.no_output_timeout >> environment: PARAM_BUILD_NAME: << parameters.build-name >> PARAM_BUILD_TARGET: << parameters.build-target >> diff --git a/src/commands/prepare-env.yml b/src/commands/prepare-env.yml index d37d24b..32e7372 100644 --- a/src/commands/prepare-env.yml +++ b/src/commands/prepare-env.yml @@ -40,6 +40,10 @@ parameters: description: | Enter the path of your Unity project. This should be the directory that has an "Assets" folder inside it. + no_output_timeout: + type: string + default: "10m" + description: Elapsed time the command can run without output. steps: - restore_cache: @@ -48,6 +52,7 @@ steps: - unity-deps-{{ arch }}-<< parameters.cache-version >>-<<# parameters.include-branch-in-cache-key >>{{ .Branch }}<> - run: name: Prepare the environment + no_output_timeout: << parameters.no_output_timeout >> environment: PARAM_UNITY_USERNAME_VAR_NAME: << parameters.unity-username-var-name >> PARAM_UNITY_PASSWORD_VAR_NAME: << parameters.unity-password-var-name >> diff --git a/src/commands/test.yml b/src/commands/test.yml index 64fb1ff..74cbe9a 100644 --- a/src/commands/test.yml +++ b/src/commands/test.yml @@ -30,10 +30,15 @@ parameters: default: true description: > If true, this cache bucket will only apply to jobs within the same branch. + no_output_timeout: + type: string + default: "10m" + description: Elapsed time the command can run without output. steps: - run: name: << parameters.step-name >> + no_output_timeout: << parameters.no_output_timeout >> environment: PARAM_PROJECT_PATH: << parameters.project-path >> PARAM_TEST_PLATFORM: << parameters.test-platform >> diff --git a/src/jobs/build.yml b/src/jobs/build.yml index d410c6c..7d5c516 100755 --- a/src/jobs/build.yml +++ b/src/jobs/build.yml @@ -69,6 +69,10 @@ parameters: description: | Whether to return the license used to build the project. Unity only allows returning professional licenses. + no_output_timeout: + type: string + default: "20m" + description: Elapsed time the command can run without output. executor: << parameters.executor >> @@ -80,6 +84,7 @@ steps: unity-serial-var-name: << parameters.unity-serial-var-name >> unity-license-var-name: << parameters.unity-license-var-name >> project-path: <> + no_output_timeout: << parameters.no_output_timeout>> - build: step-name: << parameters.step-name >> build-name: <> @@ -87,6 +92,7 @@ steps: project-path: <> store-artifacts: <> compress: <> + no_output_timeout: << parameters.no_output_timeout>> - when: condition: <> steps: diff --git a/src/jobs/test.yml b/src/jobs/test.yml index f972f44..632f73e 100644 --- a/src/jobs/test.yml +++ b/src/jobs/test.yml @@ -52,6 +52,10 @@ parameters: description: | Whether to return the license used to test the project. Unity only allows returning professional licenses. + no_output_timeout: + type: string + default: "20m" + description: Elapsed time the command can run without output. executor: << parameters.executor >> @@ -63,10 +67,12 @@ steps: unity-serial-var-name: << parameters.unity-serial-var-name >> unity-license-var-name: << parameters.unity-license-var-name >> project-path: <> + no_output_timeout: << parameters.no_output_timeout>> - test: step-name: << parameters.step-name >> test-platform: << parameters.test-platform >> project-path: << parameters.project-path >> + no_output_timeout: << parameters.no_output_timeout>> - when: condition: <> steps: