Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport -> release/3.8.x] chore(release): use docker image to facilitate update-copyright step #13784

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ubuntu:latest AS expat-build

ARG expat_version=2.6.3

SHELL ["/bin/bash", "-c"]

WORKDIR /workspace

RUN apt update \
&& apt install -y curl

RUN curl -L https://github.com/libexpat/libexpat/releases/download/R_${expat_version//./_}/expat-${expat_version}.tar.gz | tar -xz \
&& cd expat-${expat_version} \
&& apt install -y build-essential \
&& ./configure --prefix=/expat_lib \
&& make && make install

FROM ubuntu:latest

COPY --from=expat-build /expat_lib /expat_lib

RUN apt update && apt install -y curl libssl-dev libyaml-dev lua5.4 luarocks

WORKDIR /workspace
CMD ["/bin/bash", "-c", "OPENSSL_DIR=/usr EXPAT_DIR=/expat_lib scripts/update-copyright"]

VOLUME /workspace
4 changes: 3 additions & 1 deletion scripts/release-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ function commit_changelog() {
function update_copyright() {
version=$1

if ! "$scripts_folder/update-copyright"
PDIR=$(dirname "$scripts_folder")

if ! (docker build -t kong/update-copyright ${scripts_folder} && docker run -v ${PDIR}:/workspace --rm kong/update-copyright)
then
die "Could not update copyright file. Check logs for missing licenses, add hardcoded ones if needed"
fi
Expand Down
Loading