Skip to content

Commit

Permalink
wip(ci): debug octo cli cmd not found
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Mirwald committed Aug 15, 2024
1 parent f128e8a commit 5a70f76
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ jobs:
fetch-depth: 0
- name: Cache
uses: gradle/[email protected]
- name: Download and Install Octo CLI
run: |
wget https://github.com/OctopusDeploy/OctopusCLI/releases/download/v9.1.7/OctopusTools.9.1.7.linux-x64.tar.gz
mkdir -p $HOME/.local/bin
tar -xzf OctopusTools.9.1.7.linux-x64.tar.gz -C $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Build
run: ./gradlew build
- name: Validate
run: ./gradlew check validatePlugins --continue
- name: Integration Test
run: |
octo --version
./gradlew integrationTest
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class UploadBuildInformationOverwriteTaskIntegrationTest {
.forwardOutput()
.withProjectDir(testProjectDir.root)
.withArguments("build", "uploadBuildInformation")
.withEnvironment(System.getenv().toMutableMap().apply {
val home = System.getProperty("user.home")
put("GITHUB_PATH", "$home/.local/bin:${get("GITHUB_PATH")}")
})
.withPluginClasspath()
.build()
println(result.output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class UploadBuildInformationTaskIntegrationTest {
.forwardOutput()
.withProjectDir(testProjectDir.root)
.withArguments("build", "uploadBuildInformation")
.withEnvironment(System.getenv().toMutableMap().apply {
val home = System.getProperty("user.home")
put("GITHUB_PATH", "$home/.local/bin:${get("GITHUB_PATH")}")
})
.withPluginClasspath()
.build()
println(result.output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ class UploadPackageTaskIntegrationTest {
println(testProjectDir.root.absolutePath)
setupBuild(major, minor, micro)

println("PATH: ${System.getenv("PATH")}")
println("GITHUB_PATH: ${System.getenv("GITHUB_PATH")}")
println("111")
println(System.getenv().toMutableMap())
println("222")

val result = GradleRunner.create()
.forwardOutput()
.withProjectDir(testProjectDir.root)
.withArguments("build", "uploadPackage")
.withEnvironment(System.getenv().toMutableMap().apply {
val home = System.getProperty("user.home")
put("GITHUB_PATH", "$home/.local/bin:${get("GITHUB_PATH")}")
})
.withPluginClasspath()
.build()
println(result.output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class UploadPackageTaskWithInitialWaitIntegrationTest {
.forwardOutput()
.withProjectDir(testProjectDir.root)
.withArguments("build", "uploadPackage")
.withEnvironment(System.getenv().toMutableMap().apply {
val home = System.getProperty("user.home")
put("GITHUB_PATH", "$home/.local/bin:${get("GITHUB_PATH")}")
})
.withPluginClasspath()
.build()
log.info(result.output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class UploadPackageTaskWithWaitIntegrationTest {
.forwardOutput()
.withProjectDir(testProjectDir.root)
.withArguments("build", "uploadPackage")
.withEnvironment(System.getenv().toMutableMap().apply {
val home = System.getProperty("user.home")
put("GITHUB_PATH", "$home/.local/bin:${get("GITHUB_PATH")}")
})
.withPluginClasspath()
.build()
println(result.output)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ abstract class UploadPackageTask : DefaultTask() {
val awaitReleases = waitForReleaseDeployments.getOrElse(false)
val octopusUrlValue = octopusUrl.get()
val apiKeyValue = apiKey.get()
println("AAAAA")
println("PATH: ${System.getenv("PATH")}")
println("GITHUB_PATH: ${System.getenv("GITHUB_PATH")}")
println("BBBB")
println(System.getenv().toMutableMap())
println("CCCC")
val (exitCode, inputText, errorText) = listOf(
"octo",
"push",
Expand Down

0 comments on commit 5a70f76

Please sign in to comment.