Drone exec Help

Hi,

I have a drone instance working (thanks!!) and it is being triggered by commits to the associated Gogs repo. However, I want to be able to run drone builds locally, partially to test changes to my project without using a git commit and git push to get feedback about the drone build.

I have tried to use drone exec --local but I see no feedback aside from the following message to the console:

➜  drone exec --local
Running Matrix job #0

Questions:

  1. How do you get output from the exec command?
  2. Where does the exec run and is there a requirement that I am running a local drone agent?

Cheers,
-Lyndon

There are two reasons this would happen:

  1. You have an empty or missing pipeline block in your yaml. This is common when the server is running drone:0.4 but the command line utility is for drone 0.5
  2. Your pipeline consists of only plugins steps, which are not executed by default and require extra command line flags to execute

Please provide the following information so I can advise further

  • copy of your yaml
  • drone image name (ie drone/drone:0.5)
  • drone command line utility version

Brad,

Turns out that your 2nd reason was the issue.

pipeline:
  clone:
    skip_verify: true
  docker:
    registry: docker-registry.somedomain.com:5000
    repo: lwash
    image: java
    tags:
      - latest
      - 8
      - 8u92
    build_args:
      - JAVA_MAJOR=8
      - JAVA_UPDATE=92
      - JAVA_SHORT_VERSION=b14

Previously I was using drone exec --local, but after some experimentation I discovered that drone exec --plugin docker worked.

Follow-on questions:

  1. How do I invoke the publish step via a drone exec invocation?
  2. How do I get the docker build steps to print out in the build log? Is there a verbosity or debug setting for the drone CLI?
  3. What does the --local parameter in a drone exec invocation change?

Cheers,
-Lyndon

I have the same questions.

Lyndon, by build log, you mean the output from the drone exec command, correct?

Lyndon, by build log, you mean the output from the drone exec command, correct?

Correct! :slight_smile: