deploy.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .deploy_job_template:
  2. stage: deploy
  3. image: $ESP_ENV_IMAGE
  4. tags: [ deploy ]
  5. # Check this before push_to_github
  6. check_submodule_sync:
  7. extends:
  8. - .deploy_job_template
  9. - .rules:test:submodule
  10. stage: test_deploy
  11. tags: [ brew, github_sync ]
  12. retry: 2
  13. variables:
  14. # for brew runners, we always set GIT_STRATEGY to fetch
  15. GIT_STRATEGY: fetch
  16. SUBMODULES_TO_FETCH: "none"
  17. PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
  18. dependencies: []
  19. script:
  20. - git submodule deinit --force .
  21. # setting the default remote URL to the public one, to resolve relative location URLs
  22. - git config remote.origin.url ${PUBLIC_IDF_URL}
  23. # check if all submodules are correctly synced to public repository
  24. - git submodule init
  25. - git config --get-regexp '^submodule\..*\.url$' || true
  26. - git submodule update --recursive
  27. - echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
  28. push_to_github:
  29. extends:
  30. - .deploy_job_template
  31. - .before_script:minimal
  32. - .rules:push_to_github
  33. needs:
  34. - check_submodule_sync
  35. tags: [ brew, github_sync ]
  36. variables:
  37. # for brew runners, we always set GIT_STRATEGY to fetch
  38. GIT_STRATEGY: fetch
  39. # github also need full record of commits
  40. GIT_DEPTH: 0
  41. script:
  42. - add_github_ssh_keys
  43. - git remote remove github &>/dev/null || true
  44. - git remote add github git@github.com:espressif/esp-idf.git
  45. - tools/ci/push_to_github.sh
  46. deploy_update_SHA_in_esp-dockerfiles:
  47. extends:
  48. - .deploy_job_template
  49. - .before_script:minimal
  50. - .rules:protected-no_label-always
  51. dependencies: []
  52. variables:
  53. GIT_DEPTH: 2
  54. tags: [ shiny, build ]
  55. script:
  56. - 'curl --header "PRIVATE-TOKEN: ${ESPCI_SCRIPTS_TOKEN}" -o create_MR_in_esp_dockerfile.sh $GITLAB_HTTP_SERVER/api/v4/projects/1260/repository/files/create_MR_in_esp_dockerfile%2Fcreate_MR_in_esp_dockerfile.sh/raw\?ref\=master'
  57. - chmod +x create_MR_in_esp_dockerfile.sh
  58. - ./create_MR_in_esp_dockerfile.sh