Drillster / drone-volume-cache

Drone plugin for caching to a locally mounted volume
MIT License
108 stars 41 forks source link

does not work on arm drone build agents #26

Open cyberb opened 4 years ago

cyberb commented 4 years ago

Should this work on arm agent?

cyberb commented 4 years ago
root@odroid-xu3and4:~# docker run --rm \
>   -e PLUGIN_REBUILD=true \
>   -e PLUGIN_MOUNT="./node_modules" \
>   -e DRONE_REPO_OWNER="foo" \
>   -e DRONE_REPO_NAME="bar" \
>   -e DRONE_JOB_NUMBER=0 \
>   -v $(pwd):$(pwd) \
>   -v /tmp/cache:/cache \
>   -w $(pwd) \
>   drillster/drone-volume-cache
standard_init_linux.go:190: exec user process caused "exec format error"
cyberb commented 4 years ago
root@odroid-xu3and4:~# docker image inspect drillster/drone-volume-cache | grep Arch
        "Architecture": "amd64",
karlwithak commented 3 years ago

@cyberb I was able to get this working on arm by doing the following:

anp135 commented 2 years ago

under arm64 drone will don't build stages. You have several ways:

  1. specify arch in .drone.yml https://github.com/drone-runners/drone-runner-docker/blob/master/.drone.yml#L5-L7

  2. build local version drone -) https://github.com/harness/drone/blob/master/trigger/trigger.go#L412-L413

  3. use drocopla https://github.com/dopos/drocopla

P.S. drocopla included in dcape from 2.1.1 -)

cyberb commented 2 years ago
  1. specify arch in .drone.yml But that is what I am doing and this is how found out that on arm it does not work.

This docker run above was on arm box. Are you saying arm is not supported but arm64 is? I must say I am not using this plugin at the moment so maybe it is all good now. Feel free to close.

anp135 commented 2 years ago

Are you saying arm is not supported but arm64 is?

I'm say: drone will does not build your stage under non amd64 platform with undefined section platfom. The reason in link2 (trigger.go hardcoded default stage platform is amd64 %-) )

For workaround this "feature" I rebuild drone container with changed trigger.go L412-L413. And my friend wrote drocopla for more flexible fix this bug of logic and possible anothers in the feature over changing drone config on the fly bu plugin.

Here does not matter: which platform runs your drone - In case non amd64 - you welcome to our community "mouses eat cactus"

cyberb commented 2 years ago

sorry you are saying undefined section platfom but we always set it, like here: https://github.com/syncloud/platform/blob/master/.drone.jsonnet#L10

or you mean something else?

anp135 commented 2 years ago

I don't mean anything except this drone behaviour: https://github.com/harness/drone/blob/master/trigger/trigger.go#L412-L413