-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #514 from SciProgCentre/dev
0.3.1
- Loading branch information
Showing
224 changed files
with
1,525 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,48 @@ | ||
import kotlin.io.path.readText | ||
|
||
val projectName = "kmath" | ||
|
||
job("Build") { | ||
gradlew("openjdk:11", "build") | ||
//Perform only jvm tests | ||
gradlew("spc.registry.jetbrains.space/p/sci/containers/kotlin-ci:1.0.3", "test", "jvmTest") | ||
} | ||
|
||
job("Publish") { | ||
startOn { | ||
gitPush { enabled = false } | ||
} | ||
container("spc.registry.jetbrains.space/p/sci/containers/kotlin-ci:1.0.3") { | ||
env["SPACE_USER"] = "{{ project:space_user }}" | ||
env["SPACE_TOKEN"] = "{{ project:space_token }}" | ||
kotlinScript { api -> | ||
|
||
val spaceUser = System.getenv("SPACE_USER") | ||
val spaceToken = System.getenv("SPACE_TOKEN") | ||
|
||
// write the version to the build directory | ||
api.gradlew("version") | ||
|
||
//read the version from build file | ||
val version = java.nio.file.Path.of("build/project-version.txt").readText() | ||
|
||
val revisionSuffix = if (version.endsWith("SNAPSHOT")) { | ||
"-" + api.gitRevision().take(7) | ||
} else { | ||
"" | ||
} | ||
|
||
api.space().projects.automation.deployments.start( | ||
project = api.projectIdentifier(), | ||
targetIdentifier = TargetIdentifier.Key(projectName), | ||
version = version+revisionSuffix, | ||
// automatically update deployment status based on the status of a job | ||
syncWithAutomationJob = true | ||
) | ||
api.gradlew( | ||
"publishAllPublicationsToSpaceRepository", | ||
"-Ppublishing.space.user=\"$spaceUser\"", | ||
"-Ppublishing.space.token=\"$spaceToken\"", | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.