Update .gitlab-ci.yml
This commit is contained in:
parent
a70bbbc77e
commit
bf0f0c309f
|
@ -39,27 +39,56 @@ build:resourcepack:
|
|||
- resourcepack/*
|
||||
- .gitlab-ci.yml
|
||||
|
||||
deploy:
|
||||
deploy:datapacks:
|
||||
stage: deploy
|
||||
script:
|
||||
- ls -alh . ./datapacks
|
||||
# - 'which ssh-agent || ( apk add --no-cache openssh-client )'
|
||||
# - apk add --no-cache rsync
|
||||
- 'which ssh-agent || ( apk add --no-cache openssh-client )'
|
||||
- apk add --no-cache rsync
|
||||
|
||||
# - eval $(ssh-agent -s)
|
||||
# - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||
# - mkdir -p ~/.ssh
|
||||
# - chmod 700 ~/.ssh
|
||||
# - echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||
# - chmod 644 ~/.ssh/known_hosts
|
||||
#
|
||||
# - cd datapacks
|
||||
# - rsync -avz out/ "$SERVER_HOST":"$WPD_FOLDER" --delete --exclude bukkit
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
# - ssh "$SERVER_HOST" mcrcon -H localhost -p minecraft "minecraft:reload"
|
||||
- cd datapacks
|
||||
- rsync -avz out/ "$SERVER_HOST":"$WPD_FOLDER" --delete --exclude bukkit
|
||||
|
||||
# - cd ../resourcepack-out
|
||||
# - sha1sum resourcepack.zip
|
||||
- ssh "$SERVER_HOST" mcrcon -H localhost -p minecraft "minecraft:reload"
|
||||
|
||||
- cd ../resourcepack-out
|
||||
- sha1sum resourcepack.zip
|
||||
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
changes:
|
||||
- datapacks/**/*
|
||||
- datapacks/*
|
||||
- .gitlab-ci.yml
|
||||
|
||||
deploy:resourcepack:
|
||||
stage: deploy
|
||||
script:
|
||||
- 'which ssh-agent || ( apk add --no-cache openssh-client )'
|
||||
- apk add --no-cache rsync
|
||||
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||
- chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
- cd ../resourcepack-out
|
||||
- shasum= $(sha1sum resourcepack.zip | awk '{ print $1 }'
|
||||
- ssh "$SERVER_HOST" mcrcon -H localhost -p minecraft "minecraft:say Server restart in 2 minutes"
|
||||
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
changes:
|
||||
- resourcepack/**/*
|
||||
- resourcepack/*
|
||||
- .gitlab-ci.yml
|
||||
|
|
Loading…
Reference in New Issue