[wip] add volume for the build
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
8ecb025df8
commit
9e951916a6
134
.woodpecker.yml
134
.woodpecker.yml
|
@ -1,73 +1,84 @@
|
||||||
variables:
|
variables:
|
||||||
- &volumes
|
- &volumes
|
||||||
- node16_cache:/root/.npm
|
- node16_cache:/root/.npm
|
||||||
|
- node16_cache:/root/.npm
|
||||||
|
- /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:
|
||||||
|
# image: mariadb:10.3
|
||||||
|
# secrets: [mysqldump]
|
||||||
|
# commands:
|
||||||
|
# - mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
||||||
|
# - eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
||||||
|
# when:
|
||||||
|
# branch: [master, master-*, develop, develop-*]
|
||||||
|
#
|
||||||
|
# app-config:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# commands:
|
||||||
|
# - echo APP_ENV=prod >> .env.local
|
||||||
|
# - echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
||||||
|
# - echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
||||||
|
# when:
|
||||||
|
# branch: [master, master-*, develop, develop-*]
|
||||||
|
#
|
||||||
|
# php-composer:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# commands:
|
||||||
|
# - apt-get update && apt-get -y install git
|
||||||
|
# - composer install --no-scripts
|
||||||
|
#
|
||||||
|
# db-migrate:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# environment:
|
||||||
|
# - PHP=php
|
||||||
|
# commands:
|
||||||
|
# - ./bin/doctrine-migrate
|
||||||
|
# when:
|
||||||
|
# branch: [master, master-*, develop, develop-*, feature/*]
|
||||||
|
#
|
||||||
|
# app-jsroutes:
|
||||||
|
# image: deblan/php:8.1
|
||||||
|
# commands:
|
||||||
|
# - php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
||||||
|
# when:
|
||||||
|
# branch: [master, master-*, develop, develop-*, feature/*]
|
||||||
|
#
|
||||||
|
# node-build:
|
||||||
|
# image: node:16-alpine
|
||||||
|
# environment:
|
||||||
|
# - CPU_COUNT=3
|
||||||
|
# volumes: *volumes
|
||||||
|
# commands:
|
||||||
|
# - apk add --no-cache git
|
||||||
|
# - npm install -g svg2ttf ttf2eot ttf2woff2
|
||||||
|
# - svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
||||||
|
# - cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2
|
||||||
|
# - ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot
|
||||||
|
# - yarn
|
||||||
|
# - test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
|
||||||
|
# - npm run build
|
||||||
|
#
|
||||||
|
# security-check:
|
||||||
|
# image: gitnet.fr/deblan/osv-detector:v0.9
|
||||||
|
# commands:
|
||||||
|
# - osv-detector composer.lock yarn.lock
|
||||||
|
# failure: ignore
|
||||||
|
|
||||||
db-create:
|
build_cache:
|
||||||
image: mariadb:10.3
|
|
||||||
secrets: [mysqldump]
|
|
||||||
commands:
|
|
||||||
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
|
|
||||||
- eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
|
|
||||||
when:
|
|
||||||
branch: [master, master-*, develop, develop-*]
|
|
||||||
|
|
||||||
app-config:
|
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
commands:
|
|
||||||
- echo APP_ENV=prod >> .env.local
|
|
||||||
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
|
|
||||||
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
|
|
||||||
when:
|
|
||||||
branch: [master, master-*, develop, develop-*]
|
|
||||||
|
|
||||||
php-composer:
|
|
||||||
image: deblan/php:8.1
|
|
||||||
commands:
|
|
||||||
- apt-get update && apt-get -y install git
|
|
||||||
- composer install --no-scripts
|
|
||||||
|
|
||||||
db-migrate:
|
|
||||||
image: deblan/php:8.1
|
|
||||||
environment:
|
|
||||||
- PHP=php
|
|
||||||
commands:
|
|
||||||
- ./bin/doctrine-migrate
|
|
||||||
when:
|
|
||||||
branch: [master, master-*, develop, develop-*, feature/*]
|
|
||||||
|
|
||||||
app-jsroutes:
|
|
||||||
image: deblan/php:8.1
|
|
||||||
commands:
|
|
||||||
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
|
|
||||||
when:
|
|
||||||
branch: [master, master-*, develop, develop-*, feature/*]
|
|
||||||
|
|
||||||
node-build:
|
|
||||||
image: node:16-alpine
|
|
||||||
environment:
|
|
||||||
- CPU_COUNT=3
|
|
||||||
volumes: *volumes
|
volumes: *volumes
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache git
|
- cd /data/deblan/deblan.io-murph/
|
||||||
- npm install -g svg2ttf ttf2eot ttf2woff2
|
- mv "$CI_WORKSPACE" "$CI_COMMIT_SHA"
|
||||||
- svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
when:
|
||||||
- cat assets/fonts/deblan/deblan-icon.ttf | ttf2woff2 > assets/fonts/deblan/deblan-icon.woff2
|
branch: [master, master-*, develop, develop-*, feature/*]
|
||||||
- ttf2eot assets/fonts/deblan/deblan-icon.ttf assets/fonts/deblan/deblan-icon.eot
|
|
||||||
- yarn
|
|
||||||
- test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
|
|
||||||
- npm run build
|
|
||||||
|
|
||||||
security-check:
|
|
||||||
image: gitnet.fr/deblan/osv-detector:v0.9
|
|
||||||
commands:
|
|
||||||
- osv-detector composer.lock yarn.lock
|
|
||||||
failure: ignore
|
|
||||||
|
|
||||||
app-deploy:
|
app-deploy:
|
||||||
image: deblan/php:8.1
|
image: deblan/php:8.1
|
||||||
|
@ -95,4 +106,3 @@ services:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
node16_cache:
|
node16_cache:
|
||||||
temp: {}
|
|
||||||
|
|
Loading…
Reference in a new issue