Skip to content

Commit

Permalink
github-actions :: fix detect-changes in ci build (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb committed May 1, 2024
1 parent c77eea7 commit bd3be2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dockerignore
@@ -1,3 +1,4 @@
.git/
.github/
.idea/
contrib/docker/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-ci.yml
Expand Up @@ -71,7 +71,7 @@ jobs:
file: contrib/docker/Dockerfile.ci
build-args: |
target_os=centos7
verify_build=true
verify_build=false
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
15 changes: 10 additions & 5 deletions contrib/docker/Dockerfile.ci
Expand Up @@ -17,7 +17,7 @@ RUN dnf update -y \
&& rpm --import https://yum.corretto.aws/corretto.key \
&& curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \
&& dnf install -y java-${java_version}-amazon-corretto-devel \
&& dnf install -y glibc-langpack-en lsof \
&& dnf install -y glibc-langpack-en lsof git \
&& groupadd -g ${gid} ${group} \
&& useradd -u ${uid} -g ${group} -m -s /bin/sh ${user} \
&& dnf clean all -y \
Expand All @@ -40,7 +40,7 @@ RUN yum update -y \
&& rpm --import https://yum.corretto.aws/corretto.key \
&& curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \
&& yum install -y java-${java_version}-amazon-corretto-devel \
&& yum install -y which lsof \
&& yum install -y which lsof git \
&& groupadd -g ${gid} ${group} \
&& useradd -u ${uid} -g ${group} -m -s /bin/bash ${user} \
&& yum clean all -y \
Expand All @@ -63,7 +63,7 @@ RUN apk update \
&& apk add ca-certificates \
&& update-ca-certificates \
&& apk add --update coreutils && rm -rf /var/cache/apk/* \
&& apk add --update openjdk${java_version} tzdata curl unzip bash which lsof \
&& apk add --update openjdk${java_version} tzdata curl unzip bash which lsof git \
&& apk add --no-cache nss \
&& addgroup --gid ${gid} ${group} \
&& adduser --disabled-password --uid ${uid} --ingroup ${group} ${user} \
Expand All @@ -84,12 +84,17 @@ RUN curl -L -o /tmp/maven.tar.gz https://dlcdn.apache.org/maven/maven-3/${maven_

COPY . ${PROJECT_BASE}
RUN chown -R ${user}:${group} ${PROJECT_BASE} \
&& chmod -R 744 ${PROJECT_BASE} \
&& (rm -f .mvn-classpath || true)
&& chmod -R 744 ${PROJECT_BASE}

USER ${user}
WORKDIR ${PROJECT_BASE}

RUN git init --quiet \
&& git config user.email "emissary@build.dne" \
&& git config user.name "emissary" \
&& git add . \
&& git commit --quiet -am.

ARG java_compiler=11
RUN --mount=type=cache,uid=${uid},gid=${gid},target=/home/${user}/.m2 \
mvn -V -B -e -ntp "-Dstyle.color=always" -Dmaven.compiler.release=${java_compiler} clean verify -Pdist
Expand Down

0 comments on commit bd3be2f

Please sign in to comment.