From: Tuukka Lehtonen Date: Mon, 31 Aug 2020 06:16:23 +0000 (+0300) Subject: Fix directories in sysdyn product package & ttest dind installer build X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=206d493d60d2eca51067cb986fa0b6ec2128544a;p=simantics%2Fsysdyn.git Fix directories in sysdyn product package & ttest dind installer build gitlab #79 --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e4f6f675..473d3853 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,7 +12,7 @@ variables: image: registry.simupedia.com/ci-images/maven-eclipse-adoptopenjdk-11:latest -.common_before_script: &common_before_script +.initialize_ssh_connection: &initialize_ssh_connection # Needed because ssh doesn't accept the private key unless it has 600 permissions - chmod 600 "$GITLAB_PRIVATE_KEY" # Initialize SSH connectivity to publish target @@ -24,6 +24,11 @@ stages: - build-installer - deploy +# Workflow enforcement which forces the pipeline to run only if changes are pushed to branches +workflow: + rules: + - if: '$CI_COMMIT_BRANCH' + review: stage: build script: @@ -37,13 +42,14 @@ build: stage: build script: - mvn ${MAVEN_CLI_OPTS} -B clean verify -Dbuild-products=true - - export UNPACKED_PRODUCT_DIR=releng/org.simantics.sysdyn.rcp.product/target/products/Simantics-Sysdyn/win32/win32/x86_64 - - export ZIP_PATH=Simantics-Sysdyn-win64.zip - curl -s http://www.simantics.org/download/jre/$BUNDLED_JRE_VERSION.zip -o $BUNDLED_JRE_VERSION.zip - 7z x -bd $BUNDLED_JRE_VERSION.zip - rm $BUNDLED_JRE_VERSION.zip - - mv $BUNDLED_JRE_VERSION/win32.x86_64 $UNPACKED_PRODUCT_DIR/jre - - 7z a -bd -tzip "${ZIP_PATH}" "${UNPACKED_PRODUCT_DIR}" > /dev/null + - export UNPACKED_PRODUCT_DIR=releng/org.simantics.sysdyn.rcp.product/target/products/Simantics-Sysdyn/win32/win32/x86_64 + - export ZIP_PATH=${CI_PROJECT_DIR}/Simantics-Sysdyn-win64.zip + - mv $BUNDLED_JRE_VERSION/win32.x86_64 $UNPACKED_PRODUCT_DIR/simantics-sysdyn/jre + - pushd ${UNPACKED_PRODUCT_DIR} + - 7z a -bd -tzip "${ZIP_PATH}" simantics-sysdyn > /dev/null artifacts: paths: - releng/org.simantics.sysdyn.repository/target/repository @@ -58,12 +64,14 @@ publish: stage: deploy needs: [build] before_script: - - *common_before_script + - *initialize_ssh_connection script: - - ssh -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS mkdir -p "${PUBLISH_P2_DIR}" - - ssh -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS mkdir -p "${PUBLISH_PRODUCT_DIR}" - - rsync -e "ssh -i $GITLAB_PRIVATE_KEY" -v releng/org.simantics.sysdyn.repository/target/repository/* $GITLAB_USERNAME@$PUBLISH_ADDRESS:${PUBLISH_P2_DIR}/ - - rsync -e "ssh -i $GITLAB_PRIVATE_KEY" -v *.zip $GITLAB_USERNAME@$PUBLISH_ADDRESS:${PUBLISH_PRODUCT_DIR}/ + - echo "${PUBLISH_P2_DIR}" + - echo "${PUBLISH_PRODUCT_DIR}" + #- ssh -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS mkdir -p "${PUBLISH_P2_DIR}" + #- ssh -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS mkdir -p "${PUBLISH_PRODUCT_DIR}" + #- rsync -e "ssh -i $GITLAB_PRIVATE_KEY" -v releng/org.simantics.sysdyn.repository/target/repository/* $GITLAB_USERNAME@$PUBLISH_ADDRESS:${PUBLISH_P2_DIR}/ + #- rsync -e "ssh -i $GITLAB_PRIVATE_KEY" -v *.zip $GITLAB_USERNAME@$PUBLISH_ADDRESS:${PUBLISH_PRODUCT_DIR}/ rules: - if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH =~ /^(release|feature|private)\/.*$/ || $CI_COMMIT_TAG =~ /^v.*$/' when: on_success @@ -71,11 +79,14 @@ publish: build-installer: stage: build-installer + image: docker:dind needs: [build] script: - pushd releng/inno-setup - docker run --rm -i -v $PWD:/work amake/innosetup sysdyn.iss - - mv releng/inno-setup/*.exe ${CI_PROJECT_DIR}/ + - mv output/*.exe ${CI_PROJECT_DIR}/ + tags: + - dind artifacts: paths: - ./*.exe @@ -87,10 +98,11 @@ publish-installer: stage: deploy needs: [build-installer] before_script: - - *common_before_script + - *initialize_ssh_connection script: - - ssh -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS mkdir -p "${PUBLISH_PRODUCT_DIR}" - - rsync -e "ssh -i $GITLAB_PRIVATE_KEY" -v *.exe $GITLAB_USERNAME@$PUBLISH_ADDRESS:${PUBLISH_PRODUCT_DIR}/ + - echo "${PUBLISH_PRODUCT_DIR}" + #- ssh -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS mkdir -p "${PUBLISH_PRODUCT_DIR}" + #- rsync -e "ssh -i $GITLAB_PRIVATE_KEY" -v *.exe $GITLAB_USERNAME@$PUBLISH_ADDRESS:${PUBLISH_PRODUCT_DIR}/ rules: - when: manual @@ -103,4 +115,4 @@ pages: paths: - public rules: - - if: '$CI_COMMIT_BRANCH == "master"' \ No newline at end of file + - if: '$CI_COMMIT_BRANCH == "master"' diff --git a/releng/inno-setup/sysdyn.iss b/releng/inno-setup/sysdyn.iss index 23642e0f..4e28f831 100644 --- a/releng/inno-setup/sysdyn.iss +++ b/releng/inno-setup/sysdyn.iss @@ -14,7 +14,7 @@ WizardSmallImageFile=sysdyn.bmp OutputDir=output [Files] -Source: "sysdyn/*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs +Source: "simantics-sysdyn/*"; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs [Icons] Name: "{group}\Simantics System Dynamics"; Filename: "{app}\Simantics-Sysdyn.exe" diff --git a/releng/org.simantics.sysdyn.rcp.product/pom.xml b/releng/org.simantics.sysdyn.rcp.product/pom.xml index 58ebe183..db9351c0 100644 --- a/releng/org.simantics.sysdyn.rcp.product/pom.xml +++ b/releng/org.simantics.sysdyn.rcp.product/pom.xml @@ -35,15 +35,47 @@ materialize-products - - archive-products - - archive-products - - + + + + Simantics-Sysdyn + simantics-sysdyn + simantics-sysdyn + + + + + + archive-products + + + archive-products + !false + + + + + + org.eclipse.tycho + tycho-p2-director-plugin + ${tycho.version} + + + archive-products + + archive-products + + + + + + + + + diff --git a/releng/org.simantics.sysdyn.tycho.configuration/pom.xml b/releng/org.simantics.sysdyn.tycho.configuration/pom.xml index 5e3fb45d..278f757f 100644 --- a/releng/org.simantics.sysdyn.tycho.configuration/pom.xml +++ b/releng/org.simantics.sysdyn.tycho.configuration/pom.xml @@ -13,6 +13,7 @@ UTF-8 master http://www.simantics.org/download + SNAPSHOT