---
- scm:
    name: govuk-app-deployment_GDS_Production_Backup
    scm:
        - git:
            url: git@github.com:alphagov/govuk-app-deployment.git
            branches:
              - release

- job:
    name: GDS_Production_Backup
    display-name: GDS_Production_Backup
    disabled: false
    project-type: freestyle
    description: |
        After a production deployment, this job pushes the state of the deployed repository to the
        <a href="https://github.gds/gds-production-backup/">gds-production-backup organisation in GitHub Enterprise</a>.
    scm:
      - govuk-app-deployment_GDS_Production_Backup
    builders:
        - shell: |
            sh sync_to_ghe.sh
    publishers:
        - email:
            recipients: 2nd-line-support@digital.cabinet-office.gov.uk
            send-to-individuals: true
    parameters:
        - string:
            name: TARGET_APPLICATION_GIT_REPO
            description: |
                The path to the git repository to back up to GitHub Enterprise.
                (This is usually populated by the upstream deployment job.)
            default: false

---
- scm:
    name: govuk-app-deployment_GDS_Production_Backup
    scm:
        - git:
            url: git@github.com:alphagov/govuk-app-deployment.git
            branches:
              - master

- job:
    name: GDS_Production_Backup
    display-name: GDS_Production_Backup
    disabled: false
    project-type: freestyle
    description: |
        After a production deployment, this job pushes the state of the deployed repository to the
        <a href="https://github.gds/gds-production-backup/">gds-production-backup organisation in GitHub Enterprise</a>.
    scm:
      - govuk-app-deployment_GDS_Production_Backup
    builders:
        - shell: |
            sh sync_to_ghe.sh
    publishers:
        - email:
            recipients: 2nd-line-support@digital.cabinet-office.gov.uk
            send-to-individuals: true
    parameters:
        - string:
            name: TARGET_APPLICATION_GIT_REPO
            description: |
                The path to the git repository to back up to GitHub Enterprise.
                (This is usually populated by the upstream deployment job.)
            default: false

Use the master branch. Not the release one.
Use the master branch. Not the release one.
