This commit is contained in:
parent
d8f3979861
commit
40670b6bfc
117
.woodpecker.yml
117
.woodpecker.yml
|
@ -5,69 +5,71 @@ variables:
|
||||||
- /data/deblan/deblan.io-murph:/data/deblan/deblan.io-murph
|
- /data/deblan/deblan.io-murph:/data/deblan/deblan.io-murph
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
# db-wait:
|
db-wait:
|
||||||
# image: gitnet.fr/deblan/timeout:latest
|
image: gitnet.fr/deblan/timeout:latest
|
||||||
# commands:
|
commands:
|
||||||
# - /bin/timeout -t 30 -v -c 'while true; do nc -z -v db 3306 2>&1 | grep succeeded && exit 0; sleep 0.5; done'
|
- /bin/timeout -t 30 -v -c 'while true; do nc -z -v db 3306 2>&1 | grep succeeded && exit 0; sleep 0.5; done'
|
||||||
#
|
|
||||||
# db-create:
|
db-create:
|
||||||
# image: mariadb:10.3
|
image: mariadb:10.3
|
||||||
# secrets: [mysqldump]
|
secrets: [mysqldump]
|
||||||
# commands:
|
commands:
|
||||||
# - mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
||||||
# - eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
- eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
||||||
# when:
|
when:
|
||||||
# branch: [master, master-*, develop, develop-*]
|
branch: [master, master-*, develop, develop-*]
|
||||||
#
|
|
||||||
app-config:
|
app-config:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
commands:
|
commands:
|
||||||
- echo APP_ENV=prod >> .env.local
|
- echo APP_ENV=prod >> .env.local
|
||||||
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
||||||
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
||||||
#
|
when:
|
||||||
# php-composer:
|
branch: [master, master-*, develop, develop-*, feature/*]
|
||||||
# image: deblan/php:8.1
|
|
||||||
# commands:
|
php-composer:
|
||||||
# - apt-get update && apt-get -y install git
|
image: deblan/php:8.1
|
||||||
# - composer install --no-scripts
|
commands:
|
||||||
#
|
- apt-get update && apt-get -y install git
|
||||||
# db-migrate:
|
- composer install --no-scripts
|
||||||
# image: deblan/php:8.1
|
|
||||||
# environment:
|
db-migrate:
|
||||||
# - PHP=php
|
image: deblan/php:8.1
|
||||||
# commands:
|
environment:
|
||||||
# - ./bin/doctrine-migrate
|
- PHP=php
|
||||||
# when:
|
commands:
|
||||||
# branch: [master, master-*, develop, develop-*, feature/*]
|
- ./bin/doctrine-migrate
|
||||||
#
|
when:
|
||||||
# app-jsroutes:
|
branch: [master, master-*, develop, develop-*, feature/*]
|
||||||
# image: deblan/php:8.1
|
|
||||||
# commands:
|
app-jsroutes:
|
||||||
# - php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
image: deblan/php:8.1
|
||||||
# when:
|
commands:
|
||||||
# branch: [master, master-*, develop, develop-*, feature/*]
|
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
||||||
#
|
when:
|
||||||
# node-build:
|
branch: [master, master-*, develop, develop-*, feature/*]
|
||||||
# image: node:16-alpine
|
|
||||||
# environment:
|
node-build:
|
||||||
# - CPU_COUNT=3
|
image: node:16-alpine
|
||||||
# volumes: *volumes
|
environment:
|
||||||
# commands:
|
- CPU_COUNT=3
|
||||||
# - apk add --no-cache git
|
volumes: *volumes
|
||||||
# - npm install -g svg2ttf ttf2eot ttf2woff2
|
commands:
|
||||||
# - svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
- apk add --no-cache git
|
||||||
# - cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2
|
- npm install -g svg2ttf ttf2eot ttf2woff2
|
||||||
# - ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot
|
- svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
||||||
# - yarn
|
- cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2
|
||||||
# - test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
|
- ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot
|
||||||
# - npm run build
|
- yarn
|
||||||
#
|
- test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
|
||||||
# security-check:
|
- npm run build
|
||||||
# image: gitnet.fr/deblan/osv-detector:v0.9
|
|
||||||
# commands:
|
security-check:
|
||||||
# - osv-detector composer.lock yarn.lock
|
image: gitnet.fr/deblan/osv-detector:v0.9
|
||||||
# failure: ignore
|
commands:
|
||||||
|
- osv-detector composer.lock yarn.lock
|
||||||
|
failure: ignore
|
||||||
|
|
||||||
build_cache:
|
build_cache:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
|
@ -83,6 +85,7 @@ pipeline:
|
||||||
secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
|
secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory]
|
||||||
commands:
|
commands:
|
||||||
- apt-get update && apt-get -y install rsync openssh-client
|
- apt-get update && apt-get -y install rsync openssh-client
|
||||||
|
- cd "/data/deblan/deblan.io-murph/$CI_WORKSPACE"
|
||||||
- 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"
|
||||||
|
|
Loading…
Reference in a new issue