Shippable / support

Shippable SaaS customers can report issues and feature requests in this repository
101 stars 28 forks source link

Unable to get scheduled builds working #5107

Closed barryaschultz closed 4 years ago

barryaschultz commented 4 years ago

I have been trying for some time now to get scheduled builds working for a project.

The standard runCI job is triggered on commits, but the scheduled job defined in the shippable.yml is not detected.

My shippable.yml file is of the contains a resource and a job copied from the shippable docs page

language: java

jdk:
  - oraclejdk8

env:
  global:
  # values removed

resources:
  - name: trigger_job1  # name your resource
    type: time
    versionTemplate:
      interval: "*/2 * * * *" #This follows standard cron format. This particular config will trigger job every 2 mins

jobs:
  - name: diagnostic-platform-temp-fork_runCI
    type: runCI
    steps:
      - IN: trigger_job1
    on_success:
      - script: echo 'on success !!!!!'
    on_failure:
      - script: echo 'Failed job .... :('

build:
  cache: trueIn p
  cache_dir_list:
    - $HOME/.m2
  ci:
    # Building the project
    - echo "build/ci start..."
    - mvn --batch-mode clean
    - echo "build/ci done."

integrations:
 # values removed

The main build and ci sections get executed but the scheduled build don't. I feel like I'm probably missing something obvious here but I just cant see it.

Any help would be appreciated. Thanks

a-murphy commented 4 years ago

Jobs and resources are part of Assembly Lines and so a CI job that isn't also a syncRepo for an Assembly Line won't see the jobs or resources sections. Directions to add an Assembly Line are here.

barryaschultz commented 4 years ago

Thanks @a-murphy.

I hadn't realised this needed to be done via an Assembly Line.