format_version: 10
pipelines:
  Demo-php-pipeline:
    group: PHP
    label_template: ${COUNT}
    lock_behavior: none
    display_order: -1
    materials:
      git-dc38cc2:
        git: https://github.com/vjmax/Gocd-demo.git
        username: vjmax
        shallow_clone: false
        auto_update: true
        branch: main
        encrypted_password: AES:TvNUZkykQr/Kh7vAEaVIxA==:G7KCW/om61jKEHgrPqaYIrj9yoamxGlP4aREMaJbo2Hh8uCl2mQc/ckwQ0FPkcAS
    stages:
    - Demo-php-stage:
        fetch_materials: true
        keep_artifacts: false
        clean_workspace: false
        approval:
          type: success
          allow_only_on_success: false
        jobs:
          Demo-php-job:
            timeout: 0
            run_instances: all
            tabs:
              Record: test/index.html
            resources:
            - Copy-war
            artifacts:
            - build:
                source: index.html
                destination: test
            tasks:
            - exec:
                arguments:
                - -c
                - cd /var/www/html && git pull
                command: /bin/bash
                run_if: passed
    parameters:
      team: IMS
      path: /var/www/html
      path2: /var/www/go-php
