Commit 4e10d063 authored by Thomas Braun's avatar Thomas Braun
Browse files

.gitlab-ci.yml: Avoid certificate issues with curl

We currently get a failing CI job [1] with

ERROR: cannot verify gitlab.com's certificate, issued by 'CN=Cloudflare Inc ECC CA-3,O=Cloudflare\\, Inc.,C=US':
  Unable to locally verify the issuer's authority.
To connect to gitlab.com insecurely, use `--no-check-certificate'.

The reason for this is unclear. By using curl.exe, which has access to the Windows
certificate store, we avoid that issue.

We have to use curl.exe instead of plain curl, as the latter is an alias
in powershell [2].

[1]: https://gitlab.com/tango-controls/TangoAccessControl/-/jobs/3990410698
[2]: https://stackoverflow.com/a/30807818/4859183
parent d312cf36
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -66,14 +66,14 @@ variables:
        MYSQL: "mysql-${MYSQL_VERSION}.${MYSQL_VERSION_PATCH}-win32"
        MYSQL_PATH: "${DEPS_PATH}/${MYSQL}"
  before_script:
    - choco install cmake -y
    - choco install cmake curl -y
    - $env:Path += ";C:\Program Files\CMake\bin"
    - $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
    - msbuild /version
    - if (Test-Path "${DEPS_PATH}") { Remove-Item "${DEPS_PATH}" -Recurse -Force; }
    - New-Item "${DEPS_PATH}" -ItemType Directory
      # See LIBTANGO constant at the top for the exact name
    - wget.exe "${DOWNLOAD_URL}" -P "${DEPS_PATH}"
    - curl.exe -qSL "${DOWNLOAD_URL}" -o "${DEPS_PATH}/download"
    - 7z x "${DEPS_PATH}/download" -o"${DEPS_PATH}"
    - wget.exe "https://dev.mysql.com/get/Downloads/MySQL-${MYSQL_VERSION}/${MYSQL}.zip" -P "${DEPS_PATH}"
    - 7z x "${DEPS_PATH}/${MYSQL}.zip" -o"${DEPS_PATH}"