format_version: 3
pipelines:
<% ['Factory', 'Factory:ARM', 'MicroOS', 'MicroOS:ARM'].each_with_index do |project, index| -%>
<% name = project.gsub(':', '_') -%>
  Announcer.<%= name %>:
    group: openSUSE.Checkers
    lock_behavior: unlockWhenFinished
    environment_variables:
      OSC_CONFIG: /home/go/config/oscrc-staging-bot
    materials:
      script:
        git: https://github.com/openSUSE/openSUSE-release-tools.git
    timer:
      spec: 0 <%= index %> * ? * *
      only_on_changes: false
    stages:
    - Run:
        approval: manual
        resources:
          - staging-bot
        tasks:
          - script: ./factory-package-news/announcer.py --config config/announcer/openSUSE:<%= project %>.yml --verbose --state-file /home/go/config/announcer.yaml
<% end -%>
