diff --git a/.drone.yml b/.drone.yml index 894c808..91b2162 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ steps: image: rustlang/rust:nightly volumes: - name: ci - path: /drone/src/target/debug + path: /mnt/ci environment: PKG_CONFIG_SYSROOT_DIR: "/" commands: @@ -16,6 +16,8 @@ steps: - apt install musl-tools pkg-config libssl-dev openssl build-essential musl-dev -y - rustup target add x86_64-unknown-linux-musl - cargo build --target=x86_64-unknown-linux-musl -p ci + - mkdir - + - mv target/x86_64-unknown-linux-musl/debug/ci "$CI_PREFIX/ci" - name: load_secret image: debian:buster-slim @@ -68,7 +70,7 @@ steps: - name: dockersock path: /var/run - name: ci - path: /drone/src/target/debug + path: /mnt/ci commands: - eval `ssh-agent` - chmod -R 600 ~/.ssh @@ -79,7 +81,7 @@ steps: CUDDLE_SECRETS_PROVIDER: 1password CUDDLE_ONE_PASSWORD_DOT_ENV: ".env.ci" CUDDLE_SSH_AGENT: "true" - CUDDLE_CI: "true" + CI_PREFIX: "/mnt/ci/ci" CUDDLE_PLEASE_TOKEN: from_secret: cuddle_please_token OP_SERVICE_ACCOUNT_TOKEN: diff --git a/scripts/ci:main.sh b/scripts/ci:main.sh index 1a90ae4..0ad986d 100755 --- a/scripts/ci:main.sh +++ b/scripts/ci:main.sh @@ -4,13 +4,10 @@ set -e CMD_PREFIX="cargo run -p ci --" -if [[ -n "$CUDDLE_CI" ]]; then - CMD_PREFIX="./target/debug/ci" +if [[ -n "$CI_PREFIX" ]]; then + CMD_PREFIX="$CI_PREFIX" fi -echo "$PWD" - -ls target/debug $CMD_PREFIX main \ --mkdocs-image "$MKDOCS_IMAGE" \