summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusalva Jesusalva <jesusalva@themanaworld.org>2022-10-27 19:29:07 +0000
committerJesusalva Jesusalva <jesusalva@themanaworld.org>2022-10-27 19:29:07 +0000
commit2286000309141a58f7ec2fba7770a459ff4a9ee1 (patch)
tree370656bbb3f6348f4f9d0709be52d0c4ba59e6cd
parent21d056cef37ffd0127dc469e107699988ed1aea7 (diff)
downloadclientdata-2286000309141a58f7ec2fba7770a459ff4a9ee1.tar.gz
clientdata-2286000309141a58f7ec2fba7770a459ff4a9ee1.tar.bz2
clientdata-2286000309141a58f7ec2fba7770a459ff4a9ee1.tar.xz
clientdata-2286000309141a58f7ec2fba7770a459ff4a9ee1.zip
Update .gitlab-ci.yml file
-rw-r--r--.gitlab-ci.yml73
1 files changed, 52 insertions, 21 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index df624bd7..2349f6d3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,8 @@
stages:
- test
- deploy
-- fail
-- ok
-image: debian:stable
+image: ubuntu:18.04
before_script:
- uname -a
@@ -13,6 +11,8 @@ testxml:
script:
- ./.tools/testxml.sh
- pwd
+ except:
+ - stable
pngcheck:
stage: test
@@ -23,15 +23,20 @@ imagemagiccheck:
stage: test
script:
- ./.tools/imagemagiccheck.sh
+ except:
+ - stable
licensecheck:
stage: test
script:
- ./.tools/licensecheck.sh
+ allow_failure: true
+ except:
+ - stable
manaplus:
stage: test
- image: debian:unstable
+ image: debian:stable
script:
- ./.tools/manaplus.sh
artifacts:
@@ -50,7 +55,7 @@ newlines:
when: always
expire_in: 3 week
-pages:
+.oldpages:
stage: deploy
script:
- ./.tools/deploy.sh
@@ -61,22 +66,48 @@ pages:
only:
- master
-ok_job:
- stage: ok
- script:
- - pwd
- - echo $CI_BUILD_REF_NAME
- when: on_success
- dependencies: []
- variables:
- GIT_STRATEGY: none
-fail_job:
- stage: fail
+pages:
+ stage: deploy
+ image: ubuntu:18.04
+ variables:
+ GIT_STRATEGY: clone
+ GIT_SUBMODULE_STRATEGY: recursive
+ GIT_DEPTH: "1"
+ UPDATE_DIR: "../../../public"
+ UPDATE_HTTP: "none"
+ CC: "make"
+ tags:
+ - glados
script:
+ - apt-get -qq update
+ - apt-get install -qq -y make zip zlib1g-dev zlibc python ssh rsync python3 git wget
+ - mkdir public
+ - git clone https://git.themanaworld.org/revolt/tools.git tools
- pwd
- - echo $CI_BUILD_REF_NAME
- when: on_failure
- dependencies: []
- variables:
- GIT_STRATEGY: none
+ - ls -lh
+ - ls -lh ..
+ - mv tools ../toolset
+ - cd ..
+ - cd toolset/update
+ - wget https://git.themanaworld.org/ml/tools/-/raw/master/adler32/adler32
+ - cp adler32 /bin/
+ - ./createnew.sh
+ - ls -lh upload
+ - cp -rv upload/ public/
+ - echo '<title>static update server</title><a href="TMW.zip">TMW.zip</a><br><a href="TMW-music.zip">TMW-music.zip</a><br><a href="news.txt">news.txt</a><br><a href="resources.xml">resources.xml</a>' > public/index.html
+ - pwd
+ - cp -rv public ../../public
+ - cp -rvu public ../../client-data/public
+ - echo "Now deploying..."
+ - ls -lh public
+ - mkdir -p ~/.ssh
+ - echo "${SSH_PRIVATE_KEY}" | base64 -d | tr -d '\r' > ~/.ssh/id_rsa
+ - chmod -R 700 ~/.ssh
+ - rsync -e 'ssh -p 22 -o StrictHostKeyChecking=no' -aHv --delete public/ $MYHOST:$FILE_LOCATION
+ - echo "Deploy script finished"
+ artifacts:
+ paths:
+ - public
+ only:
+ - stable