summaryrefslogblamecommitdiff
path: root/.gitlab-ci.yml
blob: c0574e6cf14b23b911120b4c2a15a574a995a04c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

       
        











                       
                     

          










                               

          





























                            
              






                            


               
                     





                                     
              



                      
                                                                                 

                                                             

          

                       
         
              


                            
                 
                          
                                                                                                                                                                                                                                                         


                                          
                           
                 


                                                                      
                                                                                                    
                                 




            
stages:
- test
- deploy

image: debian:stable
before_script:
  - uname -a

testxml:
  stage: test
  tags:
  - glados
  script:
  - ./.tools/testxml.sh
  - pwd
  allow_failure: true
  except:
  - stable
image: debian:buster

pngcheck:
  stage: test
  script:
  - ./.tools/pngcheck.sh

imagemagiccheck:
  stage: test
  script:
  - ./.tools/imagemagiccheck.sh
  except:
  - stable

manaplus:
  stage: test
  script:
  - ./.tools/manaplus.sh
  image: debian:unstable
  artifacts:
    paths:
    - shared
    when: always
    expire_in: 3 week

newlines:
  stage: test
  tags:
  - lightweight
  script:
  - ./.tools/newlines.sh
  artifacts:
    paths:
    - shared
    when: always
    expire_in: 3 week

.contributors:
  stage: test
  script:
  - ./.tools/contributors.sh
  - pwd

.licensecheck:
  stage: test
  tags:
  - lightweight
  script:
  - ./.tools/licensecheck.sh
  allow_failure: true


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
  - mkdir public
  - git clone https://git.themanaworld.org/CR/tools.git tools
  - pwd
  - ls -lh
  - ls -lh ..
  - mv tools ../toolset
  - cd ..
  - cd toolset
  - cp adler32/adler32 /bin/
  - cd update
  - ./createnew.sh
  - ls -lh upload
  - cp -rv upload/ public/
  - echo '<title>static update server</title><a href="TMW2.zip">TMW2.zip</a><br><a href="Audio.zip">Audio.zip</a><br><a href="Maps.zip">Maps.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 ../../clientdata/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 65001 -o StrictHostKeyChecking=no' -aHv --delete public/ $MYHOST:$FILE_LOCATION
  - echo "Deploy script finished"
  artifacts:
    paths:
    - public
  only:
  - stable