]> git.mxchange.org Git - friendica.git/blob - .woodpecker/.releaser.yml
Make network counts at the group level system level configurable
[friendica.git] / .woodpecker / .releaser.yml
1 matrix:
2   include:
3     - PHP_MAJOR_VERSION: 7.4
4       PHP_VERSION: 7.4.18
5
6 depends_on:
7   - phpunit
8   - code_standards_check
9
10 # This prevents executing this pipeline at other servers than ci.friendi.ca
11 labels:
12   location: friendica
13   type: releaser
14
15 skip_clone: true
16
17 pipeline:
18   clone:
19     image: alpine/git
20     commands:
21       - git clone $CI_REPO_LINK .
22       - git checkout $CI_COMMIT_BRANCH
23       - git fetch origin $CI_COMMIT_REF
24       - git merge $CI_COMMIT_SHA
25     when:
26       repo: friendica/friendica
27       branch: stable
28       event: tag
29   restore_cache:
30     image: meltwater/drone-cache:dev
31     settings:
32       backend: "filesystem"
33       restore: true
34       cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
35       archive_format: "gzip"
36       mount:
37         - '.composer'
38     volumes:
39       - /tmp/drone-cache:/tmp/cache
40     when:
41       repo: friendica/friendica
42       branch: stable
43       event: tag
44   composer_install:
45     image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
46     commands:
47       - export COMPOSER_HOME=.composer
48       - composer validate
49       - composer install --no-dev --optimize-autoloader
50     when:
51       repo: friendica/friendica
52       branch: stable
53       event: tag
54     volumes:
55       - /etc/hosts:/etc/hosts
56   create_artifacts:
57     image: debian
58     commands:
59       - apt-get update
60       - apt-get install bzip2
61       - mkdir ./build
62       - export VERSION="$(cat VERSION)"
63       - export RELEASE="friendica-full-$VERSION"
64       - export ARTIFACT="$RELEASE.tar.gz"
65       - tar
66         --transform "s,^,$RELEASE/,S"
67         -X mods/release-list-exclude.txt
68         -T mods/release-list-include.txt
69         -cvzf ./build/$ARTIFACT
70       - cd ./build
71       - sha256sum "$ARTIFACT" > "$ARTIFACT.sum256"
72       - chmod 664 ./*
73       - ls -lh
74       - cat "$ARTIFACT.sum256"
75       - sha256sum "$ARTIFACT"
76     when:
77       repo: friendica/friendica
78       branch: stable
79       event: tag
80   sign_artifacts:
81     image: plugins/gpgsign
82     settings:
83       key:
84         from_secret: gpg_key
85       passphrase:
86         from_secret: gpg_password
87       files:
88         - build/*
89       exclude:
90         - build/*.sum256
91       detach_sign: true
92     when:
93       repo: friendica/friendica
94       branch: stable
95       event: tag
96   upload_artifacts:
97     image: alpine
98     secrets:
99       - source: sftp_host
100         target: lftp_host
101       - source: sftp_user
102         target: lftp_user
103       - source: ssh_key
104         target: lftp_key
105     environment:
106       LFTP_PORT: "22"
107       LFTP_SOURCE: "build"
108       LFTP_TARGET: "/http"
109     volumes:
110       - /etc/hosts:/etc/hosts
111     commands:
112       - apk add lftp openssh openssl
113       - touch drone.key
114       - chmod 400 drone.key
115       - echo "$LFTP_KEY" | openssl base64 -A -d > drone.key
116       - lftp -c "
117         set net:timeout 5;
118         set net:max-retries 2;
119         set net:reconnect-interval-base 5;
120         set sftp:auto-confirm true;
121         set sftp:connect-program 'ssh -q -a -x -i drone.key';
122         connect sftp://$LFTP_USER:@$LFTP_HOST:$LFTP_PORT;
123         cd $LFTP_TARGET;
124         mput $LFTP_SOURCE/*;
125         "
126       - rm drone.key
127     when:
128       repo: friendica/friendica
129       branch: stable
130       event: tag