<commit_before>#!/bin/bash

# This is the CI build script that is run by travis/Github and does the following:
# * Start up a DB to run tests against
# * Compile the app and run all the tests
# * Build the app jars and distribution zips
# * Build the docker images
# If this is a push on a release branch, e.g. '7.0':
# * Push the docker images with floating tags, e.g.  '7-LATEST' '7.0-LATEST'
# If this is a tagged release it will also:
# * Build an entity relationship diagram
# * Build a SQL DDL script for the DB
# * Gather all release artefacts into one place
# * Push the docker images
# * Create a Github release and add all the artefacts

# Depoendencies for this script:
# * bash + standard shell tools (sed, grep, etc.)
# * docker
# * docker-compose

# The actual build is run inside a docker container which has all the
# dependencies for performing the build and will spawn other docker
# containers to perform sub parts of the build, e.g. the UI build.

# exit script on any error
set -eo pipefail

STROOM_DOCKER_REPO="gchq/stroom"
STROOM_PROXY_DOCKER_REPO="gchq/stroom-proxy"
STROOM_DOCKER_CONTEXT_ROOT="stroom-app/docker/."
STROOM_PROXY_DOCKER_CONTEXT_ROOT="stroom-proxy/stroom-proxy-app/docker/."
VERSION_FIXED_TAG=""
SNAPSHOT_FLOATING_TAG=""
MAJOR_VER_FLOATING_TAG=""
MINOR_VER_FLOATING_TAG=""
# This is a whitelist of branches to produce docker builds for
BRANCH_WHITELIST_REGEX='(^dev$|^master$|^[0-9]+\.[0-9]+$)'
RELEASE_VERSION_REGEX='^v[0-9]+\.[0-9]+.*$'
LATEST_SUFFIX="-LATEST"
# This is the branch containing the current stable release of stroom
# It is used to determine which releases we push the swagger ui to ghpages for
# As 7 is still in beta, this is currently 6.1
CURRENT_STROOM_RELEASE_BRANCH="6.1"
# The version of stroom-resources used for running the DB
STROOM_RESOURCES_GIT_TAG="stroom-stacks-v7.0-beta.118"
SWAGGER_UI_GIT_TAG="v3.49.0"
doDockerBuild=false
STROOM_RESOURCES_DIR="${BUILD_DIR}/stroom-resources" 
RELEASE_ARTEFACTS_DIR="${BUILD_DIR}/release_artefacts"
RELEASE_MANIFEST="${RELEASE_ARTEFACTS_DIR}/release-artefacts.txt"
DDL_DUMP_DIR="${BUILD_DIR}/build"
DDL_DUMP_FILE="${DDL_DUMP_DIR}/stroom-database-schema-${BUILD_TAG}.sql"

# Shell Colour constants for use in 'echo -e'<commit_msg>Change CI build to use beta.192-2 (mysql 8.0.28)<commit_after>#!/bin/bash

# This is the CI build script that is run by travis/Github and does the following:
# * Start up a DB to run tests against
# * Compile the app and run all the tests
# * Build the app jars and distribution zips
# * Build the docker images
# If this is a push on a release branch, e.g. '7.0':
# * Push the docker images with floating tags, e.g.  '7-LATEST' '7.0-LATEST'
# If this is a tagged release it will also:
# * Build an entity relationship diagram
# * Build a SQL DDL script for the DB
# * Gather all release artefacts into one place
# * Push the docker images
# * Create a Github release and add all the artefacts

# Depoendencies for this script:
# * bash + standard shell tools (sed, grep, etc.)
# * docker
# * docker-compose

# The actual build is run inside a docker container which has all the
# dependencies for performing the build and will spawn other docker
# containers to perform sub parts of the build, e.g. the UI build.

# exit script on any error
set -eo pipefail

STROOM_DOCKER_REPO="gchq/stroom"
STROOM_PROXY_DOCKER_REPO="gchq/stroom-proxy"
STROOM_DOCKER_CONTEXT_ROOT="stroom-app/docker/."
STROOM_PROXY_DOCKER_CONTEXT_ROOT="stroom-proxy/stroom-proxy-app/docker/."
VERSION_FIXED_TAG=""
SNAPSHOT_FLOATING_TAG=""
MAJOR_VER_FLOATING_TAG=""
MINOR_VER_FLOATING_TAG=""
# This is a whitelist of branches to produce docker builds for
BRANCH_WHITELIST_REGEX='(^dev$|^master$|^[0-9]+\.[0-9]+$)'
RELEASE_VERSION_REGEX='^v[0-9]+\.[0-9]+.*$'
LATEST_SUFFIX="-LATEST"
# This is the branch containing the current stable release of stroom
# It is used to determine which releases we push the swagger ui to ghpages for
# As 7 is still in beta, this is currently 6.1
CURRENT_STROOM_RELEASE_BRANCH="6.1"
# The version of stroom-resources used for running the DB
STROOM_RESOURCES_GIT_TAG="stroom-stacks-v7.0-beta.192-2"
SWAGGER_UI_GIT_TAG="v3.49.0"
doDockerBuild=false
STROOM_RESOURCES_DIR="${BUILD_DIR}/stroom-resources" 
RELEASE_ARTEFACTS_DIR="${BUILD_DIR}/release_artefacts"
RELEASE_MANIFEST="${RELEASE_ARTEFACTS_DIR}/release-artefacts.txt"
DDL_DUMP_DIR="${BUILD_DIR}/build"
DDL_DUMP_FILE="${DDL_DUMP_DIR}/stroom-database-schema-${BUILD_TAG}.sql"

# Shell Colour constants for use in 'echo -e'
{'fraction_non_alphanumeric': 0.10410654827968924, 'fraction_numerical': 0.013984461709211986, 'mean_word_length': 5.181069958847736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2788590', 'n_tokens_mistral': 1657, 'n_tokens_neox': 1578, 'n_words': 498}