Merge branch 'develop' into feature/halloween
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Simon Vieille 2023-10-18 22:23:52 +02:00
commit 592a9d8688
2 changed files with 9 additions and 10 deletions

View file

@ -1,7 +1,7 @@
variables: variables:
- &volumes - &volumes
- node16_cache:/root/.npm - node16_cache:/root/.npm
- /data/deblan/deblan.io-murph:/data/deblan/deblan.io-murph - /data/deblan/deblan.io-murph:/builds
when: when:
event: [push, pull_request, tag, manual] event: [push, pull_request, tag, manual]
@ -67,11 +67,10 @@ steps:
failure: ignore failure: ignore
cache-build: cache-build:
image: deblan/php:8.1 image: deblan/mage
volumes: *volumes volumes: *volumes
commands: commands:
- apt-get update && apt-get -y install rsync - cd /builds
- cd /data/deblan/deblan.io-murph/
- rsync -az "$CI_WORKSPACE/" "$CI_COMMIT_SHA" - rsync -az "$CI_WORKSPACE/" "$CI_COMMIT_SHA"
services: services:

View file

@ -1,25 +1,25 @@
variables: variables:
- &volumes - &volumes
- /data/deblan/deblan.io-murph:/data/deblan/deblan.io-murph - /data/deblan/deblan.io-murph:/builds
when: when:
event: [deployment] event: [deployment]
skip_clone: true
steps: steps:
app-deploy: app-deploy:
image: deblan/php:8.1 image: deblan/mage
secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory] secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
volumes: *volumes volumes: *volumes
commands: commands:
- apt-get update && apt-get -y install rsync openssh-client - cd "/builds/$CI_COMMIT_SHA"
- cd "/data/deblan/deblan.io-murph/$CI_COMMIT_SHA"
- mkdir "$HOME/.ssh" - mkdir "$HOME/.ssh"
- echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519" - echo "$SSH_PRIV_KEY" > "$HOME/.ssh/id_ed25519"
- chmod 700 "$HOME/.ssh" - chmod 700 "$HOME/.ssh"
- chmod 600 "$HOME/.ssh/id_ed25519" - chmod 600 "$HOME/.ssh/id_ed25519"
- composer global require andres-montanez/magallanes
- cp .mage.yml.dist .mage.yml - cp .mage.yml.dist .mage.yml
- sed -i "s/ssh_user/$SSH_USER/g" .mage.yml - sed -i "s/ssh_user/$SSH_USER/g" .mage.yml
- sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml - sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml
- sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml - sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml
- /root/.config/composer/vendor/bin/mage deploy "$CI_PIPELINE_DEPLOY_TARGET" - mage deploy "$CI_PIPELINE_DEPLOY_TARGET"