Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8bc25e8

Browse files
build: change upload-to-s3 vars to upload-to-storage (#34142)
* build: change upload-to-s3 vars to upload-to-az * build: change upload-to-az to upload-to-storage * build: change linux-ia32-publish var Co-authored-by: Keeley Hammond <[email protected]>
1 parent a8f8b50 commit 8bc25e8

File tree

5 files changed

+29
-30
lines changed

5 files changed

+29
-30
lines changed

.circleci/config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ parameters:
1414
type: boolean
1515
default: false
1616

17-
# TODO (vertedinde): migrate this variable to upload-to-az
18-
upload-to-s3:
17+
upload-to-storage:
1918
type: string
2019
default: '1'
2120

.circleci/config/base.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
type: boolean
66
default: false
77

8-
upload-to-s3:
8+
upload-to-storage:
99
type: string
1010
default: '1'
1111

@@ -639,9 +639,9 @@ step-electron-publish: &step-electron-publish
639639
fi
640640
641641
cd src/electron
642-
if [ "$UPLOAD_TO_S3" == "1" ]; then
643-
echo 'Uploading Electron release distribution to S3'
644-
script/release/uploaders/upload.py --verbose --upload_to_s3
642+
if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
643+
echo 'Uploading Electron release distribution to Azure'
644+
script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
645645
else
646646
echo 'Uploading Electron release distribution to Github releases'
647647
script/release/uploaders/upload.py --verbose
@@ -1749,7 +1749,7 @@ jobs:
17491749
environment:
17501750
<<: *env-linux-2xlarge-release
17511751
<<: *env-release-build
1752-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
1752+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
17531753
<<: *env-ninja-status
17541754
steps:
17551755
- run: echo running
@@ -1798,7 +1798,7 @@ jobs:
17981798
<<: *env-ia32
17991799
<<: *env-release-build
18001800
<<: *env-32bit-release
1801-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
1801+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
18021802
<<: *env-ninja-status
18031803
steps:
18041804
- run: echo running
@@ -1850,7 +1850,7 @@ jobs:
18501850
<<: *env-release-build
18511851
<<: *env-32bit-release
18521852
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
1853-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
1853+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
18541854
<<: *env-ninja-status
18551855
steps:
18561856
- run: echo running
@@ -1911,7 +1911,7 @@ jobs:
19111911
<<: *env-arm64
19121912
<<: *env-release-build
19131913
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True'
1914-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
1914+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
19151915
<<: *env-ninja-status
19161916
steps:
19171917
- run: echo running
@@ -1954,7 +1954,7 @@ jobs:
19541954
environment:
19551955
<<: *env-mac-large-release
19561956
<<: *env-release-build
1957-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
1957+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
19581958
<<: *env-ninja-status
19591959
steps:
19601960
- run: echo running
@@ -1974,7 +1974,7 @@ jobs:
19741974
<<: *env-mac-large-release
19751975
<<: *env-release-build
19761976
<<: *env-apple-silicon
1977-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
1977+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
19781978
<<: *env-ninja-status
19791979
steps:
19801980
- run: echo running
@@ -2037,7 +2037,7 @@ jobs:
20372037
<<: *env-mac-large-release
20382038
<<: *env-mas
20392039
<<: *env-release-build
2040-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
2040+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
20412041
steps:
20422042
- run: echo running
20432043
- when:
@@ -2056,7 +2056,7 @@ jobs:
20562056
<<: *env-mac-large-release
20572057
<<: *env-mas-apple-silicon
20582058
<<: *env-release-build
2059-
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
2059+
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
20602060
<<: *env-ninja-status
20612061
steps:
20622062
- run: echo running

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64', 'mips64el'}.
1212
# Is used in some publishing scripts, but does NOT affect the Electron binary.
1313
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
14-
# - "UPLOAD_TO_S3" Set it to '1' upload a release to the S3 bucket.
14+
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
1515
# Otherwise the release will be uploaded to the Github Releases.
1616
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
1717
#
@@ -231,9 +231,9 @@ deploy_script:
231231
- cd electron
232232
- ps: >-
233233
if (Test-Path Env:\ELECTRON_RELEASE) {
234-
if (Test-Path Env:\UPLOAD_TO_S3) {
235-
Write-Output "Uploading Electron release distribution to s3"
236-
& python script\release\uploaders\upload.py --verbose --upload_to_s3
234+
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
235+
Write-Output "Uploading Electron release distribution to azure"
236+
& python script\release\uploaders\upload.py --verbose --upload_to_storage
237237
} else {
238238
Write-Output "Uploading Electron release distribution to github releases"
239239
& python script\release\uploaders\upload.py --verbose

script/release/ci-release-build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ async function circleCIcall (targetBranch, workflowName, options) {
6262
parameters: {}
6363
};
6464
if (options.ghRelease) {
65-
buildRequest.parameters['upload-to-s3'] = '0';
65+
buildRequest.parameters['upload-to-storage'] = '0';
6666
} else {
67-
buildRequest.parameters['upload-to-s3'] = '1';
67+
buildRequest.parameters['upload-to-storage'] = '1';
6868
}
6969
buildRequest.parameters[`run-${workflowName}`] = true;
7070
if (options.arch) {
@@ -205,7 +205,7 @@ async function callAppVeyor (targetBranch, job, options) {
205205
};
206206

207207
if (!options.ghRelease) {
208-
environmentVariables.UPLOAD_TO_S3 = 1;
208+
environmentVariables.UPLOAD_TO_STORAGE = 1;
209209
}
210210

211211
const requestOpts = {

script/release/uploaders/upload.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def main():
4545
args = parse_args()
4646
if args.verbose:
4747
enable_verbose_mode()
48-
if args.upload_to_s3:
48+
if args.upload_to_storage:
4949
utcnow = datetime.datetime.utcnow()
5050
args.upload_timestamp = utcnow.strftime('%Y%m%d')
5151

@@ -62,7 +62,7 @@ def main():
6262
if not release['draft']:
6363
tag_exists = True
6464

65-
if not args.upload_to_s3:
65+
if not args.upload_to_storage:
6666
assert release['exists'], \
6767
'Release does not exist; cannot upload to GitHub!'
6868
assert tag_exists == args.overwrite, \
@@ -140,7 +140,7 @@ def main():
140140
OUT_DIR, 'hunspell_dictionaries.zip')
141141
upload_electron(release, hunspell_dictionaries_zip, args)
142142

143-
if not tag_exists and not args.upload_to_s3:
143+
if not tag_exists and not args.upload_to_storage:
144144
# Upload symbols to symbol server.
145145
run_python_upload_script('upload-symbols.py')
146146
if PLATFORM == 'win32':
@@ -165,9 +165,9 @@ def parse_args():
165165
parser.add_argument('-p', '--publish-release',
166166
help='Publish the release',
167167
action='store_true')
168-
parser.add_argument('-s', '--upload_to_s3',
169-
help='Upload assets to s3 bucket',
170-
dest='upload_to_s3',
168+
parser.add_argument('-s', '--upload_to_storage',
169+
help='Upload assets to azure bucket',
170+
dest='upload_to_storage',
171171
action='store_true',
172172
default=False,
173173
required=False)
@@ -332,9 +332,9 @@ def upload_electron(release, file_path, args):
332332
except NonZipFileError:
333333
pass
334334

335-
# if upload_to_s3 is set, skip github upload.
336-
# todo (vertedinde): migrate this variable to upload_to_az
337-
if args.upload_to_s3:
335+
# if upload_to_storage is set, skip github upload.
336+
# todo (vertedinde): migrate this variable to upload_to_storage
337+
if args.upload_to_storage:
338338
key_prefix = 'release-builds/{0}_{1}'.format(args.version,
339339
args.upload_timestamp)
340340
store_artifact(os.path.dirname(file_path), key_prefix, [file_path])

0 commit comments

Comments
 (0)