Skip to content

Commit

Permalink
ioc: allow skipping all pruning steps.
Browse files Browse the repository at this point in the history
Pruning artifacts embeds several heuristics about what is worth keeping,
and what should be removed after build. Such predefined pruning steps
might miss corner cases where defining extra APP_DIRS is not enough.
Introduce a knob to skip the pruning steps entirely to give users a
immediate last resort option to use before a corrected version is
eventually released.
henriquesimoes committed Dec 13, 2024
1 parent 628dad4 commit d16de13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -46,8 +46,9 @@ FROM build-image AS pruned-build

ARG APP_DIRS
ARG RUNDIR
ARG SKIP_PRUNE

RUN lnls-prune-artifacts ${APP_DIRS} ${RUNDIR}
RUN if [ "$SKIP_PRUNE" != 1 ]; then lnls-prune-artifacts ${APP_DIRS} ${RUNDIR}; fi


FROM base AS no-build
@@ -81,10 +82,11 @@ ARG JOBS=1
ARG APP_DIRS
ARG RUNDIR
ARG SKIP_TESTS
ARG SKIP_PRUNE

RUN make distclean && make -j ${JOBS} && make $([ "$SKIP_TESTS" != 1 ] && echo runtests) && make clean && make -C ${RUNDIR}

RUN lnls-prune-artifacts ${APP_DIRS} ${PWD} ${RUNDIR}
RUN if [ "$SKIP_PRUNE" != 1 ]; then lnls-prune-artifacts ${APP_DIRS} ${PWD} ${RUNDIR}; fi


FROM base AS dynamic-link

0 comments on commit d16de13

Please sign in to comment.