Commit 34f540d7 authored by fallenstardust's avatar fallenstardust
parents d4ec7bfe 4107230a
stages: stages:
- json - prepare
- prepare2
- pack - pack
- deploy - deploy
...@@ -27,9 +28,22 @@ variables: ...@@ -27,9 +28,22 @@ variables:
# - cd .. # - cd ..
# - exit $(cat dist/redtext.txt | wc -l) # - exit $(cat dist/redtext.txt | wc -l)
json: merge_databases:
stage: json stage: prepare
dependencies: [] dependencies: []
tags:
- linux
script:
- apt update && apt -y install sqlite3
- ls cdbs/test-release.cdb | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 test-release.cdb
artifacts:
paths:
- test-release.cdb
json:
stage: prepare2
dependencies:
- merge_databases
tags: tags:
- linux - linux
image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86 image: git-registry.mycard.moe/mycard/ygopro-cdb-descgen:master-x86
...@@ -52,6 +66,7 @@ json: ...@@ -52,6 +66,7 @@ json:
pack: pack:
stage: pack stage: pack
dependencies: dependencies:
- merge_databases
- json - json
tags: tags:
- linux - linux
...@@ -77,7 +92,8 @@ pack: ...@@ -77,7 +92,8 @@ pack:
server: server:
stage: pack stage: pack
dependencies: [] dependencies:
- merge_databases
tags: tags:
- linux - linux
script: script:
...@@ -116,6 +132,12 @@ upload_data: ...@@ -116,6 +132,12 @@ upload_data:
only: only:
- tags - tags
upload_version_json:
extends: .minio
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/version.txt s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/version.txt
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release.json
deploy: deploy:
stage: deploy stage: deploy
dependencies: dependencies:
...@@ -139,10 +161,12 @@ deploy: ...@@ -139,10 +161,12 @@ deploy:
.deploy_to_server: .deploy_to_server:
stage: deploy stage: deploy
dependencies:
- server
tags: tags:
- linux - linux
dependencies:
- server
variables:
SERVER_PATH: ~/ygopro-super-pre/expansions
script: script:
- apt update && apt -y install openssh-client rsync coreutils - apt update && apt -y install openssh-client rsync coreutils
- mkdir ~/.ssh - mkdir ~/.ssh
...@@ -150,7 +174,7 @@ deploy: ...@@ -150,7 +174,7 @@ deploy:
- ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts - ssh-keyscan $SERVER_HOST >> ~/.ssh/known_hosts
- echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa - echo $NANAHIRA_SSH_KEY | base64 --decode > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/* - chmod 600 ~/.ssh/*
- rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:~/ygopro-super-pre/expansions - rsync -4cavzP --exclude=pics --delete ./server-dist/ $SERVER_USER@$SERVER_HOST:$SERVER_PATH
only: only:
- master - master
- tags - tags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment