[#13016] Pass opensea key from env

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
Roman Volosovskyi 2022-03-02 15:30:27 +01:00 committed by andrey
parent c650fa99d8
commit aa72ac5747
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
9 changed files with 30 additions and 10 deletions

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'
pipeline {
agent { label 'linux && x86_64 && nix-2.3' }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'
pipeline {
agent { label 'linux' }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'
pipeline {
agent { label 'macos && x86_64 && nix-2.3 && xcode-12.5' }

View File

@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'
pipeline {
agent { label params.AGENT_LABEL }

View File

@ -85,7 +85,7 @@ in stdenv.mkDerivation rec {
ANDROID_NDK_ROOT = "${androidPkgs.ndk}";
# Used by the Android Gradle build script in android/build.gradle
STATUS_GO_ANDROID_LIBDIR = "${status-go}";
STATUS_GO_ANDROID_LIBDIR = status-go { inherit secretsFile; };
phases = [
"unpackPhase" "secretsPhase" "keystorePhase"

View File

@ -7,7 +7,7 @@
mkShell {
shellHook = ''
export STATUS_GO_IOS_LIBDIR=${status-go}/Statusgo.framework
export STATUS_GO_IOS_LIBDIR=${status-go {}}/Statusgo.framework
RCTSTATUS_DIR="$STATUS_REACT_HOME/modules/react-native-status/ios/RCTStatus"
targetBasename='Statusgo.framework'

View File

@ -8,6 +8,9 @@
, goBuildLdFlags ? [ ]
, outputFileName ? "status-go-${source.shortRev}-${platform}.aar" }:
# Path to the file containing secret environment variables
{ secretsFile ? "" }:
let
inherit (stdenv) isDarwin;
inherit (lib)
@ -34,6 +37,18 @@ in buildGo116Package {
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
hardeningDisable = [ "fortify" ];
phases = [
"unpackPhase" "secretsPhase" "configurePhase"
"buildPhase" "installPhase" "fixupPhase"
];
# if secretsFile is not set we use generate keystore
secretsPhase = if (secretsFile != "") then ''
source "${secretsFile}"
'' else ''
echo "No secrets provided!"
'';
# Ensure XCode is present for iOS build, instead of failing at the end of the build
preConfigure = optionalString (isDarwin && platform == "ios") utils.enforceXCodeAvailable;
@ -54,7 +69,9 @@ in buildGo116Package {
# Build the Go library using gomobile for each of the configured platforms
buildPhase = let
ldFlags = [ "-extldflags=-Wl,--allow-multiple-definition" ] ++ goBuildLdFlags;
ldFlags = [ "-extldflags=-Wl,--allow-multiple-definition" ]
++ lib.optionals (secretsFile != "") ["-X node.OpenseaKeyFromEnv=$OPENSEA_API_KEY"]
++ goBuildLdFlags;
CGO_LDFLAGS = concatStringsSep " " ldFlags;
in ''
runHook preBuild

View File

@ -52,6 +52,9 @@ fi
if [[ -n "${INFURA_TOKEN}" ]]; then
append_env_export 'INFURA_TOKEN'
fi
if [[ -n "${OPENSEA_API_KEY}" ]]; then
append_env_export 'OPENSEA_API_KEY'
fi
# Used by Clojure at compile time for remove import of react-native-notifications for fdroid release
if [[ -n "${READER_FEATURES}" ]]; then

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.96.1",
"commit-sha1": "01b6988260a676fdb492e427c8d336a0df229a07",
"src-sha256": "1b2cx114v1pziy302v0bzf1cw4p5fm61cdfdj6b43d04avmyrnnp"
"version": "v0.96.2",
"commit-sha1": "12ccff417d95a0aef9736b811ea00341390dd1d5",
"src-sha256": "1g6p239l1k8wv52x5gz63jql4piyy52qj3a795h9ka1lawqsxq8h"
}