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

Adding hybrid runner example #95

Open
wants to merge 5 commits 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
4 changes: 2 additions & 2 deletions docs/resources/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ resource "codefresh_pipeline" "test" {
`runtime_environment` supports the following:

- `name` - (Required) A name of runtime.
- `cpu` - (Optional) A required amount of CPU.
- `memory` - (Optional) A required amount of memory.
- `cpu` - (Optional) A required amount of CPU in millicpu (m).
- `memory` - (Optional) A required amount of memory in mebibytes (Mi).
- `dind_storage` - (Optional) A pipeline shared storage.

---
Expand Down
9 changes: 8 additions & 1 deletion examples/pipelines/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ steps:
"context2-name",
]

# hybrid runner example
runtime_environment {
name = "csdp/runner"
cpu = "1500" # for 1.5 CPU

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't quite work for us. Entering 1000 actually resulted in requesting 1000 cpus. I think its best to use a string annotation like 1500m.

memory = "500" # in Mi
}

trigger {
branch_regex = "/.*/gi"
context = "git"
Expand Down Expand Up @@ -99,4 +106,4 @@ steps:
ANOTHER_PIP_VAR = "another_value"
}
}
}
}