Skip to content

Commit

Permalink
jenkins: use token for pushing to openpilot-releases (#32146)
Browse files Browse the repository at this point in the history
use token

Co-authored-by: tester <tester@comma.ai>
  • Loading branch information
jnewb1 and tester authored Apr 9, 2024
1 parent 34912b2 commit 91713be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export SOURCE_DIR=${env.SOURCE_DIR}
export GIT_BRANCH=${env.GIT_BRANCH}
export GIT_COMMIT=${env.GIT_COMMIT}
export AZURE_TOKEN='${env.AZURE_TOKEN}'
export AZURE_TOKEN_OPENPILOT_RELEASES='${env.AZURE_TOKEN_OPENPILOT_RELEASES}'
export MAPBOX_TOKEN='${env.MAPBOX_TOKEN}'
# only use 1 thread for tici tests since most require HIL
export PYTEST_ADDOPTS="-n 0"
Expand Down Expand Up @@ -134,9 +135,11 @@ def pcStage(String stageName, Closure body) {
def setupCredentials() {
withCredentials([
string(credentialsId: 'azure_token', variable: 'AZURE_TOKEN'),
string(credentialsId: 'azure_token_openpilot_releases', variable: 'AZURE_TOKEN_OPENPILOT_RELEASES'),
string(credentialsId: 'mapbox_token', variable: 'MAPBOX_TOKEN')
]) {
env.AZURE_TOKEN = "${AZURE_TOKEN}"
env.AZURE_TOKEN_OPENPILOT_RELEASES = "${AZURE_TOKEN_OPENPILOT_RELEASES}"
env.MAPBOX_TOKEN = "${MAPBOX_TOKEN}"
}
}
Expand Down
3 changes: 2 additions & 1 deletion release/upload_casync_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@


if __name__ == "__main__":
del os.environ["AZURE_TOKEN"] # regerenate token for this bucket
if "AZURE_TOKEN_OPENPILOT_RELEASES" in os.environ:
os.environ["AZURE_TOKEN"] = os.environ["AZURE_TOKEN_OPENPILOT_RELEASES"]

OPENPILOT_RELEASES_CONTAINER = AzureContainer("commadist", "openpilot-releases")

Expand Down

0 comments on commit 91713be

Please sign in to comment.