From 39eb09456b8f15e6cfad1f3b7cb7a7c239ce8101 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 26 Aug 2024 16:09:06 +0200 Subject: [PATCH 1/2] Speed up image uploads As long as the image isn't used later on, there is no point in the automatic `get` after `put`. Also limit the inputs that each `put` step uses. Closes: #29 --- pipelines/jobs/rust-xwin.yml.j2 | 10 ++++++---- pipelines/jobs/simple-image.yml.j2 | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pipelines/jobs/rust-xwin.yml.j2 b/pipelines/jobs/rust-xwin.yml.j2 index 033a8fc..21fcf11 100644 --- a/pipelines/jobs/rust-xwin.yml.j2 +++ b/pipelines/jobs/rust-xwin.yml.j2 @@ -43,9 +43,11 @@ - in_parallel: steps: - put: image-rust-xwin - params: - image: image-rust-xwin/image.tar + inputs: detect + params: { image: image-rust-xwin/image.tar } + no_get: true - put: image-rust-xwin-ci - params: - image: image-rust-xwin-ci/image.tar + inputs: detect + params: { image: image-rust-xwin-ci/image.tar } + no_get: true {% endmacro %} diff --git a/pipelines/jobs/simple-image.yml.j2 b/pipelines/jobs/simple-image.yml.j2 index a151a57..b86118e 100644 --- a/pipelines/jobs/simple-image.yml.j2 +++ b/pipelines/jobs/simple-image.yml.j2 @@ -17,5 +17,7 @@ {%- endfor %} {%- endif %} - put: image-{{ job.name }} + inputs: detect params: { image: image/image.tar } + no_get: true {%- endmacro -%} From 29faf1e86c2036c42fb1e5ff45f69525a0bc6e83 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 26 Aug 2024 16:21:20 +0200 Subject: [PATCH 2/2] Run builds in series Since they I/O bound off of the same hardware, and sometimes also CPU bound when compiling things, running them in parallel only slows things down. Closes: #28 --- pipelines/jobs/rust-xwin.yml.j2 | 40 ++++++++++++++---------------- pipelines/jobs/simple-image.yml.j2 | 1 + 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/pipelines/jobs/rust-xwin.yml.j2 b/pipelines/jobs/rust-xwin.yml.j2 index 21fcf11..71a2c13 100644 --- a/pipelines/jobs/rust-xwin.yml.j2 +++ b/pipelines/jobs/rust-xwin.yml.j2 @@ -16,30 +16,28 @@ {% macro jobs() -%} - name: rust-xwin + serial: true plan: - get: repo trigger: true - - in_parallel: - fail_fast: true - steps: - - task: build-rust-xwin - file: repo/tasks/build-image.yml - privileged: true - vars: - context: repo/images/rust-xwin - target: rust-xwin - dockerfile: '' - output_mapping: - image: image-rust-xwin - - task: build-rust-xwin-ci - file: repo/tasks/build-image.yml - privileged: true - vars: - context: repo/images/rust-xwin - target: rust-xwin-ci - dockerfile: '' - output_mapping: - image: image-rust-xwin-ci + - task: build-rust-xwin + file: repo/tasks/build-image.yml + privileged: true + vars: + context: repo/images/rust-xwin + target: rust-xwin + dockerfile: '' + output_mapping: + image: image-rust-xwin + - task: build-rust-xwin-ci + file: repo/tasks/build-image.yml + privileged: true + vars: + context: repo/images/rust-xwin + target: rust-xwin-ci + dockerfile: '' + output_mapping: + image: image-rust-xwin-ci - in_parallel: steps: - put: image-rust-xwin diff --git a/pipelines/jobs/simple-image.yml.j2 b/pipelines/jobs/simple-image.yml.j2 index b86118e..0341f1b 100644 --- a/pipelines/jobs/simple-image.yml.j2 +++ b/pipelines/jobs/simple-image.yml.j2 @@ -1,5 +1,6 @@ {% macro jobs(job) -%} - name: {{ job.name }} + serial: true plan: - get: repo trigger: true