Commit Graph

223 Commits

Author SHA1 Message Date
Patryk Osmaczko f7042e4b9e refactor: extract layers in StatusMessage
Extracted:
- TransportLayer
- EncryptionLayer
- ApplicationLayer
2023-11-08 21:46:22 +01:00
Jakub Sokołowski 5aa9eb913d
fix: drop unnecessary wrappers, fix shebangs
Also make the hook installation run by default.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-11-07 18:02:06 +01:00
Ivan Belyakov cb3a88f93a fix(build): avoid removing untracked git changes by `make clean`
Use `make deep-clean` for deep cleaning
2023-11-03 07:37:48 +01:00
Jakub Sokołowski 494c6707ba
ci: parametrize DB port for unit tests
Otherwise we can't run tests in parallel on the same host. Also the
container name has to be different depending on executor.

Resolves errors like:
```
docker: Error response from daemon: Conflict.
    The container name "/status-go-test-db" is already in use by container "123...".
    You have to remove (or rename) that container to be able to reuse that name.
```
Resolves: https://github.com/status-im/status-go/issues/4040

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-09-18 19:54:21 +02:00
Anton Iakimov 7a9845c6e2
ci: hide `go test` output to the file on CI
Let's hide stdout of go tests to the files.
In case of failed test - it should be included in junit report anyway and shown in Jenkins.

