build: change upload-to-s3 vars to upload-to-storage (#34105)
* build: change upload-to-s3 vars to upload-to-az * build: change upload-to-az to upload-to-storage
This commit is contained in:
parent
dd7dfd7ecd
commit
6fea35271c
5 changed files with 28 additions and 29 deletions
|
@ -14,8 +14,7 @@ parameters:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
# TODO (vertedinde): migrate this variable to upload-to-az
|
upload-to-storage:
|
||||||
upload-to-s3:
|
|
||||||
type: string
|
type: string
|
||||||
default: '1'
|
default: '1'
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ parameters:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
upload-to-s3:
|
upload-to-storage:
|
||||||
type: string
|
type: string
|
||||||
default: '1'
|
default: '1'
|
||||||
|
|
||||||
|
@ -637,9 +637,9 @@ step-electron-publish: &step-electron-publish
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd src/electron
|
cd src/electron
|
||||||
if [ "$UPLOAD_TO_S3" == "1" ]; then
|
if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
|
||||||
echo 'Uploading Electron release distribution to S3'
|
echo 'Uploading Electron release distribution to Azure'
|
||||||
script/release/uploaders/upload.py --verbose --upload_to_s3
|
script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
|
||||||
else
|
else
|
||||||
echo 'Uploading Electron release distribution to Github releases'
|
echo 'Uploading Electron release distribution to Github releases'
|
||||||
script/release/uploaders/upload.py --verbose
|
script/release/uploaders/upload.py --verbose
|
||||||
|
@ -1687,7 +1687,7 @@ jobs:
|
||||||
environment:
|
environment:
|
||||||
<<: *env-linux-2xlarge-release
|
<<: *env-linux-2xlarge-release
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
<<: *env-ninja-status
|
<<: *env-ninja-status
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
|
@ -1731,7 +1731,7 @@ jobs:
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
<<: *env-32bit-release
|
<<: *env-32bit-release
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
<<: *env-ninja-status
|
<<: *env-ninja-status
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
|
@ -1784,7 +1784,7 @@ jobs:
|
||||||
<<: *env-arm64
|
<<: *env-arm64
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True'
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
<<: *env-ninja-status
|
<<: *env-ninja-status
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
|
@ -1832,7 +1832,7 @@ jobs:
|
||||||
environment:
|
environment:
|
||||||
<<: *env-mac-large-release
|
<<: *env-mac-large-release
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
<<: *env-ninja-status
|
<<: *env-ninja-status
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
|
@ -1854,7 +1854,7 @@ jobs:
|
||||||
<<: *env-mac-large-release
|
<<: *env-mac-large-release
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
<<: *env-apple-silicon
|
<<: *env-apple-silicon
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
<<: *env-ninja-status
|
<<: *env-ninja-status
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
|
@ -1924,7 +1924,7 @@ jobs:
|
||||||
<<: *env-mac-large-release
|
<<: *env-mac-large-release
|
||||||
<<: *env-mas
|
<<: *env-mas
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
- when:
|
- when:
|
||||||
|
@ -1945,7 +1945,7 @@ jobs:
|
||||||
<<: *env-mac-large-release
|
<<: *env-mac-large-release
|
||||||
<<: *env-mas-apple-silicon
|
<<: *env-mas-apple-silicon
|
||||||
<<: *env-release-build
|
<<: *env-release-build
|
||||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||||
<<: *env-ninja-status
|
<<: *env-ninja-status
|
||||||
steps:
|
steps:
|
||||||
- run: echo running
|
- run: echo running
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64', 'mips64el'}.
|
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64', 'mips64el'}.
|
||||||
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
||||||
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
||||||
# - "UPLOAD_TO_S3" Set it to '1' upload a release to the S3 bucket.
|
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
|
||||||
# Otherwise the release will be uploaded to the Github Releases.
|
# Otherwise the release will be uploaded to the Github Releases.
|
||||||
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
||||||
#
|
#
|
||||||
|
@ -229,9 +229,9 @@ deploy_script:
|
||||||
- cd electron
|
- cd electron
|
||||||
- ps: >-
|
- ps: >-
|
||||||
if (Test-Path Env:\ELECTRON_RELEASE) {
|
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||||
if (Test-Path Env:\UPLOAD_TO_S3) {
|
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
|
||||||
Write-Output "Uploading Electron release distribution to s3"
|
Write-Output "Uploading Electron release distribution to azure"
|
||||||
& python script\release\uploaders\upload.py --verbose --upload_to_s3
|
& python script\release\uploaders\upload.py --verbose --upload_to_storage
|
||||||
} else {
|
} else {
|
||||||
Write-Output "Uploading Electron release distribution to github releases"
|
Write-Output "Uploading Electron release distribution to github releases"
|
||||||
& python script\release\uploaders\upload.py --verbose
|
& python script\release\uploaders\upload.py --verbose
|
||||||
|
|
|
@ -62,9 +62,9 @@ async function circleCIcall (targetBranch, workflowName, options) {
|
||||||
parameters: {}
|
parameters: {}
|
||||||
};
|
};
|
||||||
if (options.ghRelease) {
|
if (options.ghRelease) {
|
||||||
buildRequest.parameters['upload-to-s3'] = '0';
|
buildRequest.parameters['upload-to-storage'] = '0';
|
||||||
} else {
|
} else {
|
||||||
buildRequest.parameters['upload-to-s3'] = '1';
|
buildRequest.parameters['upload-to-storage'] = '1';
|
||||||
}
|
}
|
||||||
buildRequest.parameters[`run-${workflowName}`] = true;
|
buildRequest.parameters[`run-${workflowName}`] = true;
|
||||||
if (options.arch) {
|
if (options.arch) {
|
||||||
|
@ -205,7 +205,7 @@ async function callAppVeyor (targetBranch, job, options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!options.ghRelease) {
|
if (!options.ghRelease) {
|
||||||
environmentVariables.UPLOAD_TO_S3 = 1;
|
environmentVariables.UPLOAD_TO_STORAGE = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestOpts = {
|
const requestOpts = {
|
||||||
|
|
|
@ -47,7 +47,7 @@ def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
enable_verbose_mode()
|
enable_verbose_mode()
|
||||||
if args.upload_to_s3:
|
if args.upload_to_storage:
|
||||||
utcnow = datetime.datetime.utcnow()
|
utcnow = datetime.datetime.utcnow()
|
||||||
args.upload_timestamp = utcnow.strftime('%Y%m%d')
|
args.upload_timestamp = utcnow.strftime('%Y%m%d')
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ def main():
|
||||||
if not release['draft']:
|
if not release['draft']:
|
||||||
tag_exists = True
|
tag_exists = True
|
||||||
|
|
||||||
if not args.upload_to_s3:
|
if not args.upload_to_storage:
|
||||||
assert release['exists'], \
|
assert release['exists'], \
|
||||||
'Release does not exist; cannot upload to GitHub!'
|
'Release does not exist; cannot upload to GitHub!'
|
||||||
assert tag_exists == args.overwrite, \
|
assert tag_exists == args.overwrite, \
|
||||||
|
@ -148,7 +148,7 @@ def main():
|
||||||
OUT_DIR, 'hunspell_dictionaries.zip')
|
OUT_DIR, 'hunspell_dictionaries.zip')
|
||||||
upload_electron(release, hunspell_dictionaries_zip, args)
|
upload_electron(release, hunspell_dictionaries_zip, args)
|
||||||
|
|
||||||
if not tag_exists and not args.upload_to_s3:
|
if not tag_exists and not args.upload_to_storage:
|
||||||
# Upload symbols to symbol server.
|
# Upload symbols to symbol server.
|
||||||
run_python_upload_script('upload-symbols.py')
|
run_python_upload_script('upload-symbols.py')
|
||||||
if PLATFORM == 'win32':
|
if PLATFORM == 'win32':
|
||||||
|
@ -174,9 +174,9 @@ def parse_args():
|
||||||
parser.add_argument('-p', '--publish-release',
|
parser.add_argument('-p', '--publish-release',
|
||||||
help='Publish the release',
|
help='Publish the release',
|
||||||
action='store_true')
|
action='store_true')
|
||||||
parser.add_argument('-s', '--upload_to_s3',
|
parser.add_argument('-s', '--upload_to_storage',
|
||||||
help='Upload assets to s3 bucket',
|
help='Upload assets to azure bucket',
|
||||||
dest='upload_to_s3',
|
dest='upload_to_storage',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
required=False)
|
required=False)
|
||||||
|
@ -342,9 +342,9 @@ def upload_electron(release, file_path, args):
|
||||||
except NonZipFileError:
|
except NonZipFileError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# if upload_to_s3 is set, skip github upload.
|
# if upload_to_storage is set, skip github upload.
|
||||||
# todo (vertedinde): migrate this variable to upload_to_az
|
# todo (vertedinde): migrate this variable to upload_to_storage
|
||||||
if args.upload_to_s3:
|
if args.upload_to_storage:
|
||||||
key_prefix = 'release-builds/{0}_{1}'.format(args.version,
|
key_prefix = 'release-builds/{0}_{1}'.format(args.version,
|
||||||
args.upload_timestamp)
|
args.upload_timestamp)
|
||||||
store_artifact(os.path.dirname(file_path), key_prefix, [file_path])
|
store_artifact(os.path.dirname(file_path), key_prefix, [file_path])
|
||||||
|
|
Loading…
Add table
Reference in a new issue