Cirrus-ci-docs: CIRRUS_WORKING_DIR default not working

Created on 15 Aug 2019  路  6Comments  路  Source: cirruslabs/cirrus-ci-docs

I have not checked on other OSs, but this is at least applicable to windows builds

Expected Behavior

CIRRUS_WORKING_DIR should have a default value of "cirrus-ci-build folder inside of a system's temporary folder" when not defined

Real Behavior

it is undefined

bug

Most helpful comment

This is fixed now. Took a while to roll the change since it a change on the Cirrus agent side.

All 6 comments

@kne42 could you please attache an example of such task where it happened?

here's a toy example

task:
    windows_container:
        image: cirrusci/windowsservercore:2019
        os_version: 2019
    env:
         USING_CWD: $CIRRUS_WORKING_DIR\something
    test_script:
        - echo %CIRRUS_WORKING_DIR%
        - echo %USING_CWD%

it shows up as

$ echo %CIRRUS_WORKING_DIR%
C:/Users/ContainerAdministrator/AppData/Local/Temp/cirrus-ci-build
$ echo %USING_CWD%
\something

so I guess a more accurate description is that the default is not properly set before evaluating environment variables

real world example: https://cirrus-ci.com/task/5739998471520256?command=separate#L46

task:
  auto_cancellation: true

  env:
    matrix:
      PY_VER: "3.6"

  matrix:
    - name: windows
      windows_container:
        image: cirrusci/windowsservercore:2019
        os_version: 2019
      env:
        ANACONDA_LOCATION: $USERPROFILE\anaconda
        PATH: $PATH;ANACONDA_LOCATION\Scripts;ANACONDA_LOCATION
        # https://github.com/vispy/vispy/blob/v0.5.3/appveyor.yml#L44
        VISPY_GL_LIB: $CIRRUS_WORKING_DIR\opengl32.dll
        PYTHON_ARCH: 64
      system_script:
        # install OpenSSL
        - choco install -y openssl.light
        # install OpenGL
        - ps: Invoke-RestMethod -Uri https://raw.githubusercontent.com/vispy/vispy/v0.5.3/make/install_opengl.ps1 -Method Get -OutFile opengl.ps1
        - powershell ./opengl.ps1
        - ps: rm opengl.ps1
      separate_script:
        - dir
        - echo %VISPY_GL_LIB%
        - echo %CIRRUS_WORKING_DIR%
        - dir %CIRRUS_WORKING_DIR%
        - dir C:\Windows\system32
      conda_script:
        - choco install -y miniconda3 --params="'/D:%USERPROFILE%\anaconda'"
        - conda update -yn base conda
        - conda install -y python=%PY_VER%
        - pip install setuptools-scm

  install_script:
    # pip >= 19.0 crashes on Linux with Python 3.7
    - python -m pip install --retries 3 --upgrade "pip<19.0"
    - pip install --retries 3 -r requirements.txt
    - python setup.py develop

  check_script:
    - pip list
    - python -c "import napari; print(napari.__version__)"

  test_script:
    - pytest -v

I can reproduce it in an integration test. Working on a fix. 馃憣

This is fixed now. Took a while to roll the change since it a change on the Cirrus agent side.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dotdoom picture dotdoom  路  5Comments

asomers picture asomers  路  3Comments

hilbix picture hilbix  路  3Comments

fkorotkov picture fkorotkov  路  3Comments

cevich picture cevich  路  5Comments