From 87ff881205801a5f7f3f1ba807136768b9eda264 Mon Sep 17 00:00:00 2001 From: Reingold Shekhtel Date: Thu, 3 Oct 2024 19:03:52 +0200 Subject: [PATCH] Add develop-SNAPSHOT as default commit for develop deps. --- Dockerfile | 7 ++++++- build.gradle | 7 +++++-- gradle.properties | 2 ++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 690a3319..e82a4a42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,18 @@ FROM --platform=$BUILDPLATFORM gradle:8.10.0-jdk21-alpine AS build ARG RELEASE_MODE ARG APP_VERSION +ARG DAO_COMMIT_HASH +ARG COMMONS_COMMIT_HASH WORKDIR /usr/app COPY . /usr/app RUN if [ "${RELEASE_MODE}" = true ]; then \ gradle build --no-build-cache --exclude-task test \ -PreleaseMode=true \ -Dorg.gradle.project.version=${APP_VERSION}; \ - else gradle build --no-build-cache --exclude-task test -Dorg.gradle.project.version=${APP_VERSION}; fi + else gradle build --no-build-cache --exclude-task test \ + -PdaoCommitHash= ${DAO_COMMIT_HASH} \ + -PcommonsCommitHash= ${COMMONS_COMMIT_HASH}\ + -Dorg.gradle.project.version=${APP_VERSION}; fi FROM amazoncorretto:21.0.4 LABEL version=${APP_VERSION} description="EPAM ReportPortal. Auth Service" maintainer="Andrei Varabyeu , Hleb Kanonik " diff --git a/build.gradle b/build.gradle index 9c46f0d5..229d9bd0 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,9 @@ plugins { id "org.owasp.dependencycheck" version "9.0.9" } +def daoCommitHash = project.hasProperty('daoCommitHash') ? project.daoCommitHash : 'develop-SNAPSHOT' +def commonsCommitHash = project.hasProperty('commonsCommitHash') ? project.commonsCommitHash : 'develop-SNAPSHOT' + apply from: 'project-properties.gradle' //apply from: "$scriptsUrl/build-docker.gradle" apply from: "$scriptsUrl/build-info.gradle" @@ -43,8 +46,8 @@ dependencies { api 'com.epam.reportportal:commons-dao' api 'com.epam.reportportal:commons' } else { - api 'com.github.reportportal:commons-dao:cce9625' - api 'com.github.reportportal:commons:50a1192' + api "com.github.reportportal:commons-dao:${daoCommitHash}" + api "com.github.reportportal:commons:${commonsCommitHash}" } //Fix CVE-2021-41079, CVE-2022-23181, CVE-2021-33037, CVE-2021-30640, CVE-2022-42252, CVE-2023-46589, CVE-2024-24549 diff --git a/gradle.properties b/gradle.properties index 9ad71799..3b9bb04a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,3 +6,5 @@ dockerJavaOptsDev=-Xmx1g -XX:+UseG1GC -XX:InitiatingHeapOccupancyPercent=70 -XX: dockerServerUrl=unix:///var/run/docker.sock lombokVersion=1.18.30 +daoCommitHash=develop-SNAPSHOT +commonsCommitHash=develop-SNAPSHOT