import sys
import json
import os
from flowci import client, domain

SecretName = client.GetVar('SIGN_SECRET')

api = client.Client()
secret = api.getCredential(SecretName)

if secret is None:
    sys.exit('error: unable to load secret ' + SecretName)

try:
    keyStoreName = secret['keyStoreFileName']
    path = api.downloadSecretFile(SecretName, keyStoreName)

    if path is None:
        sys.exit('error: unable to load keystore file' + keyStoreName)

    print(path) # key path
    print(secret['keyStorePassword']['data'])  # ks pw
    print(secret['keyAlias']) # key alias
    print(secret['keyPassword']['data']) # key pw
except:
    sys.exit('error: invalid secret')





467dc94791c6ced2bbdc49abdef20d8e990777c1
<mask token>

<mask token>
if secret is None:
    sys.exit('error: unable to load secret ' + SecretName)
try:
    keyStoreName = secret['keyStoreFileName']
    path = api.downloadSecretFile(SecretName, keyStoreName)
    if path is None:
        sys.exit('error: unable to load keystore file' + keyStoreName)
    print(path)
    print(secret['keyStorePassword']['data'])
    print(secret['keyAlias'])
    print(secret['keyPassword']['data'])
except:
    sys.exit('error: invalid secret')

<mask token>
SecretName = client.GetVar('SIGN_SECRET')
api = client.Client()
secret = api.getCredential(SecretName)
if secret is None:
    sys.exit('error: unable to load secret ' + SecretName)
try:
    keyStoreName = secret['keyStoreFileName']
    path = api.downloadSecretFile(SecretName, keyStoreName)
    if path is None:
        sys.exit('error: unable to load keystore file' + keyStoreName)
    print(path)
    print(secret['keyStorePassword']['data'])
    print(secret['keyAlias'])
    print(secret['keyPassword']['data'])
except:
    sys.exit('error: invalid secret')

import sys
import json
import os
from flowci import client, domain
SecretName = client.GetVar('SIGN_SECRET')
api = client.Client()
secret = api.getCredential(SecretName)
if secret is None:
    sys.exit('error: unable to load secret ' + SecretName)
try:
    keyStoreName = secret['keyStoreFileName']
    path = api.downloadSecretFile(SecretName, keyStoreName)
    if path is None:
        sys.exit('error: unable to load keystore file' + keyStoreName)
    print(path)
    print(secret['keyStorePassword']['data'])
    print(secret['keyAlias'])
    print(secret['keyPassword']['data'])
except:
    sys.exit('error: invalid secret')

import sys
import json
import os
from flowci import client, domain

SecretName = client.GetVar('SIGN_SECRET')

api = client.Client()
secret = api.getCredential(SecretName)

if secret is None:
    sys.exit('error: unable to load secret ' + SecretName)

try:
    keyStoreName = secret['keyStoreFileName']
    path = api.downloadSecretFile(SecretName, keyStoreName)

    if path is None:
        sys.exit('error: unable to load keystore file' + keyStoreName)

    print(path) # key path
    print(secret['keyStorePassword']['data'])  # ks pw
    print(secret['keyAlias']) # key alias
    print(secret['keyPassword']['data']) # key pw
except:
    sys.exit('error: invalid secret')




