Override inferred compile command?

I’m using CircleCI to build & deploy a Middleman site. I’d love to share a link with you, but it’s private :confused:

Circle is sort-of-correctly inferring the Compile command should be bundle exec middleman build, but I’d like to change it to bundle exec middleman build --verbose, so whenever the build fails, it gives me useful info - I won’t check the logs when it works, so I don’t care about the verbosity in the successful builds anyway.

I can’t find a way to override that step in my circle.yml, though. This is what it currently looks like:

test:
  pre:
    - python -m SimpleHTTPServer:
        background: true
        pwd: build
    - sleep 5
  override:
    - wget -r -l8000 --spider -e robots=off -D localhost http://localhost:8000 -o $CIRCLE_ARTIFACTS/broken-links.log
  post:
    - rm build/nohup.out

deployment:
  s3:
    branch:
      - master
      - staging
      - development
    commands:
      - bundle exec middleman s3_sync

How could I specify that I want to change the build command? I may add a previous command that manually does that build, but then it would double every build’s time.

Middleman doesn’t seem to provide a way to set the verbosity through an environment variable - which would be a nice feature and do the trick in this case - so I am left with changing that command. But circle.yml - File structre and content doesn’t even list Compile as a phase :confused:

Am I missing something?

It seems that there actually is a compile: section, but it wasn’t documented. I’ve just proposed https://github.com/circleci/circleci-docs/pull/457 to fix this - and was able to fix my build :tada:

1 Like

Just a follow up - the doc update got merged in https://github.com/circleci/circleci-docs/pull/475, so the compile: section is currently displayed in the Compile section of the docs.

1 Like