diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1dc938894f946ebff7327b5b6472c2dca5935e42..a14072a2ae0bc9da63edb33624e03aed22502b77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,8 +44,10 @@ variables: BETA_KEY: "beta" MAIN_KEY: "stable" RELEASE_KEY: "beta" - RELEASE_PATH: "public/updatesite/${RELEASE_KEY}" - RELEASE_PAGE: "https://top.etsi.org/top-extras/updatesite/${RELEASE_KEY}" + RELEASE_BASE_PATH: "public/updatesite" + RELEASE_PATH: "${RELEASE_BASE_PATH}/${RELEASE_KEY}" + RELEASE_BASE_URL: "https://top.etsi.org/top-extras/updatesite" + RELEASE_PAGE: "${RELEASE_BASE_URL}/${RELEASE_KEY}" STANDALONE_LOCATION: "plugins/org.etsi.mts.tdl.standalone/target" STANDALONE_NAME: "org.etsi.mts.tdl.standalone-1.0.0-SNAPSHOT-shadow.jar" STANDALONE_PATH: "${STANDALONE_LOCATION}/${STANDALONE_NAME}" @@ -236,26 +238,28 @@ pages: artifacts: true script: # Get the previous GitLab Pages content (otherwise other beta/stable branch gets removed..) - - rm -rf /var/lib/apt/lists/* - - apt update - - apt-cache gencaches - - apt install -y zip unzip - - zip --help - - set +e - - curl --fail "$CI_PAGES_URL/content.zip" -o "content.zip" - - if [ -e "content.zip" ]; then unzip "content.zip"; rm "content.zip"; fi - - set -e + #- rm -rf /var/lib/apt/lists/* + #- apt update + #- apt-cache gencaches + #- apt install -y zip unzip + #- zip --help + #- set +e + #- curl --fail "$CI_PAGES_URL/content.zip" -o "content.zip" + #- if [ -e "content.zip" ]; then unzip "content.zip"; rm "content.zip"; fi + #- set -e # Cleanup content? -> remove content in release path? # Add/update content - echo $CI_PAGES_URL - echo $RELEASE_PATH - mkdir -p $RELEASE_PATH - - rm -rf $RELEASE_PATH/* - - cp -r -f $SITE_PATH/* $RELEASE_PATH - - ls -la $RELEASE_PATH + #- rm -rf $RELEASE_PATH/* + - chmod +x prepare.sh + - ./prepare.sh $RELEASE_BASE_URL $RELEASE_KEY $SITE_PATH $RELEASE_BASE_PATH + - cp -r -f $SITE_PATH/* $RELEASE_PATH + - find $RELEASE_BASE # Zip the content and publish the zip again - - zip -r "content.zip" "public" - - mv "content.zip" "public/" + #- zip -r "content.zip" "public" + #- mv "content.zip" "public/" # - mv $SITE_ARCHIVE $RELEASE_PATH/content.zip artifacts: paths: