giving up…
I’m trying to make npm build (react scripts) and in meantime inject custom .env file (build/env related) into pipeline work directory.
Trying hard with host volumes but seems like it does not mounting files.
first, my runner after mount directory from host machine:
[drone@ci1 ~]$ docker exec runner ls -la /env/bs-frontend
total 4
drwxrwxrwx 2 1002 1002 21 Feb 10 19:22 .
drwxrwxrwx 3 1002 1002 25 Feb 10 18:56 ..
-rwxrwxrwx 1 1002 1002 430 Feb 10 19:01 env-dev
(as you can see i even tried to chmod everything to fully open…)
part of my pipeline:
---
kind: pipeline
type: docker
name: dev
trigger:
branch: master
event: push
concurrency:
limit: 1
volumes:
- name: dotenv
host:
path: /env/bs-frontend
steps:
- name: build
image: node
volumes:
- name: dotenv
path: /env
commands:
- ls -al /env
- ls -al /env/dev
- exit 1
result of pipeline:
+ ls -al /env
total 0
drwxr-xr-x. 3 root root 17 Feb 10 19:06 .
drwxr-xr-x. 1 root root 64 Feb 10 19:23 ..
drwxr-xr-x. 2 root root 6 Feb 10 19:06 dev
+ ls -al /env/dev
total 0
drwxr-xr-x. 2 root root 6 Feb 10 19:06 .
drwxr-xr-x. 3 root root 17 Feb 10 19:06 ..
+ exit 1
repository is marked as trusted, its self hosted drone… Anyone any thoughts ?
Maybe there is another tested workflow for that which is not findable in internet ?