Commit graph

133 commits

Author SHA1 Message Date
96f265a4a2
[CI/CD] Use a base Alpine image instead of python:3.11-alpine.
Weird errors seem to happen on Twine on that image:

```
Traceback (most recent call last):
  File "/usr/bin/twine", line 5, in <module>
    from twine.__main__ import main
  File "/usr/lib/python3.11/site-packages/twine/__init__.py", line 32, in <module>
    import importlib.metadata
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 17, in <module>
    from . import _adapters, _meta
  File "/usr/lib/python3.11/importlib/metadata/_adapters.py", line 3, in <module>
    import email.message
  File "/usr/lib/python3.11/email/message.py", line 15, in <module>
    from email import utils
  File "/usr/lib/python3.11/email/utils.py", line 28, in <module>
    import random
  File "/usr/lib/python3.11/random.py", line 49, in <module>
    from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
ImportError: Error relocating /usr/lib/python3.11/lib-dynload/math.cpython-311-x86_64-linux-musl.so: _PyModule_Add: symbol not found
```
2024-05-26 03:31:25 +02:00
0445087699
[CI/CD] Removed hanging dependency. 2024-05-26 01:47:05 +02:00
bef027fc07
[CI/CD] Just remove the sync-stable-branch step. 2024-05-26 01:46:04 +02:00
7fa0dbda7b
Split Drone CI steps into separate shell scripts.
A fully self-contained 1.5k LoC Drone file isn't very maintainable, and
it makes it hard to reuse parts that are shared across multiple steps
(like SSH and git configuration).
2024-05-23 00:17:55 +02:00
a5826892dd
[CI/CD] Added python-setuptools to build dependencies.
It's apparently been extracted out of the core Python library on the
version 3.12 of the interpreter.
2024-05-02 03:31:41 +02:00
a5b7e2b52e
[CI/CD] Fixed version format for the platypush-git Arch package.
The format should be `<MAJ>.<MIN>.<PATCH>.r<REVISION>.g<HEAD>`.

The `g` prefix was missing.
2024-01-19 01:06:47 +01:00
b097a4c1f4
Remove also the dist directory in the build-ui step before running npm run build 2024-01-08 22:56:05 +01:00
1ff8cfd240
[CI/CD] A more robust logic to regenerate components.json.gz.
We shouldn't rely on `git diff`. Even when the underlying source code
hasn't changed, and the cache is dumped with `sort_keys=True`, some of
the generated snippets of docstrings may change, leading the CI/CD
pipeline to get stuck in a push loop.

We should instead look for changes to the plugins, backends, events and
schemas folders before and after the CI/CD trigger to infer if we need
to regenerate the file.
2024-01-06 23:45:51 +01:00
bb6f859262
Fix: typo in git commit argument. 2024-01-06 22:43:38 +01:00
f85fc02cce
Fix: git should be installed earlier in the update-components-cache step. 2024-01-06 22:41:25 +01:00
6e1ab92298
New components cache management.
The cache is no longer generated at runtime when the application runs -
which may take quite a while, especially on fresh installations.

A `components.json.gz` file is instead generated by the CI/CD process on
every commit to the main branch, and distributed with the package.

The application will read this file when the `inspect` plugin is first
initialized.

