From 283f89eb22d9eb06690baee4f55a5db6af5fcb6f Mon Sep 17 00:00:00 2001 From: Kevin Ortega Date: Mon, 22 Jan 2024 10:54:24 -0500 Subject: [PATCH 1/2] change mend script change sha256 swith to md5 remove md5 add debug fix module.yaml Update maven download location --- .one-pipeline.yaml | 4 ++-- Makefile | 2 +- modules/maven/module.yaml | 8 +++----- test/run | 10 +++++----- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.one-pipeline.yaml b/.one-pipeline.yaml index 48e64c7..b634174 100644 --- a/.one-pipeline.yaml +++ b/.one-pipeline.yaml @@ -197,8 +197,8 @@ containerize: done < <(list_artifacts) echo "MEND unified agent scan" - chmod +x "${COMMONS_PATH}/whitesource/whitesource_unified_agent_scan.sh" - source "${COMMONS_PATH}/whitesource/whitesource_unified_agent_scan.sh" + chmod +x "${COMMONS_PATH}"/mend/mend_unified_agent_scan.sh + source "${COMMONS_PATH}"/mend/mend_unified_agent_scan.sh diff --git a/Makefile b/Makefile index 0a7b0fb..4f3a10c 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ PROD_NAMESPACE?=ibmcom PLATFORM=websphere-liberty-s2i IMAGE_NAME=${NAMESPACE}/${PLATFORM} BUILD_IMAGE_NAME=${PROD_NAMESPACE}/${PLATFORM} -DOCKER_HOST=tcp://localhost:2376 +#DOCKER_HOST=tcp://localhost:2376 build = ./build.sh diff --git a/modules/maven/module.yaml b/modules/maven/module.yaml index 276ab8e..a02aa8d 100644 --- a/modules/maven/module.yaml +++ b/modules/maven/module.yaml @@ -2,14 +2,12 @@ schema_version: 1 name: maven version: 1.0 -description: "Module used to install Maven 3.9.3" +description: "Module used to install Maven 3.8.8" # Defined artifacts that are used to build the image artifacts: - name: maven.tar.gz - url: https://www.apache.org/dist/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz - sha512: 332088670d14fa9ff346e6858ca0acca304666596fec86eea89253bd496d3c90deae2be5091be199f48e09d46cec817c6419d5161fb4ee37871503f472765d00 - + url: https://downloads.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz + sha512: 332088670d14fa9ff346e6858ca0acca304666596fec86eea89253bd496d3c90deae2be5091be199f48e09d46cec817c6419d5161fb4ee37871503f472765d00 execute: - script: install.sh - diff --git a/test/run b/test/run index 3646e2c..49331b0 100755 --- a/test/run +++ b/test/run @@ -21,7 +21,7 @@ DEPLOY_TO_APPS_VAR="-e DEPLOY_TO_APPS=true" # Since we built the image locally, we don't want S2I attempt to pull # it from Docker hub -s2i_args="--pull-policy=never" +s2i_args="--pull-policy=never --loglevel 5" test_port=9080 test_root=sample @@ -60,7 +60,7 @@ prepare() { echo "DOCKER_API_VERSION ${DOCKER_API_VERSION}" echo "s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-testapp $@" - s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-testapp $@ >& $s2i_log_file + s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-testapp $@ echo "s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-runtime-testapp --runtime-image ${BUILD_IMAGE_NAME}:${RUNTIME_IMAGE_VERSION} --runtime-artifact /opt/ibm/wlp/usr $@" s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-runtime-testapp --runtime-image ${BUILD_IMAGE_NAME}:${RUNTIME_IMAGE_VERSION} --runtime-artifact /opt/ibm/wlp/usr $@ >& $s2i_log_file @@ -78,7 +78,7 @@ run_test_application() { cleanupContainer() { echo "Cleanup for test, cid $(cat $cid_file)" - if container_exists; then + if container_exists; then if [[ $1 != "0" ]]; then echo "Viewing docker logs" docker logs $(cat $cid_file) @@ -89,7 +89,7 @@ cleanupContainer() { rm -f $cid_file } -cleanupImages() { +cleanupImages() { if image_exists ${BUILD_IMAGE_NAME}-testapp; then docker rmi -f ${BUILD_IMAGE_NAME}-testapp fi @@ -97,7 +97,7 @@ cleanupImages() { docker rmi -f ${BUILD_IMAGE_NAME}-runtime-testapp fi rm -rf ${test_dir}/test-app/.git - + } cleanupFinal() { From 5ac1a78a7c9e7b09e56fc713dd48edf7134dce93 Mon Sep 17 00:00:00 2001 From: Kevin Ortega Date: Wed, 24 Jan 2024 09:38:49 -0500 Subject: [PATCH 2/2] Remove debug --- test/run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/run b/test/run index 49331b0..bd50d94 100755 --- a/test/run +++ b/test/run @@ -21,7 +21,7 @@ DEPLOY_TO_APPS_VAR="-e DEPLOY_TO_APPS=true" # Since we built the image locally, we don't want S2I attempt to pull # it from Docker hub -s2i_args="--pull-policy=never --loglevel 5" +s2i_args="--pull-policy=never" test_port=9080 test_root=sample @@ -60,7 +60,7 @@ prepare() { echo "DOCKER_API_VERSION ${DOCKER_API_VERSION}" echo "s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-testapp $@" - s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-testapp $@ + s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-testapp $@ >& $s2i_log_file echo "s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-runtime-testapp --runtime-image ${BUILD_IMAGE_NAME}:${RUNTIME_IMAGE_VERSION} --runtime-artifact /opt/ibm/wlp/usr $@" s2i build ${s2i_args} ${test_dir}/$app ${BUILD_IMAGE_NAME}:${IMAGE_VERSION} ${BUILD_IMAGE_NAME}-runtime-testapp --runtime-image ${BUILD_IMAGE_NAME}:${RUNTIME_IMAGE_VERSION} --runtime-artifact /opt/ibm/wlp/usr $@ >& $s2i_log_file