-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
39 lines (33 loc) · 794 Bytes
/
Copy path.gitlab-ci.yml
File metadata and controls
39 lines (33 loc) · 794 Bytes
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
# SAMP (open.mp) Gitlab CI configuration file
workflow:
rules:
- if: '$CI_COMMIT_TAG'
when: always
- if: $DOCKER_IMAGE_TAG != null
when: always
- when: never
stages:
- deploy
.deploy_common:
stage: deploy
when: manual
before_script:
- eval $(ssh-agent -s)
- chmod 400 "$DEPLOY_SSH_KEY"
- ssh-add "$DEPLOY_SSH_KEY"
script:
- export DOCKER_HOST=ssh://$DEPLOY_USER@$DEPLOY_TARGET
- scp ./gamemodes/crl2.amx $DEPLOY_USER@$DEPLOY_TARGET:/opt/open.mp/data/gamemodes/crl2.amx
- docker restart samp-server
deploy-stage:
environment:
name: stage
variables:
APP_ENVIRONMENT: 'stage'
extends: .deploy_common
deploy-prod:
environment:
name: prod
variables:
APP_ENVIRONMENT: 'prod'
extends: .deploy_common