side_menu/.woodpecker.yml

104 lines
3.1 KiB
YAML
Raw Normal View History

2023-09-29 16:46:56 +02:00
steps:
2024-02-12 23:29:58 +01:00
"Verify tag and app version":
image: alpine
commands:
- TAG=${CI_COMMIT_TAG/v//}
- grep "<version>$TAG</version>" appinfo/info.xml
when:
event: [tag]
2024-02-12 23:29:58 +01:00
"Install dependencies":
2023-03-17 17:10:56 +01:00
image: node:16
pull: true
2022-07-25 10:34:24 +02:00
commands:
2023-03-19 09:35:59 +01:00
- npm i
2022-07-25 10:34:24 +02:00
when:
2023-11-04 13:38:28 +01:00
event: [tag, push, pull_request, manual]
2023-09-29 16:46:56 +02:00
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
2022-07-25 10:34:24 +02:00
2024-02-12 23:29:58 +01:00
"Check dependencies":
2023-03-19 09:45:51 +01:00
image: gitnet.fr/deblan/osv-detector:v0.10
2023-01-01 14:52:30 +01:00
commands:
- osv-detector package-lock.json
failure: ignore
2024-02-12 23:29:58 +01:00
"Build JS":
2023-03-17 17:10:56 +01:00
image: node:16
2022-07-25 10:34:24 +02:00
commands:
2023-03-17 17:13:31 +01:00
- npm run build
2022-07-25 10:34:24 +02:00
when:
2023-11-04 13:39:32 +01:00
event: [tag, push, pull_request, manual]
2023-09-29 16:46:56 +02:00
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
2022-07-25 10:34:24 +02:00
2024-02-12 23:29:58 +01:00
"Build translations":
image: deblan/php:8.0
commands:
- php bin/generate_l10n.php
when:
2023-11-04 13:38:28 +01:00
event: [tag, push, pull_request, manual]
2023-11-04 13:39:32 +01:00
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
2024-02-12 23:29:58 +01:00
"Create signature":
2023-03-31 14:07:19 +02:00
image: nextcloud:25
secrets: [app_certificate, app_public_certificate]
environment:
SQLITE_DATABASE: /var/www/data/data.db
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD: admin
commands:
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
2023-04-16 14:16:18 +02:00
- mkdir /tmp/app
- cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor /tmp/app
2023-03-31 14:07:19 +02:00
- /usr/src/nextcloud/occ integrity:sign-app
--privateKey=/tmp/side_menu.key
--certificate=/tmp/side_menu.crt
2023-04-16 14:16:18 +02:00
--path=/tmp/app
- mv /tmp/app/appinfo/signature.json appinfo/
2023-04-16 14:24:17 +02:00
when:
event: [tag]
2023-03-31 14:07:19 +02:00
2023-05-25 13:39:21 +02:00
# check-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]
2022-12-03 23:47:55 +01:00
2024-02-12 23:29:58 +01:00
"Create package":
2023-03-17 17:10:56 +01:00
image: deblan/php:8.0
2022-07-25 10:34:24 +02:00
volumes:
- /var/www/html/artifacts:/var/www/html/artifacts
secrets: [app_certificate]
commands:
2023-03-17 17:10:56 +01:00
- apt-get update
- apt-get install -y zip make
2022-07-25 10:34:24 +02:00
- 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:
2022-07-26 14:49:29 +02:00
event: [tag]
2022-07-26 14:31:01 +02:00
2024-02-12 23:29:58 +01:00
"Push release":
2022-07-26 14:31:01 +02:00
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}
2022-07-26 15:27:56 +02:00
files: /var/www/html/artifacts/deblan/side_menu/${CI_COMMIT_TAG/v//}/*
2022-07-26 14:31:01 +02:00
when:
event: [tag]