Fixup woodpecker
authorPhilipp <admin@philipp.info>
Thu, 30 Dec 2021 18:26:35 +0000 (19:26 +0100)
committerPhilipp <admin@philipp.info>
Thu, 30 Dec 2021 18:26:35 +0000 (19:26 +0100)
.woodpecker/.code_standards_check.yml
.woodpecker/.continuous-deployment.yml
.woodpecker/.messages.po_check.yml
.woodpecker/.releaser.yml

index ba31f36..df81376 100644 (file)
@@ -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:
index 2d3a43f..ae720e5 100644 (file)
@@ -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'
index d901286..c04c663 100644 (file)
@@ -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
index 0b2f79f..112507c 100644 (file)
@@ -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: