]> git.mxchange.org Git - friendica-addons.git/blob - .woodpecker/.continuous-deployment.yml
„audon/messages.po“ löschen
[friendica-addons.git] / .woodpecker / .continuous-deployment.yml
1 # This prevents executing this pipeline at other servers than ci.friendi.ca
2 labels:
3   location: friendica
4   type: releaser
5
6 skip_clone: true
7
8 pipeline:
9   clone_friendica_base:
10     image: alpine/git
11     commands:
12       - git clone https://github.com/friendica/friendica.git .
13       - git checkout $CI_COMMIT_BRANCH
14     when:
15       repo: friendica/friendica-addons
16       branch: [ develop, '*-rc' ]
17       event: push
18   clone_friendica_addon:
19     image: alpine/git
20     commands:
21       - git config --global user.email "no-reply@friendi.ca"
22       - git config --global user.name "Friendica"
23       - git clone $CI_REPO_LINK addon
24       - cd addon/
25       - git checkout $CI_COMMIT_BRANCH
26       - git fetch origin $CI_COMMIT_REF
27       - git merge $CI_COMMIT_SHA
28     when:
29       repo: friendica/friendica-addons
30       branch: [ develop, '*-rc' ]
31       event: push
32   restore_cache:
33     image: meltwater/drone-cache:dev
34     settings:
35       backend: "filesystem"
36       restore: true
37       cache_key: "{{ .Repo.Name }}_php7.4_{{ arch }}_{{ os }}"
38       archive_format: "gzip"
39       mount:
40         - '.composer'
41     volumes:
42       - /tmp/drone-cache:/tmp/cache
43     when:
44       repo: friendica/friendica-addons
45       branch: [ develop, '*-rc' ]
46       event: push
47   composer_install:
48     image: friendicaci/php7.4:php7.4.33
49     commands:
50       - export COMPOSER_HOME=.composer
51       - composer validate
52       - composer install --no-dev --optimize-autoloader
53     volumes:
54       - /etc/hosts:/etc/hosts
55     when:
56       repo: friendica/friendica-addons
57       branch: [ develop, '*-rc' ]
58       event: push
59   create_artifacts:
60     image: debian
61     commands:
62       - apt-get update
63       - apt-get install bzip2
64       - mkdir ./build
65       - export VERSION="$(cat VERSION)"
66       - export RELEASE="friendica-addons-$VERSION"
67       - export ARTIFACT="$RELEASE.tar.gz"
68       - tar
69         --exclude='.tx'
70         --exclude='.git'
71         --exclude='.editorconfig'
72         --exclude='.gitattributes'
73         --exclude='.gitignore'
74         --exclude='.woodpecker'
75         --exclude='**/*/messages.po'
76         -cvzf ./build/$ARTIFACT addon/
77       - cd ./build
78       - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
79       - chmod 664 ./*
80       - ls -lh
81       - cat "$ARTIFACT.sum256"
82       - sha256sum "$ARTIFACT"
83     when:
84       repo: friendica/friendica-addons
85       branch: [ develop, '*-rc' ]
86       event: push
87   sign_artifacts:
88     image: plugins/gpgsign
89     settings:
90       key:
91         from_secret: gpg_key
92       passphrase:
93         from_secret: gpg_password
94       files:
95         - build/*
96       exclude:
97         - build/*.sum256
98       detach_sign: true
99     when:
100       repo: friendica/friendica-addons
101       branch: [ develop, '*-rc' ]
102       event: push
103   publish_artifacts:
104     image: alpine
105     commands:
106       - cp -fr build/* /tmp/friendica_files/
107     volumes:
108       - files:/tmp/friendica_files
109     when:
110       repo: friendica/friendica-addons
111       branch: [ develop, '*-rc' ]
112       event: push