From ddf94c61aa82e163904b3726876a95416bfaf4ed Mon Sep 17 00:00:00 2001 From: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Date: Mon, 8 Aug 2022 14:10:31 +0800 Subject: [PATCH] [Script] Update Auto release debug (#25595) * fix auto-ask-check bug * update comment * update comment * fix bug * Update main.py * Update main.py * Update main.py * fix changelog format for new service * fix check_pprint_name bug * Update main.py * fix check_pprint_name bug * Update main.py * Update main.py * test * test * change to azclibot * change to azure * fix push * test * update * update * test * test * reduction * update main * delete f * Update main.py * test * test * test * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * remove surplus code * Update PythonSdkLiveTest.yml for Azure Pipelines * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * fix bug * update * test * update code * update bot * update main bot * Update PythonSdkLiveTest.yml for Azure Pipelines * Update main.py * Update main.py * change branch for test * for test * for test * for test * add PyYAML * code * README.md format * multi client * code * add python_tag * restore branch * Update PythonSdkLiveTest.yml * gen multi client * update global_conf * Update auto_codegen.py * Update generate_sdk.py * Update generate_sdk.py * Update generate_sdk.py * single client gen * Update main.py * compatible with meta storage code * add log to lookup readme * dpg package does not need _meta.json in MAINFEST.in * Update main.py * Update PythonSdkLiveTest.yml for Azure Pipelines * add language, apiviewartifacts * uodate edit_sdk_setup * fix * test * test * fix bug * debug * fix bug * fix bug * Update main.py * move to ci check * Update main.py * for test * restore * update msg for failed version * for testing * for testing * restore * restore * pin fastcore version * test * debug * debug * optimize * Update setup.py * sdk generation pipeline support dpg Signed-off-by: Zhou Zheng * auto codegen don't use specFolder to define swagger repo's location Signed-off-by: Zhou Zheng * fetch automation_generate.sh recent change to sdk_generate.sh Signed-off-by: Zhou Zheng * set default spec flord as global constant Signed-off-by: Zhou Zheng * set DEFAULT_SPEC_FOLDER in generate_utils Signed-off-by: Zhou Zheng * code * fix auto-release utils Co-authored-by: Yuchao Yan Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Zhou Zheng --- scripts/auto_release/requirement.txt | 2 +- scripts/auto_release/util.py | 30 +++++++--------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/scripts/auto_release/requirement.txt b/scripts/auto_release/requirement.txt index 0931370468d9..698652f950c2 100644 --- a/scripts/auto_release/requirement.txt +++ b/scripts/auto_release/requirement.txt @@ -4,4 +4,4 @@ ghapi==0.1.19 packaging==21.3 pytest==6.2.5 azure-storage-blob==12.9.0 -fastcore==1.3.25 +fastcore==1.3.25 \ No newline at end of file diff --git a/scripts/auto_release/util.py b/scripts/auto_release/util.py index c9e9305dce9d..a2fe9a858d1a 100644 --- a/scripts/auto_release/util.py +++ b/scripts/auto_release/util.py @@ -1,31 +1,15 @@ from pathlib import Path -CERTIFICATION = ''' ------BEGIN CERTIFICATE----- -MIIDSDCCAjCgAwIBAgIUPMKpJ/j10eQrcQBNnkImIaOYHakwDQYJKoZIhvcNAQEL -BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIxMDgwNTAwMzU1NloXDTIyMDgw -NTAwMzU1NlowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEAxe/ZseXgOTVoF7uTjX5Leknk95jIoyGc+VlxA8BhzGOr -r4u6VNQZRCMq+svHY36tW4+u/xHNe2kvbwy2mnS8cFFLfst+94qBZVJDBxSGZ9I/ -wekErNsjFsik4UrMvcC+ZlGPh7hb3f7tSx29tn1DIkAUXVnbZ6TT5s+mYRQpZ6fW -6kR3RNfc0A1IUM7Zs9yfNEr0O2H41P2HcLKoOPtvd7GvTQm9Ofh3srKvII+sZn/J -WH7r76oRQMX904mOMdryQwZLObsqX4dXIEbafKVSecB3PBVIhv8gVtJhcZbQP1pI -mMiWd6PHv46ZhGf7+cKnYUSa8Ia2t/wetK1wd00dFwIDAQABo4GRMIGOMA8GA1Ud -EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGmMBYGA1UdJQEB/wQMMAoGCCsGAQUF -BwMBMBcGA1UdEQEB/wQNMAuCCWxvY2FsaG9zdDA6BgorBgEEAYI3VAEBBCwMKkFT -UC5ORVQgQ29yZSBIVFRQUyBkZXZlbG9wbWVudCBjZXJ0aWZpY2F0ZTANBgkqhkiG -9w0BAQsFAAOCAQEAIj2VlBVcXGSly6KCBg6lgwFi+henWfSox77iuGAaAxDjN3jd -9lZahW4MPNLHKSrPRb4YNSLZ2jh7zdcttQrqd4qH65o1q56q5JrCmli99iIzY9Y8 -RdYyxK4Zzr31wjpsyFiWQfqJTuSFUUg9uDDj0negwEZLIGlt7nr12wflt2+QOJtD -byMeSZLbB5dPzn341DK0qfJEJMMgL0XsPEVZ3TQ6Alc9zq5wI608C/mXnz3xJE05 -UTYD8pRJJ/DyG0empvOVE8Sg93msHPquAbgqO9aqCpykgg/a8CFvI4wRdfvGEFlv -8XJKL8Y/PFsmFeO3axq3zUYKFVdc9Un4dFIaag== ------END CERTIFICATE----- -''' + +def _find_certificate(): + devcert_path = Path('eng/common/testproxy/dotnet-devcert.crt') + with open(devcert_path, 'r') as fr: + return fr.read() def add_certificate(): + certification = _find_certificate() cacert_path = Path('../venv-sdk/lib/python3.8/site-packages/certifi/cacert.pem') with open(cacert_path, 'a+') as f: f.seek(0, 0) - f.write(CERTIFICATION) + f.write(certification)