---
- scm:
    name: govuk-provisioning_Network_Config_Deploy_DryRun
    scm:
        - git:
            url: git@github.gds:gds/govuk-provisioning.git
            branches:
              - master

- job:
    name: Network_Config_Deploy_DryRun
    display-name: Network_Config_Deploy_DryRun
    project-type: freestyle
    description: "Dry run only. Use this to observe the diff output before deploying for real. Accepts a branch so that you can test pull requests."
    properties:
        - github:
            url: https://github.gds/gds/govuk-provisioning/
    scm:
      - govuk-provisioning_Network_Config_Deploy_DryRun
    builders:
        - shell: |
            ./vcloud-edge_gateway/jenkins.sh <%= @environment_script_parameter %> --dry-run
    wrappers:
        - ansicolor:
            colormap: xterm
        - build-name:
            name: '#${BUILD_NUMBER} ${ENV,var="component"}'
    parameters:
        - choice:
            name: COMPONENT
            description: Which part of the networking config do you wish to update?
            choices:
                - PLEASE CHOOSE ONE
                - lb
                - nat
                - firewall
                - vpn
        - string:
            name: USERNAME
            description: Vcloud username
        - password:
            name: VCLOUD_PASSWORD
            description: Vcloud Password
        - choice:
            name: TARGET_ENVIRONMENT
            description: The environment to deploy network configuration to
            choices:
                <%- @environments.each do |env| -%>
                - <%= env %>
                <%- end -%>

---
- scm:
    name: govuk-provisioning_Network_Config_Deploy_DryRun
    scm:
        - git:
            url: git@github.gds:gds/govuk-provisioning.git
            branches:
              - master

- job:
    name: Network_Config_Deploy_DryRun
    display-name: Network_Config_Deploy_DryRun
    project-type: freestyle
    description: "Dry run only. Use this to observe the diff output before deploying for real. Accepts a branch so that you can test pull requests."
    properties:
        - github:
            url: https://github.gds/gds/govuk-provisioning/
    scm:
      - govuk-provisioning_Network_Config_Deploy_DryRun
    builders:
        - shell: |
            ./vcloud-edge_gateway/jenkins.sh ${TARGET_ENVIRONMENT} --dry-run
    wrappers:
        - ansicolor:
            colormap: xterm
        - build-name:
            name: '#${BUILD_NUMBER} ${ENV,var="component"}'
    parameters:
        - choice:
            name: COMPONENT
            description: Which part of the networking config do you wish to update?
            choices:
                - PLEASE CHOOSE ONE
                - lb
                - nat
                - firewall
                - vpn
        - string:
            name: USERNAME
            description: Vcloud username
        - password:
            name: VCLOUD_PASSWORD
            description: Vcloud Password
        - choice:
            name: TARGET_ENVIRONMENT
            description: The environment to deploy network configuration to
            choices:
                <%- @environments.each do |env| -%>
                - <%= env %>
                <%- end -%>

Fix target_environment passed to jenkins.sh
Fix target_environment passed to jenkins.sh

@environment_script_parameter no longer exists, it
should be $TARGET_ENVIRONMENT as in other places.