Newer
Older

David Diederich
committed
AWS_BUILD_SUBDIR: provider/indexer-aws/build-aws
AWS_TEST_SUBDIR: testing/indexer-test-aws
AWS_CHART_SUBDIR: devops/aws/chart

David Diederich
committed
AWS_SERVICE: indexer
AWS_SERVICE_GATEWAY: osdu-gateway
GCP_BUILD_SUBDIR: provider/indexer-gcp
GCP_INT_TEST_SUBDIR: testing/indexer-test-gcp
GCP_ENVIRONMENT: dev
GCP_PROJECT: opendes
GCP_TENANT_NAME: opendes
GCP_DEPLOY_ENV: p4d
GCP_DOMAIN: cloud.slb-ds.com
GCP_STORAGE_URL: https://osdu-indexer-dot-opendes.appspot.com/api/storage/v2/
IBM_BUILD_SUBDIR: provider/indexer-ibm
IBM_INT_TEST_SUBDIR: testing/indexer-test-ibm
IBM_HELM_CONFIG_PATH: devops/ibm/ibm-indexer-config
IBM_HELM_DEPLOY_PATH: devops/ibm/ibm-indexer-deploy
AZURE_SERVICE: indexer
AZURE_BUILD_SUBDIR: provider/indexer-azure
AZURE_TEST_SUBDIR: testing/indexer-test-azure
SERVICE_JAVA_VERSION: "17"
- project: "osdu/platform/ci-cd-pipelines"
file: "standard-setup.yml"

David Diederich
committed
- project: "osdu/platform/ci-cd-pipelines"
file: "build/maven.yml"

David Diederich
committed
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/fossa-maven.yml"

David Diederich
committed
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/gitlab-ultimate.yml"

David Diederich
committed
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/aws-global.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/aws-maven.yml"

David Diederich
committed
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/azure.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/ibm.yml"

David Diederich
committed
- project: "osdu/platform/ci-cd-pipelines"
file: "publishing/pages.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "cloud-providers/gc-global.yml"
- local: "devops/gc/pipeline/override-stages.yml"
- local: "devops/aws/pipeline/override-stages.yml"
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
.maven:
image: maven:3.9.3-eclipse-temurin-17
tags: ['osdu-medium']
variables:
MAVEN_REPO_PATH: "$CI_PROJECT_DIR/.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode --settings=$CI_PROJECT_DIR/.mvn/community-maven.settings.xml"
cache:
paths:
- $MAVEN_REPO_PATH
artifacts:
paths:
- ./**/target/*.jar
- ./**/maven-*-output.txt
when: always
expire_in: 2 days
before_script:
- | # Check for the presence of a maven wrapper script
apt-get update && apt-get install -y python3
if [ -e "$CI_PROJECT_DIR/mvnw" ]; then
export MAVEN_BINARY="$CI_PROJECT_DIR/mvnw"
unset MAVEN_CONFIG
mkdir -pv .mvn/wrapper
else
export MAVEN_BINARY="mvn"
fi
- export MAVEN="$MAVEN_BINARY $MAVEN_CLI_OPTS -Dmaven.repo.local=$MAVEN_REPO_PATH"
- echo $MAVEN_BINARY
- echo $MAVEN_CLI_OPTS
- echo $MAVEN_REPO_PATH
- echo $MAVEN
- mkdir -pv $MAVEN_REPO_PATH
- export ALL_MAVEN_BUILD_DIRS_Z=$(mktemp)
- python3 --version
# This scans for all pom.xml files that aren't listed as a child pom (as
# determine by the presence of a <parent> tag).
- |
(python3 | sort -z > $ALL_MAVEN_BUILD_DIRS_Z) <<EOF
from xml.dom.minidom import parse
import os
import sys
allPomFiles = set()
submoduleFiles = set()
for root, dirnames, filenames in os.walk(os.environ['CI_PROJECT_DIR']):
if 'pom.xml' in filenames:
pomFile = os.path.join(root, 'pom.xml')
allPomFiles.add(pomFile)
dom = parse(pomFile)
for modules in dom.getElementsByTagName('modules'):
for module in modules.getElementsByTagName('module'):
submoduleFiles.add(os.path.join(root, module.firstChild.nodeValue, "pom.xml"))
for pomFile in allPomFiles:
if pomFile not in submoduleFiles:
dir = os.path.dirname(pomFile)
sys.stdout.write(dir + '\0')
EOF
- xargs -0rn 1 echo < $ALL_MAVEN_BUILD_DIRS_Z
# This creates a script for running maven, capturing output to a file.
# - First argument is the directory to build from
# - Second argument is the name to use for the logfile
# - The remaining arguments are the maven command to run
- export MAVEN_BUILD=$(tempfile -m 755 -p build -s .sh)
- echo "#!/bin/bash" > $MAVEN_BUILD
- |
cat >> $MAVEN_BUILD <<EOF
id=maven_build_\$(echo "\$@" | sha1sum | head -c 7)
cd "\$1"; shift
outputFile="\$1"; shift
echo "********************************************************************************"
echo -e "\e[0Ksection_start:\$(date +%s):\${id}\r\e[0K\e[1m\$(pwd)\e[0m"
echo -e "\e[32;1m\$MAVEN" "\$@" "\e[0m"
if \$MAVEN "\$@" > "\$outputFile" 2>&1; then
tail -n 25 "\$outputFile";
echo -e "\e[36m**** Showing the last 25 lines of the passed build (above). See Job artifacts for full log details *****\e[0m";
echo -e "\e[0Ksection_end:\$(date +%s):\${id}\r\e[0K"
else
tail -n 200 "\$outputFile";
echo -e "\e[31m**** Showing the last 200 lines of the failed build (above). See Job artifacts for full log details *****\e[0m";
echo -e "\e[0Ksection_end:\$(date +%s):\${id}\r\e[0K"
exit 255;
fi
EOF
# This creates a script for applying the $MAVEN_BUILD script to all build directories
- export MAVEN_FOREACH=$(tempfile -m 755 -p fr-ec -s .sh)
- echo "#!/bin/sh" > $MAVEN_FOREACH
- echo 'xargs -0rI {} $MAVEN_BUILD {} "$@" < $ALL_MAVEN_BUILD_DIRS_Z' >> $MAVEN_FOREACH
gemnasium-maven-dependency_scanning:
variables:
DS_JAVA_VERSION: 17
azure_containerize:
variables:
AZURE_CONTAINERIZE_REPOSITORY: "-b jdk-17 https://gitlab-ci-token:${CI_JOB_TOKEN}@community.opengroup.org/osdu/platform/deployment-and-operations/base-containers-azure/service-base-image"
azure_test:
image: community.opengroup.org:5555/osdu/platform/deployment-and-operations/base-containers-azure/azure-maven17:v0.0.1
image: $CI_REGISTRY/osdu/platform/deployment-and-operations/base-containers-aws/aws-maven/aws-maven:v2.1
tags: [ "aws-internal-test-ubuntu22.04" ]
fossa-analyze:
image: $CI_REGISTRY/divido/fossa-with-cache:v0.9-jdk17
fossa-check-notice:
image: $CI_REGISTRY/divido/fossa-with-cache:v0.9-jdk17