Hello there,
`
steps:
- name: staging_build
image: node:12
group: build
when:
branch:
- develop
volumes:
- name: cache
path: /dist
commands:
- sh ./_drone.sh staging
resources:
limits:
cpu: 300
memory: ‘2000Mi’
`
The memory limiting is working, I can use docker stats
to monit.
But the cpu is not work, I want to limit the cpu usage to 30%.
Thank you.
The syntax in your example is kubernetes pipeline syntax. The docker runner (drone/drone-runner-docker:1) uses a different syntax which you can see in the following example:
kind: pipeline
type: docker
name: default
steps:
- name: build
image: golang
detach: false
failure: ignore
mem_limit: 1GiB
memswap_limit: 2GiB
Hi @bradrydzewski,
I rewrite to docker runner and change the agent to drone/drone-runner-docker(docker file version is 3.8).
But when I use cpu_quota
or cpu_shares
, they seem not work.
steps:
- name: staging_build
image: node:12
group: build
mem_limit: 1.5GiB
cpu_quota: 30000
cpu_shares: 512
Thank you.