diff --git a/.gitignore b/.gitignore index ebc1a4a..0deb8f7 100644 --- a/.gitignore +++ b/.gitignore @@ -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. diff --git a/ci_build.sh b/ci_build.sh index ae70827..bee933c 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -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}/" @@ -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 @@ -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 } diff --git a/pipelines/configuration.yml b/pipelines/configuration.yml index e8571b9..4bda25f 100644 --- a/pipelines/configuration.yml +++ b/pipelines/configuration.yml @@ -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 diff --git a/pipelines/transformations/addSafeStringSimpleType.xsl b/pipelines/transformations/addSafeStringSimpleType.xsl index 52c37cf..f1767b9 100755 --- a/pipelines/transformations/addSafeStringSimpleType.xsl +++ b/pipelines/transformations/addSafeStringSimpleType.xsl @@ -3,7 +3,7 @@