Convert more taskcluster jobs to Github Actions.

This commit is contained in:
Josh Matthews 2021-05-23 10:49:01 -04:00
parent 84c8653d7e
commit a82b268be0
3 changed files with 148 additions and 1 deletions

View file

@ -601,7 +601,10 @@ class PackageCommands(CommandBase):
@CommandArgument('--secret-from-taskcluster',
action='store_true',
help='Retrieve the appropriate secrets from taskcluster.')
def upload_nightly(self, platform, secret_from_taskcluster):
@CommandArgument('--secret-from-environment',
action='store_true',
help='Retrieve the appropriate secrets from the environment.')
def upload_nightly(self, platform, secret_from_taskcluster, secret_from_environment):
import boto3
def get_s3_secret():
@ -611,6 +614,10 @@ class PackageCommands(CommandBase):
secret = get_taskcluster_secret("s3-upload-credentials")
aws_access_key = secret["aws_access_key_id"]
aws_secret_access_key = secret["aws_secret_access_key"]
elif secret_from_environment:
secret = json.loads(os.environ['S3_UPLOAD_CREDENTIALS'])
aws_access_key = secret["aws_access_key_id"]
aws_secret_access_key = secret["aws_secret_access_key"]
return (aws_access_key, aws_secret_access_key)
def nightly_filename(package, timestamp):