-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
chore: migrate pipeline to infra.ci and use eclipse-temurin instead (deprecated) openjdk
- Loading branch information
Showing
3 changed files
with
21 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
FROM jetty:jre8 | ||
FROM eclipse-temurin:8 AS build | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN ./gradlew --no-daemon --info war | ||
|
||
FROM jetty:jre8 AS production | ||
|
||
LABEL \ | ||
Description="Deploy Jenkins infra account app" \ | ||
Project="https://github.com/jenkins-infra/account-app" \ | ||
Maintainer="[email protected]" | ||
description="Deploy Jenkins infra account app" \ | ||
project="https://github.com/jenkins-infra/account-app" \ | ||
maintainer="[email protected]" | ||
|
||
ENV STV_GIT_COMMIT="fdb6dfdbc171d3e91bd98dd85bc2fbcea8aa2a7a" | ||
ENV STV_GIT_URL="https://github.com/louridas/stv.git" | ||
ENV ELECTION_LOGDIR=/var/log/accountapp/elections | ||
ENV CIRCUIT_BREAKER_FILE=/etc/accountapp/circuitBreaker.txt | ||
ENV SMTP_SERVER=localhost | ||
|
@@ -18,18 +22,19 @@ EXPOSE 8080 | |
|
||
USER root | ||
|
||
## Always use latest available version of these packages | ||
# hadolint ignore=DL3008 | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y git python && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
mkdir -p /opt/stv && \ | ||
git clone $STV_GIT_URL /opt/stv && \ | ||
cd /opt/stv && \ | ||
git checkout $STV_GIT_COMMIT | ||
apt-get install --yes --no-install-recommends python && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
## Install the STV Election projects (which requires python) | ||
ARG STV_GIT_COMMIT="fdb6dfdbc171d3e91bd98dd85bc2fbcea8aa2a7a" | ||
ADD "https://github.com/louridas/stv/archive/${STV_GIT_COMMIT}.tar.gz" /opt/stv | ||
|
||
# /home/jetty/.app is apparently needed by Stapler for some weird reason. O_O | ||
RUN \ | ||
mkdir -p /opt/stv && \ | ||
mkdir -p /home/jetty/.app &&\ | ||
mkdir -p /etc/accountapp &&\ | ||
mkdir -p $ELECTION_LOGDIR | ||
|
@@ -40,7 +45,7 @@ COPY entrypoint.sh /entrypoint.sh | |
|
||
ADD https://search.maven.org/remote_content?g=com.datadoghq&a=dd-java-agent&v=0.9.0 /home/jetty/dd-java-agent.jar | ||
|
||
COPY build/libs/accountapp*.war /var/lib/jetty/webapps/ROOT.war | ||
COPY --chown=jetty:root --from=build /app/build/libs/accountapp*.war /var/lib/jetty/webapps/ROOT.war | ||
|
||
RUN chmod 0755 /entrypoint.sh &&\ | ||
chown -R jetty:root /etc/accountapp &&\ | ||
|
@@ -51,4 +56,4 @@ RUN chmod 0755 /entrypoint.sh &&\ | |
|
||
USER jetty | ||
|
||
ENTRYPOINT /entrypoint.sh | ||
ENTRYPOINT ["bash","/entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
parallelDockerUpdatecli([imageName: 'account-app', rebuildImageOnPeriodicJob: false]) |