From adfd6641cca2107b0bf2105cfa8d50f740594efb Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 10 Jul 2022 12:42:14 +0300 Subject: [PATCH] Update deploy script --- .space.kts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.space.kts b/.space.kts index c1a3329..5429d6b 100644 --- a/.space.kts +++ b/.space.kts @@ -7,7 +7,12 @@ job("Publish"){ gitPush { enabled = false } } container("openjdk:11") { + env["SPACE_USER"] = Secrets("space_user") + env["SPACE_TOKEN"] = Secrets("space_token") kotlinScript { api -> + val spaceUser = System.getenv("SPACE_USER") + val spaceToken = System.getenv("SPACE_TOKEN") + api.space().projects.automation.deployments.start( project = api.projectIdentifier(), targetIdentifier = TargetIdentifier.Key("gradle-tools"), @@ -15,7 +20,11 @@ job("Publish"){ // automatically update deployment status based on a status of a job syncWithAutomationJob = true ) - api.gradlew("publishAllPublicationsToSpaceRepository") + api.gradlew( + "publishAllPublicationsToSpaceRepository", + "-Ppublishing.space.user=\"$spaceUser\"", + "-Ppublishing.space.token=\"$spaceToken\"", + ) } } }