]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Fix pages and publishing
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 28 Aug 2020 23:23:22 +0000 (02:23 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 28 Aug 2020 23:23:22 +0000 (02:23 +0300)
gitlab #79

.gitlab-ci.yml

index 967eef0233f240ff7030a859e5e762f56544fb2a..c39c6ba5c5c828043fc7925426d4061d0fa2f6e1 100644 (file)
@@ -11,9 +11,17 @@ variables:
 
 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:
@@ -49,6 +57,8 @@ build:
 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}"
@@ -60,7 +70,7 @@ publish:
     - when: never
 
 build-installer:
-  stage: build2
+  stage: build-installer
   needs: [build]
   script:
     - pushd releng/inno-setup
@@ -76,6 +86,8 @@ build-installer:
 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}/
@@ -84,11 +96,10 @@ publish-installer:
 
 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