When Jenkins creates a build, it can sometimes run the build on a detached HEAD, causing the commit SHA to be different from the SHA of your branch. This will cause issues when reporting test coverage to Code Climate.
Setting `GIT_COMMIT` fixes code climate upload errors.
ref -> https://docs.codeclimate.com/docs/jenkins#jenkins-ci-buildsCloses#5294
Otherwise builds fail with:
```
sqlite3.c:37493:42: error: 'pread64' undeclared here (not in a function); did you mean 'pread'?
37493 | { "pread64", (sqlite3_syscall_ptr)pread64, 0 },
| ^~~~~~~
| pread
sqlite3.c:37511:42: error: 'pwrite64' undeclared here (not in a function); did you mean 'pwrite'?
37511 | { "pwrite64", (sqlite3_syscall_ptr)pwrite64, 0 },
| ^~~~~~~~
| pwrite
sqlite3.c: In function 'seekAndRead':
sqlite3.c:37497:49: error: unknown type name 'off64_t'; did you mean 'off_t'?
37497 | #define osPread64 ((ssize_t(*)(int,void*,size_t,off64_t))aSyscall[10].pCurrent)
| ^~~~~~~
```
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Because most of those functions just obscure what's happening.
Also formatting.
Also, it appears Jenkins sets `params` on first run, but not `env`
variables from those `params`.
Signed-off-by: Jakub Sokołowski <jakub@status.im>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
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>
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>
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>