Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.
This repository was archived by the owner on May 21, 2025. It is now read-only.

Unable to read token off Azure pipeline secret variable #203

Closed

Description

@pllim

Hi. I have the following job on Azure but I am having problem getting codecov to upload the result. I have CODECOV_TOKEN defined as secret pipeline variable in the pipeline settings. What I am doing wrong? I am unable to find any good working examples. Thank you!

  jobs:
  - job: 'Coverage'
    pool:
      vmImage: 'Ubuntu-16.04'
    strategy:
      maxParallel: 4

    steps:
    - task: UsePythonVersion@0

    - script: |
        sudo apt-get install libxml2-utils
        python -m pip install --upgrade pip setuptools
        pip install numpy scipy astropy pytest-astropy codecov
        python setup.py test --coverage --open-files --remote-data
      displayName: 'Run tests'

    - script: codecov -t $codecov_token
      env:
        codecov_token: $(CODECOV_TOKEN)
      displayName: 'Calculate coverage'

The error:

Script contents:
codecov -t $codecov_token
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/1f89c35e-940f-46ac-8a25-f5a6788d0909.sh

      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.0.15

==>‌ Detecting CI provider‌
  -> Got branch from git/hg
  -> Got sha from git/hg
==>‌ Preparing upload‌
==>‌ Processing gcov (disable by -X gcov)‌
    Executing gcov (find /home/vsts/work/1/s -not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**' -type f -name '*.gcno'  -exec gcov -pb  {} +)
==>‌ Collecting reports‌
    ‌+‌ /home/vsts/work/1/s/synphot/tests/coveragerc bytes=825‌
    Generating coverage xml reports for Python
    ‌+‌ /home/vsts/work/1/s/coverage.xml bytes=64330‌
==>‌ Uploading‌
    .url https://codecov.io
    .query commit=5dd2bcbc2dd5211be036bca1d9a2f6a17c5dd958&branch=HEAD&token=<secret>&package=py2.0.15
    Pinging Codecov...
Error:‌ HTTP 400‌
Provided token is not a UUID.

xref spacetelescope/synphot_refactor#194

p.s. This won't be a problem if #193 is done.

Activity

  1. bstaletic commented on Jun 26, 2019

    @bstaletic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions