Substitute build number into S3 plugin target in 1.0


I’m trying to use the Drone S3 plugin in the most basic use case - publish build artifacts to an S3 prefix which has the build number in its name. I’m on Drone 1.0, and can’t seem to substitute DRONE_BUILD_NUMBER into the target. It ends up just using $DRONE_BUILD_NUMBER as a literal in the S3 prefix. (All of the docs around interpolation of variables seems to be for older drone versions.)

Here’s the relevant line of my yml:

Happy to open PRs to improve the docs if I can get this resolved.


try this :slight_smile:

  - name: upload
    image: plugins/s3
      bucket: cdo-ci-artifacts
      source: artifacts/**/*
-     target: /JS-Interpreter/$$DRONE_BUILD_NUMBER
+     target: /JS-Interpreter/${DRONE_BUILD_NUMBER}
      strip_prefix: artifacts/