Skip to content

Commit

Permalink
pipeline: Conditionally add a LICENSE file if it exists
Browse files Browse the repository at this point in the history
This will make other dockerfile builds to pass in case there is still no
license or is unnecessary.

Signed-off-by: Roy Golan <[email protected]>
  • Loading branch information
rgolangh committed Jul 11, 2024
1 parent fd0f128 commit f64b945
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pipeline/workflow-builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ COPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/
COPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/*.jar /deployments/
COPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/app/ /deployments/app/
COPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/quarkus/ /deployments/quarkus/
COPY LICENSE /licenses/

# Copy the license file if it exists in the context
RUN --mount=type=bind,target=/context,Z <<EOF
if [ -f /context/LICENSE ]; then
mkdir /licenses
cp -v /context/LICENSE /licenses
fi
EOF


EXPOSE 8080
USER 185
Expand Down

0 comments on commit f64b945

Please sign in to comment.