[#13016] Pass opensea key from env
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
c650fa99d8
commit
aa72ac5747
|
@ -1,4 +1,4 @@
|
||||||
library 'status-jenkins-lib@v1.3.3'
|
library 'status-jenkins-lib@v1.3.5'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux && x86_64 && nix-2.3' }
|
agent { label 'linux && x86_64 && nix-2.3' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-jenkins-lib@v1.3.3'
|
library 'status-jenkins-lib@v1.3.5'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-jenkins-lib@v1.3.3'
|
library 'status-jenkins-lib@v1.3.5'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos && x86_64 && nix-2.3 && xcode-12.5' }
|
agent { label 'macos && x86_64 && nix-2.3 && xcode-12.5' }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-jenkins-lib@v1.3.3'
|
library 'status-jenkins-lib@v1.3.5'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label params.AGENT_LABEL }
|
agent { label params.AGENT_LABEL }
|
||||||
|
|
|
@ -85,7 +85,7 @@ in stdenv.mkDerivation rec {
|
||||||
ANDROID_NDK_ROOT = "${androidPkgs.ndk}";
|
ANDROID_NDK_ROOT = "${androidPkgs.ndk}";
|
||||||
|
|
||||||
# Used by the Android Gradle build script in android/build.gradle
|
# 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 = [
|
phases = [
|
||||||
"unpackPhase" "secretsPhase" "keystorePhase"
|
"unpackPhase" "secretsPhase" "keystorePhase"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
mkShell {
|
mkShell {
|
||||||
shellHook = ''
|
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"
|
RCTSTATUS_DIR="$STATUS_REACT_HOME/modules/react-native-status/ios/RCTStatus"
|
||||||
targetBasename='Statusgo.framework'
|
targetBasename='Statusgo.framework'
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
, goBuildLdFlags ? [ ]
|
, goBuildLdFlags ? [ ]
|
||||||
, outputFileName ? "status-go-${source.shortRev}-${platform}.aar" }:
|
, outputFileName ? "status-go-${source.shortRev}-${platform}.aar" }:
|
||||||
|
|
||||||
|
# Path to the file containing secret environment variables
|
||||||
|
{ secretsFile ? "" }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv) isDarwin;
|
inherit (stdenv) isDarwin;
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
|
@ -34,6 +37,18 @@ in buildGo116Package {
|
||||||
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
|
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
|
||||||
hardeningDisable = [ "fortify" ];
|
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
|
# Ensure XCode is present for iOS build, instead of failing at the end of the build
|
||||||
preConfigure = optionalString (isDarwin && platform == "ios") utils.enforceXCodeAvailable;
|
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
|
# Build the Go library using gomobile for each of the configured platforms
|
||||||
buildPhase = let
|
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;
|
CGO_LDFLAGS = concatStringsSep " " ldFlags;
|
||||||
in ''
|
in ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
|
@ -52,6 +52,9 @@ fi
|
||||||
if [[ -n "${INFURA_TOKEN}" ]]; then
|
if [[ -n "${INFURA_TOKEN}" ]]; then
|
||||||
append_env_export 'INFURA_TOKEN'
|
append_env_export 'INFURA_TOKEN'
|
||||||
fi
|
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
|
# Used by Clojure at compile time for remove import of react-native-notifications for fdroid release
|
||||||
if [[ -n "${READER_FEATURES}" ]]; then
|
if [[ -n "${READER_FEATURES}" ]]; then
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "v0.96.1",
|
"version": "v0.96.2",
|
||||||
"commit-sha1": "01b6988260a676fdb492e427c8d336a0df229a07",
|
"commit-sha1": "12ccff417d95a0aef9736b811ea00341390dd1d5",
|
||||||
"src-sha256": "1b2cx114v1pziy302v0bzf1cw4p5fm61cdfdj6b43d04avmyrnnp"
|
"src-sha256": "1g6p239l1k8wv52x5gz63jql4piyy52qj3a795h9ka1lawqsxq8h"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue