소스 검색

ci: fix missing esptool for integration tests

Fu Hanxi 3 년 전
부모
커밋
c82adde67d
2개의 변경된 파일17개의 추가작업 그리고 6개의 파일을 삭제
  1. 16 1
      .gitlab-ci.yml
  2. 1 5
      .gitlab/ci/target-test.yml

+ 16 - 1
.gitlab-ci.yml

@@ -112,7 +112,7 @@ cache:
 
 .download_test_python_contraint_file: &download_test_python_contraint_file |
   if [[ -n "$CI_PYTHON_CONSTRAINT_BRANCH" ]]; then
-    wget -O /tmp/constraint.txt --header="Authorization:Bearer ${ESPCI_TOKEN}" https://gitlab.espressif.cn:6688/api/v4/projects/2581/repository/files/${CI_PYTHON_CONSTRAINT_FILE}/raw?ref=${CI_PYTHON_CONSTRAINT_BRANCH}
+    wget -O /tmp/constraint.txt --header="Authorization:Bearer ${ESPCI_TOKEN}" ${GITLAB_HTTP_SERVER}/api/v4/projects/2581/repository/files/${CI_PYTHON_CONSTRAINT_FILE}/raw?ref=${CI_PYTHON_CONSTRAINT_BRANCH}
     mkdir -p ~/.espressif
     mv /tmp/constraint.txt ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
   fi
@@ -147,6 +147,21 @@ before_script:
     - source tools/ci/utils.sh
     - is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
 
+.before_script_integration_test:
+  before_script:
+    # need to install esptool, needn't install idf python env
+  - source tools/ci/utils.sh
+  - is_based_on_commits $REQUIRED_ANCESTOR_COMMITS
+  - source tools/ci/setup_python.sh
+  - add_gitlab_ssh_keys
+  - fetch_submodules
+  # download the constraint file manually
+  - mkdir -p ~/.espressif
+  - wget -O ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE} --header="Authorization:Bearer ${ESPCI_TOKEN}" ${GITLAB_HTTP_SERVER}/api/v4/projects/2581/repository/files/${CI_PYTHON_CONSTRAINT_FILE}/raw
+  - *download_test_python_contraint_file
+  # TODO: remove this, IDFCI-1207
+  - pip install esptool -c ~/.espressif/${CI_PYTHON_CONSTRAINT_FILE}
+
 .before_script_macos:
   before_script:
     - source tools/ci/utils.sh

+ 1 - 5
.gitlab/ci/target-test.yml

@@ -915,7 +915,7 @@ UT_S3_FLASH:
     - .target_test_job_template
     - .rules:test:integration_test
     # needn't install idf python env
-    - .before_script_minimal
+    - .before_script_integration_test
   needs: # the assign already needs all the build jobs
     - assign_integration_test
   variables:
@@ -934,10 +934,6 @@ UT_S3_FLASH:
     - *define_config_file_name
     # first test if config file exists, if not exist, exit 0
     - test -e $CONFIG_FILE || exit 0
-    # prepare test utilities
-    - source tools/ci/setup_python.sh
-    - add_gitlab_ssh_keys
-    - fetch_submodules
     # clone local test env configs
     - retry_failed git clone $TEST_ENV_CONFIG_REPO
     - python $CHECKOUT_REF_SCRIPT ci-test-runner-configs ci-test-runner-configs