Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ blocks:

prologue:
commands:
- sem-version go 1.24.11
- sem-version go 1.24.12
- checkout

jobs:
Expand All @@ -37,7 +37,7 @@ blocks:
- checkout
- mv ~/.ssh/security-toolbox ~/.ssh/id_rsa
- sudo chmod 600 ~/.ssh/id_rsa
- sem-version go 1.24.11
- sem-version go 1.24.12
jobs:
- name: Check dependencies
commands:
Expand All @@ -63,7 +63,7 @@ blocks:

prologue:
commands:
- sem-version go 1.24.11
- sem-version go 1.24.12
- checkout
- go version
- go get
Expand Down Expand Up @@ -96,7 +96,7 @@ blocks:

prologue:
commands:
- sem-version go 1.24.11
- sem-version go 1.24.12
- checkout
- go version
- go get
Expand Down Expand Up @@ -163,7 +163,7 @@ blocks:

prologue:
commands:
- sem-version go 1.24.11
- sem-version go 1.24.12
- checkout
- go version
- go get
Expand Down Expand Up @@ -200,7 +200,7 @@ blocks:

prologue:
commands:
- sem-version go 1.24.11
- sem-version go 1.24.12
- checkout
- go version
- go get
Expand Down Expand Up @@ -241,7 +241,7 @@ blocks:

prologue:
commands:
- sem-version go 1.24.11
- sem-version go 1.24.12
- curl -sLO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && install minikube-linux-amd64 /tmp/
- /tmp/minikube-linux-amd64 config set WantUpdateNotification false
- /tmp/minikube-linux-amd64 start --driver=docker
Expand Down
7 changes: 6 additions & 1 deletion pkg/jobs/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,12 @@ func (job *Job) uploadLogsAsArtifact(trimmed bool) {
return
}

args := []string{"push", "job", file, "-d", "agent/job_logs.txt"}
artifactPath := "agent/job_logs.txt"
if strings.HasSuffix(file, ".gz") {
artifactPath = artifactPath + ".gz"
}

args := []string{"push", "job", file, "-d", artifactPath}

// #nosec
cmd := exec.Command(path, args...)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def assert_artifact_is_compressed
# to realize the "archivator" has reached out for the logs, and can close the logger.
Timeout.timeout(20) do
loop do
`artifact pull job agent/job_logs.txt -f -d job_logs.gz && (gunzip -c job_logs.gz | tail -n1 | grep -q "Exporting SEMAPHORE_JOB_RESULT")`
`artifact pull job agent/job_logs.txt.gz -f -d job_logs.gz && (gunzip -c job_logs.gz | tail -n1 | grep -q "Exporting SEMAPHORE_JOB_RESULT")`
if $?.exitstatus == 0
puts "sucess: agent/job_logs.txt exists and is compressed!"
puts "sucess: agent/job_logs.txt.gz exists and is compressed!"
break
else
print "."
Expand Down