Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feat) maps timeout for gitlab #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 5 additions & 4 deletions convert/gitlab/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,11 @@ func convertJobToStep(ctx *context, jobName string, job *gitlab.Job) []*harness.
}

step := &harness.Step{
Name: jobName,
Type: "script",
Spec: spec,
On: on,
Name: jobName,
Type: "script",
Spec: spec,
On: on,
Timeout: job.Timeout,
}

steps = append(steps, step)
Expand Down
7 changes: 7 additions & 0 deletions convert/gitlab/testdata/timeout/example-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
build:
script: build.sh
timeout: 3 hours 30 minutes

test:
script: rspec
timeout: 3h 30m
19 changes: 19 additions & 0 deletions convert/gitlab/testdata/timeout/example-1.yaml.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
stages:
- name: test
spec:
steps:
- spec:
steps:
- name: build
spec:
run: build.sh
timeout: 3 hours 30 minutes
type: script
- name: test
spec:
run: rspec
timeout: 3h 30m
type: script
type: parallel
type: ci
version: 1
6 changes: 6 additions & 0 deletions convert/gitlab/testdata/timeout/example-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build:
script: build.sh
timeout: 3 hours 30 minutes

test:
script: rspec
19 changes: 19 additions & 0 deletions convert/gitlab/testdata/timeout/example-2.yaml.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
stages:
- name: test
spec:
steps:
- spec:
steps:
- name: build
spec:
run: build.sh
timeout: 3 hours 30 minutes
type: script
- name: test
spec:
run: rspec
type: script
type: parallel
type: ci
version: 1