image: registry.simupedia.com/ci-images/maven-eclipse-adoptopenjdk-11:latest
+
+.common_before_script: &common_before_script
+ # 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
+ # StrictHostKeyChecking=no needed on first connection, because .ssh/known_hosts doesn't contain the target host key.
+ - ssh -o StrictHostKeyChecking=no -i $GITLAB_PRIVATE_KEY $GITLAB_USERNAME@$PUBLISH_ADDRESS echo
+
stages:
- build
- - build2
+ - build-installer
- deploy
review:
publish:
stage: deploy
needs: [build]
+ before_script:
+ - *common_before_script
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}"
- when: never
build-installer:
- stage: build2
+ stage: build-installer
needs: [build]
script:
- pushd releng/inno-setup
publish-installer:
stage: deploy
needs: [build-installer]
+ before_script:
+ - *common_before_script
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}/
pages:
stage: deploy
- needs: [build]
script:
- - echo "Publishing wiki"
+ - cp -r bundles/org.simantics.sysdyn.wiki public
artifacts:
paths:
- - org.simantics.sysdyn.wiki
+ - public
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
\ No newline at end of file