Coder Social home page Coder Social logo

Comments (4)

pedrorijo91 avatar pedrorijo91 commented on August 29, 2024

Hi @kpmeen,

We don't have experience with Shippable, but other CI systems typically allow to set environment variables. Even private/secret environment variables are accessible on runtime, and the sbt plugin can use the project token as an environment variable.

Doesn't that happen on Shippable?

from sbt-codacy-coverage.

kpmeen avatar kpmeen commented on August 29, 2024

Hi @pedrorijo91,

Shippable is very similar to e.g. Travis CI. In fact, the Shippable can handle Travis CI configs just as well as their own format.

As mentioned above, this error only occurs when building a PR that was created from a fork of the upstream repository. Because, on Shippable, encrypted tokens are only available to branches from the upstream repository.

I found a workaround for the problem though (see below). But, IMO it is not correct to exit with 0 if the build isn't able to push the coverage results to Codacy. In many cases it is a "nice to have" feature, but not something that would/should stop the build pipeline.

Workaround for shippable:

// omitted stuff
...
build:
  ci:
    - sbt clean coverage test coverageReport
    - sbt coverageAggregate
    - if [[ -n "$CODACY_PROJECT_TOKEN" ]]; then sbt codacyCoverage; else echo "Coverage reporting disabled for PR from forks"; fi

...

I can live with this workaround. But if others stumble upon the same issue it should be documented somewhere.

from sbt-codacy-coverage.

pedrorijo91 avatar pedrorijo91 commented on August 29, 2024

Thanks for the clarification! I now understand your problem.

While it can be a nice to have feature, just as you said, we do not have the time to develop it currently, but if you find the time to do it, and create a PR, we will certainly have a look at it so that it can be merged quickly.

from sbt-codacy-coverage.

rtfpessoa avatar rtfpessoa commented on August 29, 2024

Added note in #39

from sbt-codacy-coverage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.