From 6e67a3b4927f71e4caf9b22cb67ace26b506ff8a Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Wed, 18 Oct 2023 17:38:57 -0300 Subject: [PATCH 1/3] comment out node10 (updated to node18) and maven 3.6 (updated to 3.8) installs, as we likely don 't need them (either not required or handled by GH action) #22616 Change-Id: I5d0920b58e413247fd5466a269fb26b1af60578c Signed-off-by: Nick Boldt --- .github/workflows/release.yml | 2 +- make-release.sh | 38 ++++++++++++++++++++--------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1f7daaf63..68ccfc2488 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # -# Copyright (c) 2020 Red Hat, Inc. +# Copyright (c) 2020-2023 Red Hat, Inc. # This program and the accompanying materials are made # available under the terms of the Eclipse Public License 2.0 # which is available at https://www.eclipse.org/legal/epl-2.0/ diff --git a/make-release.sh b/make-release.sh index 160012d25c..1ee3905bda 100755 --- a/make-release.sh +++ b/make-release.sh @@ -50,21 +50,22 @@ loadMvnSettingsGpgKey() { gpg --version } -installDebDeps(){ - set +x - # TODO should this be node 12? - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - - sudo apt-get install -y nodejs -} +# comment out: why do we think we need nodejs installed for a java build? +# installDebDeps(){ +# set +x +# curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - +# sudo apt-get install -y nodejs +# } -installMaven(){ - set -x - mkdir -p /opt/apache-maven && curl -sSL https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | tar -xz --strip=1 -C /opt/apache-maven - export M2_HOME="/opt/apache-maven" - export PATH="/opt/apache-maven/bin:${PATH}" - mvn -version || die_with "mvn not found in path: ${PATH} !" - set +x -} +# comment out: already installed via GH action so no need to do it again +# installMaven(){ +# set -x +# mkdir -p /opt/apache-maven && curl -sSL https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz | tar -xz --strip=1 -C /opt/apache-maven +# export M2_HOME="/opt/apache-maven" +# export PATH="/opt/apache-maven/bin:${PATH}" +# mvn -version || die_with "mvn not found in path: ${PATH} !" +# set +x +# } evaluateCheVariables() { echo "Che version: ${CHE_VERSION}" @@ -414,9 +415,14 @@ updateImageTagsInCheServer() { popd >/dev/null } -installMaven +# already installed via GH action so no need to do it again +# installMaven + loadMvnSettingsGpgKey -installDebDeps + +# why do we think we need nodejs installed for a java build? +# installDebDeps + set -x setupGitconfig From bfb531761d5b4d4b4d90c2c37f0f4e6504fe2b23 Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Wed, 18 Oct 2023 18:25:24 -0300 Subject: [PATCH 2/3] use maven 3.8 for typescript-dto build too Change-Id: Ie70fa428ba1a68bbe663577947f05b6a2c4fe3a6 Signed-off-by: Nick Boldt --- typescript-dto/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript-dto/build.sh b/typescript-dto/build.sh index 9d10893651..4f02e3d1a5 100755 --- a/typescript-dto/build.sh +++ b/typescript-dto/build.sh @@ -17,7 +17,7 @@ rm -f ./index.d.ts set +e docker run -i --rm -v "$HOME/.m2:/root/.m2" \ -v "$(pwd)/dto-pom.xml:/usr/src/mymaven/pom.xml" \ - -w /usr/src/mymaven maven:3.6.1-jdk-11 \ + -w /usr/src/mymaven docker.io/maven:3.8-jdk-11 \ /bin/bash -c "mvn -q -U -DskipTests=true -Dfindbugs.skip=true -Dskip-validate-sources install \ && cat target/dts-dto-typescript.d.ts" >> index.d.ts From 270be77cc70edc659e31f8b2454bee113a05ace5 Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Wed, 18 Oct 2023 18:31:17 -0300 Subject: [PATCH 3/3] support building with podman too Change-Id: I83fc89be6ad2411b64a4bf4e2308c048a9ab2ff4 Signed-off-by: Nick Boldt --- typescript-dto/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/typescript-dto/build.sh b/typescript-dto/build.sh index 4f02e3d1a5..4f173128b0 100755 --- a/typescript-dto/build.sh +++ b/typescript-dto/build.sh @@ -15,7 +15,9 @@ set -u rm -f ./index.d.ts set +e -docker run -i --rm -v "$HOME/.m2:/root/.m2" \ +BUILDER=$(command -v podman) +if [ ! -x "$BUILDER" ]; then BUILDER=$(command -v docker); fi +$BUILDER run -i --rm -v "$HOME/.m2:/root/.m2" \ -v "$(pwd)/dto-pom.xml:/usr/src/mymaven/pom.xml" \ -w /usr/src/mymaven docker.io/maven:3.8-jdk-11 \ /bin/bash -c "mvn -q -U -DskipTests=true -Dfindbugs.skip=true -Dskip-validate-sources install \ @@ -31,4 +33,4 @@ fi CHE_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args="\${project.version}" --non-recursive exec:exec -f ../pom.xml) -docker build -t eclipse-che-ts-api --build-arg CHE_VERSION="${CHE_VERSION}" --build-arg NPM_AUTH_TOKEN="${CHE_NPM_AUTH_TOKEN}" . +$BUILDER build -t eclipse-che-ts-api --build-arg CHE_VERSION="${CHE_VERSION}" --build-arg NPM_AUTH_TOKEN="${CHE_NPM_AUTH_TOKEN}" .