How to send Travis output to GitHub - github

I'm trying to fix up a broken Travis CI build script on a repo I was added to as a contributor. Everything works fine in the actual build, but trying to upload the build results to GitHub is broken.
The .travis.yml file contains an OAuth token which it puts into the Environment, and at the end it runs a script that retrieves this environment variable and uses it to upload the build output to GitHub. This is failing with a 401 Unauthorized error, which means the token is probably no longer valid.
I didn't write this up, and the way this works kind of bugs me. I'm not comfortable having authentication information in the repo, publicly accessible to the world, so it's just as well that this token is expired. But as I look things over, I don't see any better way to do this.
I need to do one of two things, either have the Travis build machine upload the build result to GitHub, or download the build result from Travis and upload it myself. Unfortunately, neither one seems to be a good option. No matter where I look on Travis CI's Web interface, I can't find any download link to retrieve the build results, which seems to rule out the second option. As for the first option, it doesn't appear that there's any way to perform the upload without the build machine having authentication information from the repository.
I can't be the first person to notice how problematic this is. I figure it has to be solved somehow; I'm just not sure how to fix it. Does anyone know how to resolve this?

Related

Is there a way to define external checks on a GitHub PR?

When I open a PR on GitHub, several builds are triggered on our external build server, but because of build queuing, they can run at different times.
In the interim, however, I can merge my PR after even one of the builds has successfully run.
I understand that the build server is probably using the Checks API, and that GitHub doesn't know about the check until the build server tells it that the build has started. I think this is the source of the problem because GitHub is just saying, "All the checks I know about have passed."
Is there a way to configure GitHub to expect all of my builds before the build server starts them?

Travis CI build failing coverity a coverity-related phase - Do I need a token?

I've recently forked a project on GitHub: notmyuser/proj to myuser/proj which is configured with both TravisCI, codecov and coverity. I commented out a part of the .travis.yml file, like so:
#env:
# global:
# # coverity key
# - secure: "NKZmore/base64/chars/here"
... since that's the original profject's token, not mine.
Well, I am able to submit builds to coverity/synopsys for analysis; but the Travis CI build fails, with the message:
$ export PROJECT_NAME=myuser/proj
Coverity Scan analysis selected for branch master.
Coverity Scan API access denied. Check $PROJECT_NAME and $COVERITY_SCAN_TOKEN.
The project name is the way my project is named on GitHub. (And it's set in .travis.yml; before, it was notmyuser/proj.)
My questions:
Why is my access being denied? Is it, like I suspect, the lack of a token?
How do I fix things?
Specifically, do I need a Coverity security token, and if so, how do I get it?
Note: If you need more concrete details about the project, here it is. I was just trying to make the question a little more generic.
Yes, you need your own access token. You should be able to get one by signing up at https://scan.coverity.com/.
Disclosure: I used to work for Coverity/Synopsys. I am not, in this post, making any recommendation for or against the use of the Coverity service. I am linking to it only because going to the linked site is the only way to obtain the token in question.

GitHub Repositories (How to Run)

I have read the following answer here about how to run a specific file.
However, let's say I want to run every single aspect of code in the entire repository here that uses MathJax without downloading it.
How would one figure that out and do that? Is it one JavaScript source code that you script?
If so, how do you figure out the URL that you run?
IF you really don't want to download a repository, you might consider using a GitHub Action.
It does access your code on GitHub side, and can execute whatever you need.
A GitHub Action has an API, and use GitHub runner (on GitHub side, so no download on your part) as opposed to self-hosted runner.
A workflow can be anything you need, like for instance github-action-build, to build your project, in a repository-specific fashion.
As an example, github-action-for-latex compile Latex documents, using a Docker image (xu-cheng/latex-docker).
You would need a similar approach, using a Docker image where you can clone that repository, and execute it (because the Docker image would have everything needed to run your project).
And that would be done entirely on GitHub (Azure-based) side.

Travis-CI doesn't let me rebuild a test

We are using Travis-CI to test our project (Speedy Net). A test failed and I want to rebuild it. I checked this answer but it doesn't work for me. This changed recently. I'm the owner of this organization on GitHub but on Travis CI I'm not a member of any organization. On this build's page I don't have any rebuild button. What can I do to be able to rebuild this test?
Travis CI for Open Source
It works now (after my login expired and I logged in again). When Travis CI login via GitHub expires, it's not possible to rebuild tests.
It depends, if the test is triggered via a pull request then it is as simple as closing then reopening that pull request.
If you are triggering the test in another way then do that thing again, e.g. push --force-with-lease, commit --allow-empty, etc. to restart the process.
Basically if a build fails because for example, a host is unreachable temporarily in the test/build setup rather than any issue with the code, then trigger the build again in the same way you did originally.

Workflow for Working on Moodle As a Team

I and a friend want to work, remotely, on a Moodle website. I have got the application installed locally, but I'm not sure what I need to commit into our git repository and what I shouldn't.
I'm looking for a workflow that allows someone to clone the code, run a CLI command or something, and be up and running. Since our machines are development machines, I"m trying to lower the number of steps (ie, we can both just share the same configuration file).
You may want to take a look at Moosh ( https://github.com/tmuras/moosh ).
This can script-up a lot of the things I think you want to do (set settings, create courses + users, etc).
You could then create a command-line script that would call Moosh and prepare a lot of the settings that you will eventually want on your live site (what it cannot do is take the settings from an existing site and apply them automatically to a new site).