---
- scm:
    name: cdn-configs_Deploy_CDN
    scm:
        - git:
            url: git@github.gds:gds/cdn-configs
            branches:
              - master
            wipe-workspace: false
            clean:
                after: true

- job:
    name: Deploy_CDN
    display-name: Deploy_CDN
    project-type: freestyle
    properties:
        - github:
            url: https://github.gds/gds/cdn-configs/
    scm:
      - cdn-configs_Deploy_CDN
    builders:
        - shell: |
            cd fastly
            bundle install --path "${HOME}/bundles/${JOB_NAME}"
            bundle exec ./deploy_vcl ${vhost} <%= @environment %>
    wrappers:
        - ansicolor:
            colormap: xterm
        - build-name:
            name: '#${BUILD_NUMBER} ${ENV,var="vhost"}'
    parameters:
        - choice:
            name: vhost
            choices:
                - PLEASE CHOOSE ONE
                - www
                - assets
                - apt
                - tldredirect
                - performanceplatform
                - performanceplatform_admin
                - performanceplatform_stagecraft
        - string:
            name: FASTLY_USER
            default: false
        - password:
            name: FASTLY_PASS
            default: false

---
- scm:
    name: cdn-configs_Deploy_CDN
    scm:
        - git:
            url: git@github.com:alphagov/fastly-configure.git
            branches:
              - master
            wipe-workspace: true
            clean:
                after: true

- job:
    name: Deploy_CDN
    display-name: Deploy_CDN
    project-type: freestyle
    properties:
        - github:
            url: https://github.com/alphagov/fastly-configure/
    scm:
      - cdn-configs_Deploy_CDN
    builders:
        - shell: |
            export ENVIRONMENT=<%= @environment %>
            ./jenkins.sh
    wrappers:
        - ansicolor:
            colormap: xterm
        - build-name:
            name: '#${BUILD_NUMBER} ${ENV,var="vhost"}'
    parameters:
        - choice:
            name: vhost
            choices:
                - PLEASE CHOOSE ONE
                - www
                - assets
                - apt
                - tldredirect
                - performanceplatform
                - performanceplatform_admin
                - performanceplatform_stagecraft
        - string:
            name: FASTLY_USER
            default: false
        - password:
            name: FASTLY_PASS
            default: false

Update Jenkins job for deploying the CDN
Update Jenkins job for deploying the CDN

We're publishing our VCL and this commit is a supporting change.
