-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
104 lines (93 loc) · 3.76 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
update-versions:
stage: deploy
image: node
before_script:
- which ssh-agent || ( apt-get update -qy && apt-get install openssh-client -qqy )
- eval `ssh-agent -s`
- echo "${SSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- git config --global user.email "coral-version@localhost"
- git config --global user.name coral-version
- npm install
script:
- mkdir -p data
- node scripts/fetch-itunes.js 1234806557 > data/coral-itunes.json
- node scripts/fetch-itunes.js 1190074407 > data/moon-itunes.json
- node scripts/fetch-google-play.js com.nintendo.znca > data/coral-google-play.json
- node scripts/fetch-google-play.js com.nintendo.znma > data/moon-google-play.json
- node scripts/fetch-nintendo-jp.js nintendo_switch_online_app > data/coral-nintendo-jp.json
- node scripts/fetch-nintendo-jp.js nintendo_switch_parental_controls_app > data/moon-nintendo-jp.json
- node scripts/fetch-nintendo-eu.js 1520024 > data/coral-nintendo-eu.json
- node scripts/fetch-nintendo-eu.js 1497986 > data/moon-nintendo-eu.json
- DISCORD_WEBHOOK_MENTION="&1002674504570515476" node scripts/notify.js coral
- DISCORD_WEBHOOK_MENTION="&1002674644874170398" node scripts/notify.js moon
- node scripts/splatnet3.js > data/splatnet3-app.json
- DISCORD_WEBHOOK_MENTION="&1024054290681184327" node scripts/notify-webapp.js splatnet3
- node scripts/nooklink.js > data/nooklink-app.json
- DISCORD_WEBHOOK_MENTION="&1031566603701207141" node scripts/notify-webapp.js nooklink
- node scripts/tournamentmanager.js > data/tournament-manager-app.json
- DISCORD_WEBHOOK_MENTION="&1174547361742200943" node scripts/notify-webapp.js tournament-manager
- NODE_EXTRA_CA_CERTS=./nintendo-ca-g3.pem node scripts/lhub.js > data/lhub-app.json
- DISCORD_WEBHOOK_MENTION="&1131060995637399582" node scripts/notify-webapp.js lhub
- git add data/* || true
- git status
- git commit -m "Update versions" || true
- git remote rm origin && git remote add origin git@$CI_SERVER_HOST:$CI_PROJECT_PATH.git
- git push origin HEAD:$CI_COMMIT_REF_NAME
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_AUTHOR == "coral-version <coral-version@localhost>"
when: never
- when: always
resource_group: update-versions
retry: 2
pages:
stage: deploy
image: alpine
script:
- mkdir -p public
- cp -R data public
artifacts:
paths:
- public
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main"
changes:
- .gitlab-ci.yml
- data/*
environment:
name: GitLab Pages
url: $CI_PAGES_URL
trigger-analyse/splatnet3:
stage: deploy
trigger:
project: $SPLATNET3_APP_RESOURCES_PROJECT
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main" && $SPLATNET3_APP_RESOURCES_PROJECT
changes:
- data/splatnet3-app.json
trigger-analyse/nooklink:
stage: deploy
trigger:
project: $NOOKLINK_APP_RESOURCES_PROJECT
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main" && $NOOKLINK_APP_RESOURCES_PROJECT
changes:
- data/nooklink-app.json
trigger-analyse/lhub:
stage: deploy
trigger:
project: $LHUB_APP_RESOURCES_PROJECT
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main" && $LHUB_APP_RESOURCES_PROJECT
changes:
- data/lhub-app.json
trigger-analyse/tournament-manager:
stage: deploy
trigger:
project: $TOURNAMENT_MANAGER_RESOURCES_PROJECT
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "main" && $TOURNAMENT_MANAGER_RESOURCES_PROJECT
changes:
- data/tournament-manager-app.json