---
#
# edX Configuration
#
# github:     https://github.com/edx/configuration
# wiki:       https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license:    https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Tasks for role test_build_server
#
# Overview:
#
#
# Dependencies:
#
#
# Example play:
#

- name: Create clone of edx-platform
  git:
    repo: "https://github.com/edx/edx-platform.git"
    dest: "{{ test_build_server_repo_path }}/edx-platform-clone"
    version: "{{ test_edx_platform_version }}"
  become_user: "{{ test_build_server_user }}"

- name: get xargs limit
  shell: "xargs --show-limits"

- name: Copy test-development-environment.sh to somewhere the jenkins user can access it
  copy:
    src: test-development-environment.sh
    dest: "{{ test_build_server_repo_path }}"
    mode: 0755

- name: Validate build environment
  shell: "bash test-development-environment.sh {{ item }}"
  args:
    chdir: "{{ test_build_server_repo_path }}/"
  become_user: "{{ test_build_server_user }}"
  with_items:
    - "unit"
    - "js"
    - "bokchoy"

---
#
# edX Configuration
#
# github:     https://github.com/edx/configuration
# wiki:       https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license:    https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Tasks for role test_build_server
#
# Overview:
#
#
# Dependencies:
#
#
# Example play:
#

- name: Create clone of edx-platform
  git:
    repo: "https://github.com/edx/edx-platform.git"
    dest: "{{ test_build_server_repo_path }}/edx-platform-clone"
    version: "{{ test_edx_platform_version }}"
  become_user: "{{ test_build_server_user }}"

- name: get xargs limit
  shell: "xargs --show-limits"

- name: Copy test-development-environment.sh to somewhere the jenkins user can access it
  copy:
    src: test-development-environment.sh
    dest: "{{ test_build_server_repo_path }}"
    mode: 0755

- name: Validate build environment
  shell: "bash test-development-environment.sh {{ item }}"
  args:
    chdir: "{{ test_build_server_repo_path }}/"
  environment:
    PYTHON_VERSION: "3.5"
  become_user: "{{ test_build_server_user }}"
  with_items:
    - "unit"
    - "js"
    - "bokchoy"

Set python version for jenkins build tests.
Set python version for jenkins build tests.
