Unable to get basic build to pass

194 views
Skip to first unread message

Robert Bracewell

unread,
Mar 9, 2015, 2:30:47 AM3/9/15
to concou...@googlegroups.com
Fired up Concourse under Vagrant.

Created a directory that contains build.yml and a script called test. See below.
From this directory I run fly and get the following:
-                    100% |*******************************|   361   0:00:00 ETA
initializing with docker:///ubuntu#14.04
running test
failed

Any pointers on what I am missing or additional steps to see why it failed. When I invoke fly intercept the script doesn't seem to have any issues running.

build.yml:
---
platform: linux

image: docker:///ubuntu#14.04

run:
  path: test

test:
#!/bin/bash

echo "START"
echo "END"

Thanks,
Robert

Alex

unread,
Mar 9, 2015, 2:50:46 AM3/9/15
to concou...@googlegroups.com
This is the first thing I've seen people trip up on when getting started. The short answer is, your 'path' attribute needs to specify the directory name containing the 'test' file.

When running from a local directory, the directory name matches the name of the working directory, so if your tree was:

concourse-test/
concourse-test/build.yml
concourse-test/test

you'll need this as your run.path:

concourse-test/test

The reason for this: since a build can be used in a job that configures N inputs, each input must be named and placed in its own directory. This is a bit confusing when you're running something in isolation, and is not documented very well.

We may change this in the near future, as part of our current work on supporting generic "build plans". Here's the related story:


Thanks for trying it out, hope this helps!

Alex

Robert Bracewell

unread,
Mar 9, 2015, 3:29:04 AM3/9/15
to concou...@googlegroups.com
Worked a treat. The basic building block now runs to success.

Moving to the next step I created a pipeline trying to keep it simple to start with but this reports a started phase and never seems to complete. Not quite sure what interval defaults to though

test.yml:
resources:
  - name: controller
    type: time
    source:
      interval: 1
jobs:
  - name: controller-test
    build: test/build.yml
    inputs:
      - resource: controller

Any pointers appreciated

Thanks,
Robert

On Sunday, March 8, 2015 at 11:30:47 PM UTC-7, Robert Bracewell wrote:

Alex Suraci

unread,
Mar 9, 2015, 3:33:20 AM3/9/15
to Robert Bracewell, concou...@googlegroups.com

Interval is a duration so it needs a unit specified. So just "1" may be failing to parse, or end up as the base time unit (nanoseconds), not sure which. Try changing it to something like 1m (for 1 minute)?

--
You received this message because you are subscribed to a topic in the Google Groups "Concourse Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/concourse-ci/KlJwqNtB1Wo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to concourse-ci...@googlegroups.com.
To post to this group, send email to concou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/concourse-ci/78da5c84-7741-4915-82c6-1326eb75343b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Bracewell

unread,
Mar 9, 2015, 3:47:29 AM3/9/15
to concou...@googlegroups.com, bracewe...@gmail.com, surac...@gmail.com
1m worked

Pipeline now reports file not found when it triggers every minute

Pipeline yml contains:
resources:
  - name: controller
    type: time
    source:
      interval: 1m
jobs:
  - name: controller-test
    build: test/build.yml
    inputs:
      - resource: controller

Thanks for working with me to get a basic pipeline in place

--
Robert

surac...@gmail.com

unread,
Mar 9, 2015, 11:27:04 AM3/9/15
to concou...@googlegroups.com, bracewe...@gmail.com, surac...@gmail.com
Cool, so it was probably just failing to parse. I've added a story to make that easier to debug: https://www.pivotaltracker.com/story/show/89923302

For a job to execute a build.yml, it must be provided via one of the inputs. Otherwise you can inline the build config by specifying `config` instead.

So in this case, you'll want to define a `test` resource, which could just point at a private GitHub gist or something (they're great for throwaway public git repos), and put `build.yml` in there.

Note that the name in the job's `build` attribute's path corresponds to the input name, hence calling it `test` would work this time.

Alex
Reply all
Reply to author
Forward
0 new messages