Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
OBR script changes
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Slattery <[email protected]>
  • Loading branch information
Tom-Slattery committed Sep 16, 2024
1 parent 6800d62 commit 64e3da2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
26 changes: 15 additions & 11 deletions build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ function check_exit_code () {
# This function takes 3 parameters in the form:
# $1 an integer value of the returned exit code
# $2 an error message to display if $1 is not equal to 0
if [[ "$1" != "0" ]]; then
error "$2"
exit 1
if [[ "$1" != "0" ]]; then
error "$2"
exit 1
fi
}

Expand Down Expand Up @@ -276,7 +276,7 @@ function construct_bom_pom_xml {


# Check local build version
export GALASA_BUILD_TOOL_PATH=${WORKSPACE_DIR}/buildutils/bin/${GALASA_BUILD_TOOL_NAME}
#export GALASA_BUILD_TOOL_PATH=${WORKSPACE_DIR}/buildutils/bin/${GALASA_BUILD_TOOL_NAME}
info "Using galasabld tool ${GALASA_BUILD_TOOL_PATH}"

cmd="${GALASA_BUILD_TOOL_PATH} template \
Expand Down Expand Up @@ -306,7 +306,7 @@ function construct_uber_obr_pom_xml {
cd ${WORKSPACE_DIR}/${project}/dev.galasa.uber.obr

# Check local build version
export GALASA_BUILD_TOOL_PATH=${WORKSPACE_DIR}/buildutils/bin/${GALASA_BUILD_TOOL_NAME}
#export GALASA_BUILD_TOOL_PATH=${WORKSPACE_DIR}/buildutils/bin/${GALASA_BUILD_TOOL_NAME}
info "Using galasabld tool ${GALASA_BUILD_TOOL_PATH}"

cmd="${GALASA_BUILD_TOOL_PATH} template \
Expand Down Expand Up @@ -349,6 +349,8 @@ function build_generated_bom_pom {
cd ${BASEDIR}/galasa-bom

mvn \
--settings ${WORKSPACE_DIR}/obr/settings.xml \
-Dgpg.skip=true \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgalasa.source.repo=${SOURCE_MAVEN} \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ install \
Expand All @@ -367,6 +369,8 @@ function build_generated_uber_obr_pom {
cd ${BASEDIR}/dev.galasa.uber.obr

mvn \
--settings ${WORKSPACE_DIR}/obr/settings.xml \
-Dgpg.skip=true \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgalasa.source.repo=${SOURCE_MAVEN} \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ install \
Expand Down Expand Up @@ -425,21 +429,21 @@ function check_secrets {
h2 "updating secrets baseline"
cd ${BASEDIR}
detect-secrets scan --update .secrets.baseline
rc=$?
check_exit_code $rc "Failed to run detect-secrets. Please check it is installed properly"
rc=$?
check_exit_code $rc "Failed to run detect-secrets. Please check it is installed properly"
success "updated secrets file"

h2 "running audit for secrets"
detect-secrets audit .secrets.baseline
rc=$?
rc=$?
check_exit_code $rc "Failed to audit detect-secrets."

#Check all secrets have been audited
secrets=$(grep -c hashed_secret .secrets.baseline)
audits=$(grep -c is_secret .secrets.baseline)
if [[ "$secrets" != "$audits" ]]; then
if [[ "$secrets" != "$audits" ]]; then
error "Not all secrets found have been audited"
exit 1
exit 1
fi
sed -i '' '/[ ]*"generated_at": ".*",/d' .secrets.baseline
success "secrets audit complete"
Expand Down
4 changes: 3 additions & 1 deletion dependency-download/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {

// Note: The following version number is updated using the set-version.sh tool.
// It is used as the version number of the managers bundle, which contains a yaml
// file which is in a release.yaml, but published to maven, so that the OBR build
// file which is in a release.yaml, but published to maven, so that the OBR build
// can pick it up later.
version = "0.37.0"

Expand All @@ -22,6 +22,8 @@ repositories {
dependencies {
runtimeOnly group: 'dev.galasa', name: 'dev.galasa.managers.manifest', version: version, ext: "yaml"
runtimeOnly group: 'dev.galasa', name: 'dev.galasa.framework.manifest', version: version, ext: "yaml"
runtimeOnly group: 'dev.galasa', name: 'dev.galasa.extensions.manifest', version: version, ext: "yaml"

}

// Download all the files we depend upon.
Expand Down

0 comments on commit 64e3da2

Please sign in to comment.