side_menu/.woodpecker.yml
Simon Vieille 112e669723
reduce release task as packaging (ci)
move translation build in specific step (ci)
2023-03-17 17:22:35 +01:00

77 lines
2.1 KiB
YAML

pipeline:
dependencies:
image: node:16
pull: true
commands:
- npm i
- npm link @nextcloud/vue
when:
event: [tag, push, pull_request]
branch: [master, develop, feature/*, translations]
osv_detector:
image: gitnet.fr/deblan/docker-osv-detector:v0.9
commands:
- osv-detector package-lock.json
failure: ignore
build_js:
image: node:16
commands:
- npm run build
when:
branch: [master, develop, feature/*, translations]
event: [push, pull_request]
build_php:
image: deblan/php:8.0
commands:
- php bin/generate_l10n.php
when:
branch: [master, develop, feature/*, translations]
event: [push, pull_request]
code_quality:
image: sonarsource/sonar-scanner-cli
secrets: [sonar_token, sonar_host, sonar_project]
commands:
- sonar-scanner
-Dsonar.projectKey=$SONAR_PROJECT
-Dsonar.sources=.
-Dsonar.host.url=$SONAR_HOST
-Dsonar.pullrequest.key=$CI_COMMIT_PULL_REQUEST
-Dsonar.pullrequest.branch=$CI_COMMIT_SOURCE_BRANCH
-Dsonar.pullrequest.base=$CI_COMMIT_TARGET_BRANCH
failure: ignore
when:
event: [pull_request]
package:
image: deblan/php:8.0
volumes:
- /var/www/html/artifacts:/var/www/html/artifacts
secrets: [app_certificate]
commands:
- apt-get update
- apt-get install -y zip make
- mkdir -p "$HOME/.nextcloud/certificates"
- echo "$APP_CERTIFICATE" > "$HOME/.nextcloud/certificates/side_menu.key"
- export VERSION=$(grep "<version>" appinfo/info.xml | grep -o "[0-9]*\.[0-9]*\.[0-9]*" --color=never)
- export RELEASE_DIRECTORY="/var/www/html/artifacts/deblan/side_menu"
- make release
when:
event: [tag]
release:
image: plugins/gitea-release
volumes:
- /var/www/html/artifacts:/var/www/html/artifacts
settings:
api_key:
from_secret: gitnet_api_key
base_url: https://gitnet.fr
note: ${CI_COMMIT_MESSAGE}
files: /var/www/html/artifacts/deblan/side_menu/${CI_COMMIT_TAG/v//}/*
when:
event: [tag]