Compare commits

...

5 Commits

Author SHA1 Message Date
Simon Vieille afa48c6239
ci: update deblan/php version
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/security Pipeline was successful Details
2024-02-21 16:14:05 +01:00
Simon Vieille a94a94b564
update forgejo templates
ci/woodpecker/push/build Pipeline is pending Details
ci/woodpecker/push/security Pipeline is pending Details
2024-02-21 15:45:08 +01:00
Simon Vieille 3e7dcac307
add forgejo templates
ci/woodpecker/push/build Pipeline is pending Details
ci/woodpecker/push/security Pipeline is pending Details
2024-02-21 12:35:47 +01:00
Simon Vieille 54b64cc54e Merge pull request 'refactoring ci steps' (#337) from feature/ci-refactoring into develop
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/security Pipeline was successful Details
Reviewed-on: #337
2024-02-21 12:22:18 +01:00
Simon Vieille 45d4e5f24c refactorint ci steps
ci/woodpecker/push/build Pipeline is pending Details
ci/woodpecker/push/security Pipeline is pending Details
ci/woodpecker/pr/build Pipeline was successful Details
ci/woodpecker/pr/security Pipeline was successful Details
use gitnet.fr/deblan/woodpecker-cache to generate cache
2024-02-21 12:10:02 +01:00
6 changed files with 138 additions and 103 deletions

View File

@ -0,0 +1,30 @@
name: New question
about: Use this template when you don't know how to do something
title: "[Question] "
labels:
- question
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill information.
- type: textarea
id: environment
attributes:
label: Environment
value: |
* Custom menu version:
* Nextcloud version:
* PHP version:
* Web server (Nginx, Apache2):
* Web browser and version (Firefox 80, Google Chrome 74, etc):
validations:
required: true
- type: textarea
id: question
attributes:
label: Question
validations:
required: true

View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://deblan.gitnet.page/side_menu_doc/
about: Official documentation web site
- name: Ask a question in our Matrix room
about: If you prefer a chat-like conversation or in need for quick help, this might be an alternative to opening an issue.
url: https://matrix.to/#/#custommenu:neutralnetwork.org

View File

@ -1,103 +0,0 @@
steps:
"Verify tag and app version":
image: alpine
commands:
- TAG=${CI_COMMIT_TAG/v//}
- grep "<version>$TAG</version>" appinfo/info.xml
when:
event: [tag]
"Install dependencies":
image: node:16
pull: true
commands:
- npm i
when:
event: [tag, push, pull_request, manual]
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
"Check dependencies":
image: gitnet.fr/deblan/osv-detector:v0.10
commands:
- osv-detector package-lock.json
failure: ignore
"Build JS":
image: node:16
commands:
- npm run build
when:
event: [tag, push, pull_request, manual]
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
"Build translations":
image: deblan/php:8.0
commands:
- php bin/generate_l10n.php
when:
event: [tag, push, pull_request, manual]
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
"Create signature":
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"
- mkdir /tmp/app
- cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor /tmp/app
- /usr/src/nextcloud/occ integrity:sign-app
--privateKey=/tmp/side_menu.key
--certificate=/tmp/side_menu.crt
--path=/tmp/app
- mv /tmp/app/appinfo/signature.json appinfo/
when:
event: [tag]
# 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]
"Create 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]
"Push 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]

28
.woodpecker/.build.yml Normal file
View File

@ -0,0 +1,28 @@
variables:
volumes: &volumes
- /data/${CI_REPO}:/builds
when:
event: [tag, push, pull_request, manual]
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
steps:
"Install dependencies":
image: node:16
pull: true
commands:
- npm i
"Build JS":
image: node:16
commands:
- npm run build
"Build translations":
image: deblan/php:8.3
commands:
- php bin/generate_l10n.php
"Build cache":
image: gitnet.fr/deblan/woodpecker-cache
volumes: *volumes

55
.woodpecker/.publish.yml Normal file
View File

@ -0,0 +1,55 @@
variables:
volumes: &volumes
- /data/${CI_REPO}:/builds
- /var/www/html/artifacts:/var/www/html/artifacts
depends_on:
- build
when:
event: [tag]
steps:
"Create signature":
image: nextcloud:25
secrets: [app_certificate, app_public_certificate]
volumes: &volumes
environment:
SQLITE_DATABASE: /var/www/data/data.db
NEXTCLOUD_ADMIN_USER: admin
NEXTCLOUD_ADMIN_PASSWORD: admin
commands:
- cd "/builds/$CI_COMMIT_SHA"
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
- mkdir /tmp/app
- cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor /tmp/app
- /usr/src/nextcloud/occ integrity:sign-app
--privateKey=/tmp/side_menu.key
--certificate=/tmp/side_menu.crt
--path=/tmp/app
- mv /tmp/app/appinfo/signature.json appinfo/
"Create package":
image: deblan/php:8.3
volumes: *volumes
secrets: [app_certificate]
commands:
- cd "/builds/$CI_COMMIT_SHA"
- 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
"Push release":
image: plugins/gitea-release
volumes: *volumes
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//}/*

17
.woodpecker/.security.yml Normal file
View File

@ -0,0 +1,17 @@
variables:
volumes: &volumes
- /data/${CI_REPO}:/builds
depends_on:
- build
skip_clone: true
steps:
"Check dependencies":
image: gitnet.fr/deblan/osv-detector:v0.10
volumes: *volumes
commands:
- cd "/builds/$CI_COMMIT_SHA"
- osv-detector package-lock.json
failure: ignore