From 54d839bdde04dafda6bc7a045060ade222ff5aa4 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Thu, 14 Nov 2024 19:05:37 +0500 Subject: [PATCH] build: remove unused test_build_server role --- .../roles/test_build_server/defaults/main.yml | 19 ------- .../files/test-development-environment.sh | 56 ------------------- .../roles/test_build_server/meta/main.yml | 26 --------- .../roles/test_build_server/tasks/main.yml | 48 ---------------- 4 files changed, 149 deletions(-) delete mode 100644 playbooks/roles/test_build_server/defaults/main.yml delete mode 100755 playbooks/roles/test_build_server/files/test-development-environment.sh delete mode 100644 playbooks/roles/test_build_server/meta/main.yml delete mode 100644 playbooks/roles/test_build_server/tasks/main.yml diff --git a/playbooks/roles/test_build_server/defaults/main.yml b/playbooks/roles/test_build_server/defaults/main.yml deleted file mode 100644 index 300843ef990..00000000000 --- a/playbooks/roles/test_build_server/defaults/main.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# -# edX Configuration -# -# github: https://github.com/openedx/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/openedx/configuration/blob/master/LICENSE.TXT -# -## -# Defaults for role test_build_server -# - -# -# vars are namespace with the module name. -# -test_build_server_user: jenkins -test_build_server_repo_path: /home/jenkins -TEST_EDX_PLATFORM_VERSION: master diff --git a/playbooks/roles/test_build_server/files/test-development-environment.sh b/playbooks/roles/test_build_server/files/test-development-environment.sh deleted file mode 100755 index 03b409e725c..00000000000 --- a/playbooks/roles/test_build_server/files/test-development-environment.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -set -e -################################################################################ -# This executes a small subset of the edx-platform tests. It is intended as -# a means of testing newly provisioned AMIs for our jenkins workers. -# -# The two main things that happen here: -# 1. The setup from edx-platform/scripts/all-tests.sh, the script that is -# run by the jenkins workers to kick off tests. -# 2. The paver command for tests, coverage and quality reports are run. -# For the tests, it runs only a small number of test cases for each -# test suite. -############################################################################### - -# Doing this rather than copying the file into the scripts folder so that -# this file doesn't get cleaned out by the 'git clean' in all-tests.sh. -cd edx-platform-clone - -# This will run all of the setup it usually runs, but none of the -# tests because TEST_SUITE isn't defined. -export PYTHON_VERSION=3.8 -source scripts/jenkins-common.sh - -case "$1" in - "unit") - - # Now we can run a subset of the tests via paver. - # Run some of the common/lib unit tests - paver test_lib -t common/lib/xmodule/xmodule/tests/test_stringify.py - - # Generate some coverage reports - # Since `TEST_SUITE` is not set, change the coverage file written by the - # previous test to a generic one. - cp reports/common_lib_xmodule.coverage reports/.coverage - paver coverage - - # Run some of the djangoapp unit tests - paver test_system -t lms/djangoapps/courseware/tests/tests.py - paver test_system -t cms/djangoapps/course_creators/tests/test_views.py - ;; - - "js") - - # Run some of the javascript unit tests - paver test_js_run -s lms-coffee - ;; - - "quality") - # Generate quality reports - paver run_quality - ;; - - *) - echo "args required" - exit 1 -esac diff --git a/playbooks/roles/test_build_server/meta/main.yml b/playbooks/roles/test_build_server/meta/main.yml deleted file mode 100644 index 39c023632c8..00000000000 --- a/playbooks/roles/test_build_server/meta/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# -# edX Configuration -# -# github: https://github.com/openedx/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/openedx/configuration/blob/master/LICENSE.TXT -# -## -# Role includes for role test_build_server -# -# Example: -# -# dependencies: -# - { -# role: my_role -# my_role_var0: "foo" -# my_role_var1: "bar" -# } - -#### INTENTIONALLY LEFT BLANK #### - -# Since this is a test role, it should not install anything extra onto the -# target machine, thus altering the system under test. Be careful when -# adding dependencies. diff --git a/playbooks/roles/test_build_server/tasks/main.yml b/playbooks/roles/test_build_server/tasks/main.yml deleted file mode 100644 index d2a93b8aeea..00000000000 --- a/playbooks/roles/test_build_server/tasks/main.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# -# edX Configuration -# -# github: https://github.com/openedx/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/openedx/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/openedx/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.8" - become_user: "{{ test_build_server_user }}" - with_items: - - "unit" - - "js"