From 05f7e4264ce899e9c759937805d71171f4afaf60 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 30 Dec 2021 19:26:35 +0100 Subject: [PATCH] Fixup woodpecker --- .woodpecker/.code_standards_check.yml | 27 ++++++++++++++++++++++++++ .woodpecker/.continuous-deployment.yml | 21 +++++++++++++++----- .woodpecker/.messages.po_check.yml | 6 +++--- .woodpecker/.releaser.yml | 22 ++++++++++++++++----- 4 files changed, 63 insertions(+), 13 deletions(-) diff --git a/.woodpecker/.code_standards_check.yml b/.woodpecker/.code_standards_check.yml index ba31f36b4..df81376f9 100644 --- a/.woodpecker/.code_standards_check.yml +++ b/.woodpecker/.code_standards_check.yml @@ -18,12 +18,39 @@ pipeline: - git merge $CI_COMMIT_SHA when: event: pull_request + restore_cache: + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - /tmp/drone-cache:/tmp/cache + when: + event: pull_request composer_install: image: composer commands: + - export COMPOSER_HOME=.composer - ./bin/composer.phar run cs:install when: event: pull_request + rebuild_cache: + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + rebuild: true + cache_key: '{{ .Repo.Name }}_phpcs_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '.composer' + volumes: + - /tmp/drone-cache:/tmp/cache + when: + event: pull_request check: image: friendicaci/php-cs commands: diff --git a/.woodpecker/.continuous-deployment.yml b/.woodpecker/.continuous-deployment.yml index 2d3a43f1d..ae720e54b 100644 --- a/.woodpecker/.continuous-deployment.yml +++ b/.woodpecker/.continuous-deployment.yml @@ -3,10 +3,6 @@ matrix: - PHP_MAJOR_VERSION: 7.4 PHP_VERSION: 7.4.18 -depends_on: - - code_standards_check - - messages.po_check - platform: releaser/release # This prevents executing this pipeline at other servers than ci.friendi.ca skip_clone: true @@ -33,6 +29,21 @@ pipeline: repo: friendica/friendica-addons branch: [ develop, '*-rc' ] event: push + restore_cache: + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" + archive_format: "gzip" + mount: + - '.composer' + volumes: + - /tmp/drone-cache:/tmp/cache + when: + repo: friendica/friendica-addons + branch: [ develop, '*-rc' ] + event: push composer_install: image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION} commands: @@ -50,10 +61,10 @@ pipeline: commands: - apt-get update - apt-get install bzip2 + - mkdir ./build - export VERSION="$(cat VERSION)" - export RELEASE="friendica-addons-$VERSION" - export ARTIFACT="$RELEASE.tar.gz" - - mkdir ./build - tar --exclude='.tx' --exclude='.git' diff --git a/.woodpecker/.messages.po_check.yml b/.woodpecker/.messages.po_check.yml index d9012869a..c04c663d0 100644 --- a/.woodpecker/.messages.po_check.yml +++ b/.woodpecker/.messages.po_check.yml @@ -1,8 +1,5 @@ skip_clone: true -branches: - exclude: [ stable ] - pipeline: clone_friendica_base: image: alpine/git @@ -33,3 +30,6 @@ pipeline: - /check-addons.sh when: event: pull_request + +branches: + exclude: [ stable ] \ No newline at end of file diff --git a/.woodpecker/.releaser.yml b/.woodpecker/.releaser.yml index 0b2f79f57..112507c4a 100644 --- a/.woodpecker/.releaser.yml +++ b/.woodpecker/.releaser.yml @@ -3,9 +3,6 @@ matrix: - PHP_MAJOR_VERSION: 7.4 PHP_VERSION: 7.4.18 -depends_on: - - code_standards_check - platform: releaser/release # This prevents executing this pipeline at other servers than ci.friendi.ca skip_clone: true @@ -32,18 +29,33 @@ pipeline: repo: friendica/friendica-addons branch: stable event: tag + restore_cache: + image: meltwater/drone-cache:dev + settings: + backend: "filesystem" + restore: true + cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" + archive_format: "gzip" + mount: + - '.composer' + volumes: + - /tmp/drone-cache:/tmp/cache + when: + repo: friendica/friendica-addons + branch: stable + event: tag composer_install: image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION} commands: - export COMPOSER_HOME=.composer - composer validate - composer install --no-dev --optimize-autoloader - volumes: - - /etc/hosts:/etc/hosts when: repo: friendica/friendica-addons branch: stable event: tag + volumes: + - /etc/hosts:/etc/hosts create_artifacts: image: debian commands: