Loading .gitlab-ci.yml +15 −1 Original line number Diff line number Diff line Loading @@ -12,11 +12,24 @@ build: - cp config.properties.example config.properties - ./build.sh embedded build_installer: build_installer_java8: stage: build tags: - docker image: maven:3-openjdk-8 script: - cp config.properties.example config.properties - cp TASMAN-webapp/local-settings.xml ~/.m2/settings.xml - ./build.sh installer install-jdk8.sh artifacts: paths: - install-jdk8.sh build_installer_java11: stage: build tags: - docker image: maven:3-openjdk-11 script: - cp config.properties.example config.properties - cp TASMAN-webapp/local-settings.xml ~/.m2/settings.xml Loading Loading @@ -46,3 +59,4 @@ upload_installer: - master script: - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file install.sh "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/TASMAN/latest/install.sh"' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file install-jdk8.sh "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/TASMAN/latest/install-jdk8.sh"' build.sh +17 −6 Original line number Diff line number Diff line Loading @@ -132,12 +132,13 @@ function build_installer_package { tar cfz tasman.tar.gz tasman-webapp.war tasman-embedded.jar rm tasman-webapp.war rm tasman-embedded.jar cp install_template.sh install.sh cp install_template.sh $1 config_dir=$(cat config.properties | grep config_directory | cut -d"=" -f2 | xargs) sed -i "s/__CONFIG_DIR__/${config_dir//\//\\/}/g" install.sh cat tasman.tar.gz >> install.sh sed -i "s/__CONFIG_DIR__/${config_dir//\//\\/}/g" $1 cat tasman.tar.gz >> $1 rm tasman.tar.gz echo "TASMAN install.sh built" echo "TASMAN $1 built" } function print_usage { Loading @@ -154,7 +155,12 @@ function print_usage { exit 0 } if [ "$#" -ne 1 ]; then custom_installer=false if [ "$#" -eq 2 ] && [ "$1" == "installer" ]; then custom_installer=true fi if [ "$#" -ne 1 ] && [ "$custom_installer" = false ]; then print_usage fi Loading @@ -175,7 +181,12 @@ case "$1" in build_web_embedded ;; "installer") build_installer_package if [ "$custom_installer" = true ]; then installer_name="$2" else installer_name="install.sh" fi build_installer_package $installer_name ;; *) print_usage Loading Loading
.gitlab-ci.yml +15 −1 Original line number Diff line number Diff line Loading @@ -12,11 +12,24 @@ build: - cp config.properties.example config.properties - ./build.sh embedded build_installer: build_installer_java8: stage: build tags: - docker image: maven:3-openjdk-8 script: - cp config.properties.example config.properties - cp TASMAN-webapp/local-settings.xml ~/.m2/settings.xml - ./build.sh installer install-jdk8.sh artifacts: paths: - install-jdk8.sh build_installer_java11: stage: build tags: - docker image: maven:3-openjdk-11 script: - cp config.properties.example config.properties - cp TASMAN-webapp/local-settings.xml ~/.m2/settings.xml Loading Loading @@ -46,3 +59,4 @@ upload_installer: - master script: - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file install.sh "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/TASMAN/latest/install.sh"' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file install-jdk8.sh "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/TASMAN/latest/install-jdk8.sh"'
build.sh +17 −6 Original line number Diff line number Diff line Loading @@ -132,12 +132,13 @@ function build_installer_package { tar cfz tasman.tar.gz tasman-webapp.war tasman-embedded.jar rm tasman-webapp.war rm tasman-embedded.jar cp install_template.sh install.sh cp install_template.sh $1 config_dir=$(cat config.properties | grep config_directory | cut -d"=" -f2 | xargs) sed -i "s/__CONFIG_DIR__/${config_dir//\//\\/}/g" install.sh cat tasman.tar.gz >> install.sh sed -i "s/__CONFIG_DIR__/${config_dir//\//\\/}/g" $1 cat tasman.tar.gz >> $1 rm tasman.tar.gz echo "TASMAN install.sh built" echo "TASMAN $1 built" } function print_usage { Loading @@ -154,7 +155,12 @@ function print_usage { exit 0 } if [ "$#" -ne 1 ]; then custom_installer=false if [ "$#" -eq 2 ] && [ "$1" == "installer" ]; then custom_installer=true fi if [ "$#" -ne 1 ] && [ "$custom_installer" = false ]; then print_usage fi Loading @@ -175,7 +181,12 @@ case "$1" in build_web_embedded ;; "installer") build_installer_package if [ "$custom_installer" = true ]; then installer_name="$2" else installer_name="install.sh" fi build_installer_package $installer_name ;; *) print_usage Loading