This also means that we can no longer cache the `install_cmds`, as they
change depending on the target OS. A new
`application.get_install_commands` action has now been made available to
the UI, so it can get the correct installation commands at runtime.
2024-01-06 22:21:59 +01:00
e3ea315276
[CI/CD] Create a .skipci file on build-ui.
If new commits are pushed by the step then another pipeline will be
triggered. We shouldn't proceed with the following steps.
2023-12-30 00:04:35 +01:00
6673bb4c19
[CI/CD] Always copy new apt repo root. 2023-12-26 05:53:54 +01:00
581fe6101f
[CI/CD] Debug pipeline by printing content of Packages file. 2023-12-26 05:45:34 +01:00
4b4a8c7aaa
[CI/CD] Another fix. 2023-12-26 05:40:56 +01:00
a50ea8dd8e
[CI/CD] Change order of deb cleanup commands. 2023-12-26 05:39:25 +01:00
15c1ac3823
[CI/CD] Clean up any existing *.deb packages before uploading new one. 2023-12-26 05:36:29 +01:00
f3f1e96ad9
[CI/CD] Attempt to fix empty branch_dir. 2023-12-26 05:21:46 +01:00
89757d4366
[CI/CD] A more robust way of detecting the presence of a main version package. 2023-12-26 05:08:21 +01:00
995077eea7
[CI/CD] Fixed off-by-one version number issue. 2023-12-26 04:37:05 +01:00
e8a337752a
[CI/CD] Print names of generated deb packages. 2023-12-25 15:14:18 +01:00
2e1ed9b176
pip on Alpine now also requires --break-system-packages 2023-12-18 13:50:02 +01:00
6b68fa607b
(Possible) fix for multi-line breaks in apt/index.txt. 2023-11-18 15:37:17 +01:00
c055edab8f
Moved all list files generation logic within the update-apt-repo step. 2023-11-18 15:33:22 +01:00
e5ca96e004
Fixed Drone CI command indentation. 2023-11-18 15:27:34 +01:00
dcf9561ad1
[CI/CD] Regenerate the Debian repo list files when the repo is rebuilt. 2023-11-18 14:16:49 +01:00
acf0e0f34f [CI/CD] Moved the chmod commands outside of the if. 2023-10-23 19:46:07 +00:00
f9ce5e3cd2 [CI/CD] chmod should always be the final step in update-apt-repo. 2023-10-23 19:38:51 +00:00
532427eeb5 [CI/CD] The chmod section should be on the update-apt-repo step. 2023-10-23 19:30:26 +00:00
4afd1b68d0 [Fix] s/chown/chmod/g typo fix 2023-10-23 19:26:21 +00:00
8c0c551aa5 [CI/CD] Ensure that public repo dirs are always readable by everyone. 2023-10-23 19:23:23 +00:00
ea88ab7f6c
[Docs] Clone and build wiki pages on docs.platypush.tech. 2023-10-21 22:54:49 +02:00
0eae6fd48d
Misc dependencies and mock fixes.
- `iputils` should be an explicit system dependency for `ping`.
  Some minimal systems (like some Docker images) may not have the `ping`
  command installed out of the box.

- `hid` and `marshmallow_dataclass` should be among the auto-mocked
  modules.
2023-10-20 01:02:35 +02:00
1e2ffc121f
[CI/CD] Added yum install platypush-git line to index.txt. 2023-10-19 23:56:48 +02:00
a915dd1e1f
[CI/CD] Regenerate the full apt and rpm repos in Drone pipeline.
This also includes:

- index.txt
- pubkey.txt
- RPM repo definition
2023-10-19 23:46:36 +02:00
5d3c7679b6
[Fix] Added mistakenly removed PKG_NAME variable. 2023-10-19 21:54:03 +02:00
6fb432d7bb
[CI/CD] S3 bucket replaced with a local folder.
Managing concurrent copies over s3fs through CI/CD is a hassle.
Input/output errors abound and the steps are also slow.
2023-10-19 21:48:59 +02:00
1f1eadf962
[CI/CD] Added -o nomixupload option to s3fs. 2023-10-19 20:57:25 +02:00
2197ce7c78
Revert "[CI/CD] Trying to prevent race conditions on S3 access from Drone CI automation" 2023-10-19 20:11:42 +02:00
111cb5e62a
[CI/CD] Trying to prevent race conditions on S3 access from Drone CI automation 2023-10-19 20:06:51 +02:00
ff02d2a3c8
[CI/CD] Trying to prevent race conditions on S3 access from Drone CI automation 2023-10-19 20:05:51 +02:00
3e00a05301
[CI/CD] Restored awscli process for update-debian-oldstable-packages.
The `s3fs` flow seems to have problems on the Debian oldstable image.
2023-10-14 15:35:11 +02:00
d4c790925b
[CI/CD] Changed order of the S3 bucket mount step in deb builds.
It seems that s3fs may fail if two clients try to mount the same
resource with the same token at the same time.
2023-10-14 15:26:07 +02:00
1649808efc
[CI/CD] Do all the apt repo operations on a temporary folder.
`update-apt-repo` should first copy the existing repo root on the S3
bucket to a local temporary directory, so we don't do expensive (and
very slow) file operations on the s3fs filesystem.

After everything is done, we should do a current->old, tmp->current, rm old
dance to update the repo on S3.
2023-10-14 15:16:41 +02:00
465ff87f15
[CI/CD] Replaced awscli with s3fs. 2023-10-14 15:16:40 +02:00
8ef67012ed [Drone CI] git push in the build-ui step needs a -f flag. 2023-10-12 00:57:31 +00:00
fd7037d048
Added git checkout and rebase commands to sync-stable-branch step. 2023-10-01 23:31:46 +02:00
98b51362e9
[#317] Added Drone step to sync the stable branch on tag.
Closes: #317
2023-10-01 23:17:53 +02:00
1732bfa82c
Fixed _default_docstring regex. 2023-09-30 14:36:08 +02:00
acb40bd5fd
The test step should also install all dependencies via apk add. 2023-09-30 13:36:28 +02:00