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