Skip to content

Commit 449f68d

Browse files
committed
Configure sccache to run without credentials for community PR
1 parent 07b5f60 commit 449f68d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

ci/jobs/build_clickhouse.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ def main():
113113
os.environ["SCCACHE_IDLE_TIMEOUT"] = "7200"
114114
os.environ["SCCACHE_BUCKET"] = Settings.S3_ARTIFACT_PATH
115115
os.environ["SCCACHE_S3_KEY_PREFIX"] = "ccache/sccache"
116+
if "Community" in info.workflow_name:
117+
print("NOTE: Community contribution - set sccache to run without AWS credentials")
118+
os.environ["SCCACHE_S3_NO_CREDENTIALS"] = "1"
119+
# NOTE (strtgbb): sccache will throw an error if AWS credentials are present with SCCACHE_S3_NO_CREDENTIALS=1
120+
os.environ.pop("AWS_SECRET_ACCESS_KEY", None)
121+
os.environ.pop("AWS_ACCESS_KEY_ID", None)
122+
116123
os.environ["CTCACHE_LOG_LEVEL"] = "debug"
117124
os.environ["CTCACHE_DIR"] = f"{build_dir}/ccache/clang-tidy-cache"
118125
os.environ["CTCACHE_S3_BUCKET"] = Settings.S3_ARTIFACT_PATH

ci/jobs/fast_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ def main():
145145
os.environ["SCCACHE_IDLE_TIMEOUT"] = "7200"
146146
os.environ["SCCACHE_BUCKET"] = Settings.S3_ARTIFACT_PATH
147147
os.environ["SCCACHE_S3_KEY_PREFIX"] = "ccache/sccache"
148+
if "Community" in Info().workflow_name:
149+
print("NOTE: Community contribution - set sccache to run without AWS credentials")
150+
os.environ["SCCACHE_S3_NO_CREDENTIALS"] = "1"
151+
# NOTE (strtgbb): sccache will throw an error if AWS credentials are present with SCCACHE_S3_NO_CREDENTIALS=1
152+
os.environ.pop("AWS_SECRET_ACCESS_KEY", None)
153+
os.environ.pop("AWS_ACCESS_KEY_ID", None)
154+
148155
Shell.check("sccache --show-stats", verbose=True)
149156

150157
Utils.add_to_PATH(f"{build_dir}/programs:{current_directory}/tests")

0 commit comments

Comments
 (0)