Skip to content

Commit

Permalink
Fix namespace in safe schema
Browse files Browse the repository at this point in the history
  • Loading branch information
at055612 committed Sep 25, 2024
1 parent 81065b3 commit 40452ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/lib/
/pipelines/generated/
/pipelines/downloaded/
/release_artefacts

# IntelliJ
# Here we ignore everything and create exceptions for what we want to share.
Expand Down
11 changes: 6 additions & 5 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ build_schema_variants() {
if [[ "${BUILD_IS_SCHEMA_RELEASE}" = "true" ]]; then
echo -e "${GREEN}Copying build artefacts for release${NC}"

echo "Deleting generated schemas that are not release artifacts"

# Copy the schemas to the release dir for upload to gh releases
cp "${GENERATED_DIR}"/detection-v*-safe.xsd "${RELEASE_ARTEFACTS_DIR}/"
cp "${GENERATED_DIR}"/detection-v*.xsd "${RELEASE_ARTEFACTS_DIR}/"
Expand Down Expand Up @@ -122,8 +120,9 @@ main() {
local LIB_DIR="${BUILD_DIR}/lib"
local SOURCE_SCHEMA_FILE="detection.xsd"
local TRANSFORMER_JAR_VERSION="v4.1.0"
local TRANSFORMER_JAR_URL_BASE="https://github.com/gchq/event-logging-schema/releases/download"
local TRANSFORMER_JAR_FILENAME="event-logging-transformer-${TRANSFORMER_JAR_VERSION}-all.jar"
local TRANSFORMER_JAR_URL="https://github.com/gchq/event-logging-schema/releases/download/${TRANSFORMER_JAR_VERSION}/${TRANSFORMER_JAR_FILENAME}"
local TRANSFORMER_JAR_URL="${TRANSFORMER_JAR_URL_BASE}/${TRANSFORMER_JAR_VERSION}/${TRANSFORMER_JAR_FILENAME}"

dump_build_info

Expand All @@ -137,10 +136,12 @@ main() {
build_schema_variants

if [[ "${BUILD_IS_SCHEMA_RELEASE}" = "true" ]]; then
prepare_for_schema_release
echo -e "${GREEN}Dumping contents of ${BLUE}${RELEASE_ARTEFACTS_DIR}${NC}"
ls -l "${RELEASE_ARTEFACTS_DIR}"
else
echo -e "${GREEN}Not a release so skipping releaase preparation${NC}"
# Clear out any artefacts to be on the safe side
# Clear out any artefacts to make sure nothing
# can get uploaded to github
rm -rf "${RELEASE_ARTEFACTS_DIR:?}/*"
fi
}
Expand Down
1 change: 1 addition & 0 deletions pipelines/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pipelines:
- "addSafeStringSimpleType.xsl"
- "replaceStringWithSafeString.xsl"
- "removeAnyContentComplexType.xsl"
- "orderElements.xsl"
- "limitOccurrence.xsl"

# This pipeline is for use in pipeline development, e.g. only include
Expand Down
2 changes: 1 addition & 1 deletion pipelines/transformations/addSafeStringSimpleType.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:evt="file://xml/schema/accounting/events"
xmlns:det="detection:1"
version="2.0">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
Expand Down

0 comments on commit 40452ca

Please sign in to comment.