Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Feature request: Skip build step when running in CI #28

Closed
madsnedergaard opened this issue Apr 24, 2020 · 1 comment · Fixed by #31
Closed

Feature request: Skip build step when running in CI #28

madsnedergaard opened this issue Apr 24, 2020 · 1 comment · Fixed by #31

Comments

@madsnedergaard
Copy link
Member

madsnedergaard commented Apr 24, 2020

Definition of problem

When the CI runs the test or deploy steps, it also runs previous steps (prepare + build). These previous steps are potentially redundant if you are running separate brick commands in CI like we do.

However, depending on the setup, those prepare/builds might already have been run as part of the CI build stage!

Although the operation results in a no-op, it still takes time and when the amount of packages increase this slows down CI.

It would be great to avoid running the prepare/build/test phase of brick when running in CI.

Example output from the "test" stage in the CI:

image

We see that the prepare/build operations are also running here, which enforces consistency.

Proposed solution

Add an option for skipping previous steps (prepare + build) when running in CI.

Things to be aware of:

  • when running brick test directly (e.g. locally), it should still run prepare+build to ensure using latest build
  • naming of the flag/option - is "ci" too broad? Would love some inputs :)

Suggestion

Add a flag that can be used when called from CI (fx brick -r --ci test)

@madsnedergaard madsnedergaard changed the title Potential redundant prepare and build stages when running in CI Feature request: Skip build step when running in CI where this is a separate step Apr 24, 2020
@madsnedergaard madsnedergaard changed the title Feature request: Skip build step when running in CI where this is a separate step Feature request: Skip build step when running in CI Apr 24, 2020
@madsnedergaard
Copy link
Member Author

Here's how it could work - first run doesn't have a build image, second time it does and thus skips that step:

brick-ci-demo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant