Commit Graph

199 Commits

Author SHA1 Message Date
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
Jakub Sokołowski b631b93bd1 compose: upgrade image, fix RPC listening address
Also move data dir to folder named after contaienr.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 16:45:47 +02:00
Jakub Sokołowski cd2b53643d rcp.sh: curl wrapper for easier RPC calls
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 11:23:25 +02:00
Jakub Sokołowski e4540a0853 add 3 instead of 2 static nodes to default configs
Each fleet has 3 data centers, so it makes sense to use 3.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 11:23:25 +02:00
Jakub Sokołowski 315f63ea43 gen_config.sh: default HTTPHost to localhost
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 11:23:25 +02:00
Jakub Sokołowski b805d0b9f6 gen_config.sh: add MaxPeers default of 50
I think this setting should be more explicit and visible in the config.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-24 11:23:25 +02:00
Jakub Sokołowski 2b566db298 drop AdvertiseAddr from default configuration
It appears it is being used by Rendezvous, and if that protocol is not
being used there is no need to set `AdvertiseAddr` either.

I also adjusted all the `Makefile`s to not depend on `PUBLIC_IP` variable.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-19 16:53:31 +02:00
Jakub Sokołowski 5ac8b873b8 config/cli/fleet: disable Rendezvous, drop nodes
Since we've broken LibP2P communication with our Rendezvous nodes
somewhere after `v0.79.11` we should not enable it by defaults since it
generates errors like these:
```
failed to dial 16Uiu2...d687e4: all dials failed
failed to negotiate security protocol: protocol not supported
```
Since normal bootnodes are defined as well as a list of static nodes
there should not be a need for using Rendezvous as well.

Resolves: https://github.com/status-im/status-go/issues/2309

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-13 16:22:17 +02:00
Jakub Sokołowski 5caf22e35a scripts/gen_config.sh: drop WhisperConfig, limit API modules
I've disabled Whisper in the config since we do not use it anymore.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-08-13 16:22:17 +02:00
Andrea Maria Piana 81b58b39ec Remove e2e tests from steps 2021-07-20 10:57:38 +02:00
RichΛrd 40359f9c1b
go-waku integration (#2247)
* Adding wakunode module
* Adding wakuv2 fleet files
* Add waku fleets to update-fleet-config script
* Adding config items for waku v2
* Conditionally start waku v2 node depending on config
* Adapting common code to use go-waku
* Setting log level to info
* update dependencies
* update fleet config to use WakuNodes instead of BootNodes
* send and receive messages
* use hash returned when publishing a message
* add waku store protocol
* trigger signal after receiving store messages
* exclude linting rule SA1019 to check deprecated packages
2021-06-16 16:19:45 -04:00
Samuel Hawksby-Robinson cab6281dc5
Adding postgres docker to jenkins test (#2225)
* wip

* file rename

* Adding postgres docker to jenkins test

* update and fix to jenkins file

* More fixing

* tinker

* more tinkering

* agent in stage

* agent in stage fix

* Integrated Andrea's Docker compose work

* Rework to include dockerfile into jenkins unit test

* Customer dockerfile agent

* Change to ENTRYPOINT

* No dir() in Unit Tests

* Removal dir property of dockerfile

* Added lable to agent.dockerfile

* agent set only at stage level

* Added Jakub's suggestion

* removed stage level agent

* replaced docker host name with default 127.0.0.1

* Fix of old NewWhisperEnvelope

* removed user and password settings from postgres connection

* Set explicit postgres user and password

* Change postgres creds to be more generic

* Removed unneeded docker files

* POSTGRES_HOST_AUTH_METHOD because we hate passwords

* chicken chicken chicken

* indents 2 spaces
2021-06-09 11:16:04 +01:00
Jakub Sokołowski 91620b9982 ci: refactor to use status-jenkins-lib
This should fix issues with re-running builds while skipping some initial stages.

Also removes two libraries we made use of before.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-05-10 14:04:55 +02:00
Jakub Sokołowski aab93a6abb ci: lower number of remembered jobs to 5
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-03-05 09:11:23 +01:00
Jakub Sokołowski 74cdcbb700 compose: parametrize docker image, bind to v0.64.3
Using `latest` tag is dangerous for non-technical users.
And updating `latest` tag willy-nilly is also bad.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2021-01-20 14:58:28 +01:00
Samuel Hawksby-Robinson b7cd88744c Implemented better images.Get() and added better tests 2020-12-17 14:10:00 +01:00
Andrea Maria Piana 5cb70a2f42 Add datadir to gen_config.sh 2020-09-28 09:51:21 +02:00
Jakub Sokołowski 7ba89867ac ci: keep only last 10 builds to reduce size
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-09-08 19:49:24 +02:00
Andrea Maria Piana e58ba1e9c8
Add audio messages
Why make this change?

We are adding support of audio recorded files, similarly to how we did
with images

What has changed?

- Added protobuf definition, only AAC supported
- Added migrations to store files
- Fixed an issue with nil pointer when transaction would fail to be
created, causing the application to crash
2020-07-27 17:14:50 +02:00
Andrea Maria Piana cbaf523b0e Address feedback 2020-06-03 11:07:04 +02:00
Andrea Maria Piana f5ab58b87f Add support for images
This commit adds support for images in protobuf messages.

The client can specify a path which will be used to load the image
and set the corresponding fields.

This makes the assumption that the RCP server runs on the same machine
as the client and they have access to the same files. This holds
currently for both status-react and status-console-client, we could
revisit and adds an upload if that changes in the future.
2020-06-01 11:30:04 +02:00
Jakub Sokołowski 42baf2251d expose the mailserver metrics port by default
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-08 17:08:49 +02:00
Jakub Sokołowski bc70895615 enable waku for mailservers by default
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-04-08 17:08:49 +02:00
Adam Babik 4f9f7cd258
Fix setup-dev target (#1926) 2020-04-06 09:54:06 +02:00
Jakub Sokołowski 0c8efb4da5 fix update-fleet-config.sh to include rendezvous
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-03-17 15:47:07 +01:00