Closes #3543
2023-09-13 10:53:38 +02:00
Igor Sirotin 5422b867f3
Hotfix: mark `Chat` and `Pin` archive messages as seen (#3992) (#3999) 2023-09-07 13:33:20 +03:00
Andrea Maria Piana 9a1443d716 Test generate handlers 2023-08-28 14:17:33 +01:00
frank 38415849cd fix generate_handlers_template.txt 2023-08-28 14:17:33 +01:00
Andrea Maria Piana 8dd1b66d69 Always use protobufs by reference & generate handlers 2023-08-22 12:08:54 +01:00
Jakub Sokołowski c0c74010e7
ci: set GOCACHE to ws tmp to avoid cache poisoning
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-08-18 18:01:19 +02:00
Jakub Sokołowski 78b61ffe2c
ci: drop wrongly calling make install-lint
Linting tools should already be installed by Nix, and we should use
them.

Also switching most shells to pure mode to see what happens.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-08-18 18:01:18 +02:00
Anton Iakimov 3a41a2550a
ci: generate junit reports for unit tests 2023-08-17 15:29:18 +02:00
Andrea Maria Piana 5f55a7bcc8 fetch develop before checking 2023-06-28 19:58:21 +01:00
Andrea Maria Piana 75c9374420 Add migration check script 2023-06-23 12:01:30 +01:00
Jakub Sokołowski c1509637a5
ci: bump tests timeout to 30 minutes
The test running time can be a bit unpredictable due to server load,
which can result in tests that finish in 5 minutes, or over 20.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-06-02 12:38:43 +02:00
Siddarth Kumar d37b605796
adjust padding for QR Images (#3510) 2023-06-01 13:41:01 +05:30
Jakub Sokołowski 589cc965e3
ci: add timeouts to all Jenkinsfiles
This is especially important for tests.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-29 12:40:08 +02:00
Andrea Maria Piana 959e370389 config: add new Push notifications fleet
Also drop no longer existing `eth.test` fleet.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-05-19 17:29:18 +01:00
Jakub Sokołowski c8161a5fa4
ci: upgrade Xcode version required to 14.3
Using `sandbox: false` for `nix.shell()` call to avoid failures in
Xcode wrapper derivation due to missing permissions:
```
error: builder for '/nix/store/xxx-xcode-wrapper-14.3.drv' failed with exit code 1;
       last 2 log lines:
       > /nix/store/yyy-stdenv-darwin/setup: line 1391: /nix/store/yyy-xcode-wrapper-14.3/bin/xcodebuild: Operation not permitted
       > We require xcodebuild version: 14.3
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-28 11:02:51 +02:00
Jakub Sokołowski 6fec4ea205
ci: upgrade Go to 1.19 in main Dockerfile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-27 13:13:46 +02:00
Jakub Sokołowski b7bf24b7e4
make: generalize building of Docker image
This way we can easily build an image for `spiff-workflow` for example:
```
make docker-image BUILD_TARGET=spiff-workflow DOCKER_IMAGE_NAME=statusteam/spiff-workflow
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-27 13:13:45 +02:00
Jakub Sokołowski 124dd73928
ci: drop go-1.19 label, Nix provides correct Go
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-19 20:18:10 +02:00
RichΛrd ba1ba1ac02
chore: use go 1.19 and bump go-libp2p (#3371)
* chore: use go 1.19 and bump go-libp2p

* chore: bump golangci-lint

* chore: update go version in shell.nix
2023-04-07 20:23:07 +02:00
Jakub Sokołowski 22bc76c39f
ci: use Nix shell for Linux library builds
Just noticed that was the only one not using it.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-04-06 01:12:14 +02:00
Siddarth Kumar 6ac2308ee1
Re-organise the code to be more modular (#3172) 2023-03-01 17:23:17 +05:30
Jakub Sokołowski 6f58ce2c61
ci: add commit to Docker image tag pushed
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-22 13:29:29 +01:00
Jakub Sokołowski 34f7354e6c
ci: upgrade Jenkins library to fix getting version
Fixed in:
https://github.com/status-im/status-jenkins-lib/pull/56

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-22 13:29:28 +01:00
Jakub Sokołowski 78c677742e
ci: delete Postgres DB container after tests run
Otherwise we end up with leftover containers hanging around:
```
admin@linux-03.he-eu-hel1.ci.devel:~ % d ps -a
CONTAINER ID   NAMES                IMAGE                 CREATED          STATUS
6c683f3083bf   boring_yonath        postgres:9.6-alpine   20 minutes ago   Created
b3d462925a91   dazzling_albattani   postgres:9.6-alpine   7 days ago       Created
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-21 13:57:10 +01:00
Jakub Sokołowski 08403df4c0
ci: use M1 Macs for iOS builds
Should be faster, and is the same a how we do it for mobile app.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-02-16 11:52:48 +01:00
Jakub Sokołowski 0048b70466
ci: use WORKSPACE_TMP for TMPDIR to not abuse /run
Because a lot of tests use `MkdirTemp` and do not clean up.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-01-03 16:54:22 +01:00
Jakub Sokołowski 9dd80e7f1e
ci: use Nix shell to provide Android SDK for builds
Installing the SDK via Ansible is prone to error and not exactly
reproduceable. This way we can also track the exact tooling version as
used in Status Mobile app:
https://github.com/status-im/status-mobile/blob/develop/nix/pkgs.nix

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-12-05 15:48:27 +01:00
Jakub Sokołowski 5b941cab0c
ci: drop unnecessary go get command
Not sure why that was added at some point, but it doesn't seem
necessary, and even if it was `go install` should be used.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-10-24 11:26:38 +02:00
Richard Ramos 11e432d341
feat: allow passing variables to docker-compose and fix var name (#2821) 2022-09-15 15:41:00 -04:00
Samuel Hawksby-Robinson 41cb9d7bea Added httptest.NewServer to DecodeFromURL and CryptoOnRamp tests 2022-09-09 15:07:48 +01:00
Samuel Hawksby-Robinson 399090a44b Added fix for pinging a remote service in tests 2022-09-09 15:07:48 +01:00
Samuel Hawksby-Robinson 45b287370a Implemented more comprehensive file compression to handle large files 2022-09-05 16:06:04 +01:00
yqrashawn d1ef1a3e31
fix: apt -> apt-get (#2775)
there's a default /usr/bin/apt cli in macos
2022-08-03 11:26:31 +02:00
Jakub Sokołowski 6d38b86059
scripts: fix protobuf version from Nix
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-26 17:36:10 +02:00
Jakub Sokołowski 8191f24ef3
docker: upgrade Golang version to 1.18
Otherwise it fails with:
```
build github.com/status-im/status-go/cmd/statusd: cannot load github.com/lucas-clemente/quic-go/internal/qtls: no Go source files
```

We also add missing `g++` compiler for `go-libutp` to fix:
```
go build github.com/anacrolix/go-libutp: g++: exec: "g++": executable file not found in $PATH
```

As well as install `libgcc` and `libstdc++` to avoids failures like this:
```
Error loading shared library libstdc++.so.6: No such file or directory (needed by /usr/local/bin/statusd)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by /usr/local/bin/statusd)
Error relocating /usr/local/bin/statusd: _Znwm: symbol not found
Error relocating /usr/local/bin/statusd: _ZdlPvm: symbol not found
Error relocating /usr/local/bin/statusd: _Unwind_Resume: symbol not found
Error relocating /usr/local/bin/statusd: __gxx_personality_v0: symbol not found
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-07-26 13:07:07 +02:00
Andrea Maria Piana 4d15ae8a85 Upgrade to go 1.18 2022-05-11 12:39:54 +01:00
Jakub Sokołowski 57e5fd66fa ci: pin builds to hosts with specific Go version
Otherwise Go version upgrades are a pain due to randomly hitting a host
with newer version of Go compiler.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-05-11 12:25:35 +02:00
Jakub Sokołowski ede86b68ce gen_config.sh: add default retenetion of 30 days
Related to this question on our Discourse:
https://discuss.status.im/t/status-node-growing-storage-size/2970

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-01-25 19:28:54 +01:00
Jakub Sokołowski 8089c03464 ci: specify macos host architecture in labels
Since now we have a 5th Gen Mac Mini with `arm64` M1 CPU.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-11-29 11:34:51 +01:00
Jakub Sokołowski bbafc704b1 ci: fix release process broken by missing suffix
This fixes a type of CI failure:
https://ci.status.im/job/status-go/job/manual/1010
Which results in:
```
java.lang.NoSuchMethodError: No such DSL method 'suffix' found among steps ...
```
Also use release functions provided by `status-jenkins-lib`.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-29 08:51:32 +02:00
Jakub Sokołowski 116f76e189 Makefile: pin tool versions, use go install
Using latest version every time is just asking for weird random issues.

This commit in `gomobile` has made Go `1.16` required:
80cb72e7af

Since we upgarded Go to 1.16 on CI hosts we can now use the recommended
method of installing tools, which is using `go install`.

In addition to that I've pinned other tools that we install to specific
versions, and dropped use of `modvendor` fork thanks to merging of:
https://github.com/goware/modvendor/pull/13

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-17 14:39:30 +02:00
Jakub Sokołowski 7594dd4800 install_deps.sh: fix format, add NixOS support
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-09-17 14:39:30 +02:00
Anthony Laibe 07651d4d06
feat: enable wallet without network binding (#2349)
* feat: enable wallet without network binding

* feat: make transfer network aware

* feat: allow to pass initial networks via config

* fix: nil check and feed

* feat: Add documentation with better function name

* fix: do not init the manager more than once

* fix: PR feedbacks

* Bump version

* Update Jenkinsfile.tests

* Convert int to string

Co-authored-by: RichΛrd <info@richardramos.me>
2021-09-09 16:28:54 +02:00
Jakub Sokołowski 034f3bfec3 get_enode.sh: --retry-connrefused instead --retry-all-errors
The `--retry-all-errors` flag was added only in Curl `7.71.0`:
https://github.com/curl/curl/commit/b995bb58

So it fails on older distrubutions with:
```
curl: option --retry-all-errors: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
```

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-30 14:24:29 +02:00
Jakub Sokołowski 5c408f8ce4 compose/systemd: fix completion of make targets
Something goes wrong when parsing and GRN definition is treated as target.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 16:45:47 +02:00
Jakub Sokołowski 06587bd1bc get_enode.sh: add retries to account for slow start
Containers can be slow to start, but still want that enode.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 16:45:47 +02:00