format_version: 3
pipelines:
  Pkglistgen.openSUSE_Factory:
    group: Factory.pkglistgen
    lock_behavior: unlockWhenFinished
    environment_variables:
      OSC_CONFIG: /home/go/config/oscrc-staging-bot
    timer:
      spec: 0 40 * ? * *
      only_on_changes: false
    materials:
      git:
        git: https://github.com/openSUSE/openSUSE-release-tools.git
    stages:
    - pkglistgen:
        approval:
          type: manual
        jobs:
          openSUSE_Factory_target:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s target --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s target
          openSUSE_Factory_rings:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s rings --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory -s rings
          openSUSE_Factory_ARM_target:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s target --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s target
          openSUSE_Factory_ARM_rings:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s rings --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:ARM -s rings
          openSUSE_Factory_PowerPC:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:PowerPC --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:PowerPC
          openSUSE_Factory_zSystems:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:zSystems --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:zSystems
          openSUSE_Factory_RISCV:
            resources:
            - repo-checker
            tasks:
              - script: |
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:RISCV --only-release-packages
                  python3 -u ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Factory:RISCV
  Update.Repos.Factory:
    group: Factory.pkglistgen
    lock_behavior: unlockWhenFinished
    environment_variables:
      OSC_CONFIG: /home/go/config/oscrc-staging-bot
    timer:
      spec: 0 0 21 ? * *
      only_on_changes: false
    materials:
      git:
        git: https://github.com/openSUSE/openSUSE-release-tools.git
    stages:
    - Update:
        approval:
          type: manual
        jobs:
          openSUSE_Factory:
            resources:
            - repo-checker
            tasks:
             - script: python3 -u ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Factory
          openSUSE_Factory_ARM:
            resources:
            - repo-checker
            tasks:
             - script: python3 -u ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Factory:ARM
          openSUSE_Factory_PowerPC:
            resources:
            - repo-checker
            tasks:
             - script: python3 -u ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Factory:PowerPC
          openSUSE_Factory_RISCV:
            resources:
            - repo-checker
            tasks:
             - script: python3 -u ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Factory:RISCV
  Pkglistgen.openSUSE_Leap_15.4:
    group: Leap.pkglistgen
    lock_behavior: unlockWhenFinished
    environment_variables:
      OSC_CONFIG: /home/go/config/oscrc-staging-bot
    timer:
      spec: 0 40 * ? * *
      only_on_changes: false
    materials:
      git:
        git: https://github.com/openSUSE/openSUSE-release-tools.git
    stages:
    - pkglistgen:
        approval:
          type: manual
        jobs:
          openSUSE_Leap_15.4_target:
            resources:
            - repo-checker
            tasks:
            - script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.4 -s SUSE:SLE-15-SP4:GA
            - script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:15.4 -s target
  Pkglistgen.openSUSE_Leap_15.3_Update_Respin:
    group: Leap.pkglistgen
    lock_behavior: unlockWhenFinished
    environment_variables:
      OSC_CONFIG: /home/go/config/oscrc-staging-bot
    timer:
      spec: 0 40 * ? * *
      only_on_changes: false
    materials:
      git:
        git: https://github.com/openSUSE/openSUSE-release-tools.git
    stages:
    - pkglistgen:
        approval:
          type: manual
        jobs:
          openSUSE_Leap_15.3_Update_Respin_target:
            resources:
            - repo-checker
            tasks:
            - script: python3 ./skippkg-finder.py -A https://api.opensuse.org -o openSUSE:Leap:15.3:Update:Respin -t openSUSE:Leap:15.3:Update -s SUSE:SLE-15-SP3:Update
            - script: python3 ./pkglistgen.py -d -A https://api.opensuse.org update_and_solve -p openSUSE:Leap:15.3:Update:Respin -s target

  Update.Repos.Leap:
    group: Leap.pkglistgen
    lock_behavior: unlockWhenFinished
    environment_variables:
      OSC_CONFIG: /home/go/config/oscrc-staging-bot
    timer:
      spec: 0 0 0 */3 * ?
      only_on_changes: false
    materials:
      git:
        git: https://github.com/openSUSE/openSUSE-release-tools.git
    stages:
    - Update:
        approval:
          type: manual
        jobs:
          openSUSE_Leap_15.4:
            resources:
            - repo-checker
            tasks:
             - script: python3 ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Leap:15.4
          openSUSE_Leap_15.3_Update_Respin:
            resources:
            - repo-checker
            tasks:
             - script: python3 ./pkglistgen.py --apiurl https://api.opensuse.org handle_update_repos openSUSE:Leap:15.3:Update:Respin
