Skip to content

Commit 611e1a1

Browse files
committed
fix(build): Magic mirror is fixed
Before that, magic mirror had a POM file instead of the zip archive.
1 parent 76ba51a commit 611e1a1

2 files changed

Lines changed: 0 additions & 63 deletions

File tree

.gitlab-ci.yml

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -218,62 +218,6 @@ default:
218218
# Check and fail early if maven central credentials are incorrect. When a new token is generated
219219
# on the central publisher portal, it invalidates the old one. This check prevents going further.
220220
# See https://datadoghq.atlassian.net/wiki/x/Oog5OgE
221-
check-maven-proxy-artifact:
222-
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}base
223-
stage: .pre
224-
rules:
225-
- when: on_success
226-
script:
227-
- |
228-
check_jar() {
229-
local label="$1" file="$2"
230-
echo "--- Checking: ${label} ---"
231-
local size
232-
size=$(wc -c < "${file}")
233-
echo "File size: ${size} bytes"
234-
if [ "${size}" -eq 0 ]; then
235-
echo "ERROR: file is empty"
236-
return 1
237-
fi
238-
local magic
239-
magic=$(head -c 4 "${file}" | od -A n -t x1 | tr -d ' \n')
240-
local type
241-
type=$(file "${file}")
242-
echo "File magic bytes: ${magic} | file: ${type}"
243-
if [ "${magic}" = "504b0304" ]; then
244-
echo "OK: valid JAR/ZIP magic bytes"
245-
else
246-
echo "ERROR: not a valid JAR/ZIP file (expected 504b0304, got ${magic})"
247-
if echo "${type}" | grep -qi "xml\|html\|text"; then
248-
echo "--- File content ---"
249-
cat "${file}"
250-
echo "--- End of content ---"
251-
fi
252-
return 1
253-
fi
254-
}
255-
256-
RESULT=0
257-
for VERSION in 1.1.0 1.2.0 1.2.1; do
258-
ARTIFACT_PATH="org/tabletest/tabletest-junit/${VERSION}/tabletest-junit-${VERSION}.jar"
259-
echo "=== Version ${VERSION}: Downloading from Magic Mirror proxy ==="
260-
curl --fail --location --silent --show-error --output "tabletest-junit-${VERSION}-proxy.jar" "${MAVEN_REPOSITORY_PROXY}${ARTIFACT_PATH}" \
261-
&& check_jar "proxy ${VERSION}" "tabletest-junit-${VERSION}-proxy.jar" \
262-
|| RESULT=1
263-
264-
echo "=== Version ${VERSION}: Downloading from Maven Central ==="
265-
curl --fail --location --silent --show-error --output "tabletest-junit-${VERSION}-central.jar" "https://repo1.maven.org/maven2/${ARTIFACT_PATH}" \
266-
&& check_jar "central ${VERSION}" "tabletest-junit-${VERSION}-central.jar" \
267-
|| RESULT=1
268-
done
269-
270-
exit $RESULT
271-
artifacts:
272-
when: always
273-
paths:
274-
- tabletest-junit-*-proxy.jar
275-
- tabletest-junit-*-central.jar
276-
277221
maven-central-pre-release-check:
278222
image: ${BUILDER_IMAGE_REPO}:${BUILDER_IMAGE_VERSION_PREFIX}base
279223
stage: .pre

gradle/repositories.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ repositories {
77
maven {
88
url project.rootProject.property("mavenRepositoryProxy")
99
allowInsecureProtocol = true
10-
content {
11-
// TODO: For unknown reasons `org.tabletest` artifacts resolved as invalid jars via `mavenRepositoryProxy`.
12-
// Build is failing with message: `error reading .gradle/caches/.../tabletest-junit-1.2.0.jar; zip END header not found`
13-
// Revisit this place once `org.tabletest` artifacts will be updated, there is a chance that issue will be fixed.
14-
// Temporary exclude it here so Gradle resolves it directly from mavenCentral().
15-
excludeGroup "org.tabletest"
16-
}
1710
}
1811
}
1912
mavenCentral()

0 commit comments

Comments
 (0)