Skip to content
Open
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
22 changes: 21 additions & 1 deletion .github/scripts/resolve-ci-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,24 @@ add_module() {
modules+=("${module}")
}

is_root_reactor_module() {
local module="$1"
local candidate="${module}"

while [[ "${candidate}" == */* ]]; do
if grep -Fq "<module>${candidate}</module>" pom.xml; then
return 0
fi
candidate="${candidate%/*}"
done

grep -Fq "<module>${candidate}</module>" pom.xml
}

find_module() {
local path="$1"
local dir
local module

if [[ -d "${path}" ]]; then
dir="${path}"
Expand All @@ -53,7 +68,10 @@ find_module() {

while [[ "${dir}" != "." && "${dir}" != "/" ]]; do
if [[ -f "${dir}/pom.xml" ]]; then
printf '%s\n' "${dir#./}"
module="${dir#./}"
if is_root_reactor_module "${module}"; then
printf '%s\n' "${module}"
fi
return
fi
dir="$(dirname "${dir}")"
Expand Down Expand Up @@ -95,6 +113,8 @@ while IFS= read -r file; do
module="$(find_module "${file}")"
if [[ -n "${module:-}" ]]; then
add_module "${module}"
else
full_build_required=true
fi
fi
done < <(printf '%s' "${changed_files_json}" | jq -r '.[]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM amazoncorretto:17.0.11-alpine3.19

ENV APP_NAME shenyu-examples-apache-dubbo-service-xml
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN addgroup -S shenyu && \
adduser -S shenyu -G shenyu -h /home/shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8011/actuator/health | grep -q UP"]
EXPOSE 8011
EXPOSE 20888

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM amazoncorretto:17.0.11-alpine3.19

ENV APP_NAME shenyu-examples-apache-dubbo-service
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN addgroup -S shenyu && \
adduser -S shenyu -G shenyu -h /home/shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8011/actuator/health | grep -q UP"]
EXPOSE 8011
EXPOSE 20888

Expand Down
8 changes: 8 additions & 0 deletions shenyu-examples/shenyu-examples-eureka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-eureka
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["bash", "-c", ": >/dev/tcp/127.0.0.1/8761"]
EXPOSE 8761

CMD java -jar ${APP_NAME}.jar
8 changes: 8 additions & 0 deletions shenyu-examples/shenyu-examples-grpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-grpc
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:55290/actuator/health | grep -q UP"]
EXPOSE 55290
EXPOSE 8080

Expand Down
8 changes: 8 additions & 0 deletions shenyu-examples/shenyu-examples-http-swagger3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-http-swagger3
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8190/actuator/health | grep -q UP"]
EXPOSE 8190

CMD java -jar ${APP_NAME}.jar
8 changes: 8 additions & 0 deletions shenyu-examples/shenyu-examples-http/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-http
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8189/actuator/health | grep -q UP"]
EXPOSE 8189

CMD java --add-opens java.base/java.lang=ALL-UNNAMED -jar ${APP_NAME}.jar
8 changes: 8 additions & 0 deletions shenyu-examples/shenyu-examples-https/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-https
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget --no-check-certificate -q -O - https://127.0.0.1:8190/actuator/health | grep -q UP"]

EXPOSE 8080
EXPOSE 8190
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-apache-dubbo-consumer
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-apache-dubbo-provider
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8011/actuator/health | grep -q UP"]
EXPOSE 8011
EXPOSE 20888

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-feign
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8898/actuator/health | grep -q UP"]
EXPOSE 8898

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-grpc-consumer
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-grpc-provider
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:55222/actuator/health | grep -q UP"]
EXPOSE 8899

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-http
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-springcloud-consumer
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8899/actuator/health | grep -q UP"]
EXPOSE 8899

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sdk-springcloud-provider
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:8884/actuator/health | grep -q UP"]
EXPOSE 8761

CMD java -jar ${APP_NAME}.jar
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
FROM eclipse-temurin:17-centos7

ENV APP_NAME shenyu-examples-sofa
LABEL org.opencontainers.image.title="${APP_NAME}" \
org.opencontainers.image.source="https://github.com/apache/shenyu" \
org.opencontainers.image.licenses="Apache-2.0"
ENV LOCAL_PATH /opt/${APP_NAME}

RUN mkdir -p ${LOCAL_PATH}

ADD target/${APP_NAME}.jar ${LOCAL_PATH}

WORKDIR ${LOCAL_PATH}
RUN groupadd --system shenyu && \
useradd --system --gid shenyu --create-home --home-dir /home/shenyu shenyu && \
chown -R shenyu:shenyu ${LOCAL_PATH}
USER shenyu
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["sh", "-c", "wget -q -O - http://127.0.0.1:28011/actuator/health | grep -q UP"]
EXPOSE 28011
EXPOSE 8888

Expand Down
Loading
Loading