---
- project:
    name: Osmocom-release-tarballs
    jobs:
      - Osmocom-release-tarballs

- job-template:
    name: 'Osmocom-release-tarballs'
    node: osmocom-master
    project-type: freestyle
    defaults: global
    description: |
        For each relevant Osmocom repository and its tags, build release tarballs (<a href="https://osmocom.org/issues/3870">OS#3870</a>).
        <br><br>
        Publishes to: <a href="https://ftp.osmocom.org/releases/">https://ftp.osmocom.org/releases</a>
    properties:
      - build-discarder:
          days-to-keep: 30
          num-to-keep: 30
    parameters:
      - string:
          name: BRANCH_OSMO_CI
          description: |
                osmo-ci.git branch with scripts/tarballs/publish-tarballs-for-tags.sh
          default: 'master'
      - string:
          name: EMAIL_NOTIFICATIONS
          description: For failed build notifications, set to empty to disable
          default: 'jenkins-notifications@lists.osmocom.org'
    builders:
      - shell: |
          PUBLISH=1 scripts/tarballs/publish-tarballs-for-tags.sh
    scm:
      - git:
          branches:
            - '$BRANCH_OSMO_CI'
          url: https://gerrit.osmocom.org/osmo-ci
          git-config-name: 'Jenkins Builder'
          git-config-email: 'jenkins@osmocom.org'
          wipe-workspace: true
    triggers:
      - timed: "H 05 * * *"
    publishers:
       - email:
          notify-every-unstable-build: true
          recipients: '$EMAIL_NOTIFICATIONS'
    wrappers:
      - ssh-agent-credentials:
          users:
          - releases_ftp.osmocom.org

# vim: expandtab tabstop=2 shiftwidth=2
