Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not quite sure how it's intended to be used #5

Open
toolmantim opened this issue Jul 3, 2018 · 6 comments
Open

Not quite sure how it's intended to be used #5

toolmantim opened this issue Jul 3, 2018 · 6 comments

Comments

@toolmantim
Copy link

This plugin looks awesome.

As many people are new to Status Checks API, including me, it might be good to make the example in the readme a little closer to a real life example? I'm not sure if it's meant to be the entire build output, or …? And how you capture/output that from your build job?

@asford
Copy link
Member

asford commented Jul 4, 2018

Excellent point. I've vaguely addressed this in #6, but will leave this issue open for further updates.

@toolmantim
Copy link
Author

Hey, it's already looking great. 🎉

Another improvement might be if the example showed multiple check steps, and then had a screenshot of the Checks API to see each one as a check. Then you'd 100% grok it straight away, without having to click through those links. But still, the current readme is an awesome improvement. 🙌🏼

@Dog
Copy link

Dog commented Feb 1, 2019

I'm having some trouble adding this plugin. I have my pipeline currently building a container and running the command. However when I add this plugin after I keep getting:

+ docker-compose -f /var/lib/buildkite-agent/plugins/github-com-uw-ipd-github-checks-buildkite-plugin-v0-0-2/hooks/../docker-compose.yml run --workdir=/var/lib/buildkite-agent/builds/<agent>/<repo-owner>/<pipeline> --rm ghapp -vv check from_job_env
--
  | /bin/sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
  | Creating network "github-com-uw-ipd-github-checks-buildkite-plugin-v0-0-2_default" with the default driver
  | ERROR: Volume buildkite declared as external, but could not be found. Please create the volume manually using `docker volume create --name=buildkite` and try again.
  | 🚨 Error: The plugin github.com/uw-ipd/github-checks-buildkite-plugin#v0.0.2 pre-command hook exited with status 1

I'm not quite sure what I'm missing. I found this commit, but I'm not sure how related it is:

8ab989c#diff-4e5e90c6228fd48698d074241c2ba760L33

Failing Step:

  - command: '.buildkite/run_tests.sh'
    label: ':dog: Running Tests'
    timeout: 10
    plugins:
      docker-compose#v1.8.2:
        run: frontend
        workdir: '${BUILDKITE_BUILD_CHECKOUT_PATH}'
      uw-ipd/github-checks#v0.0.2:
        output_title: Tests
        output_summary: test_summary.md
        debug: true

Command:

#!/bin/bash

set -xuo pipefail

{
    yarn run test
} | tee test_summary.md

@cmitz
Copy link
Contributor

cmitz commented Feb 1, 2019

Sorry for chiming in with a little more of the same – a bug(?). Any tips on where I might need to start debugging?

Buildkite log:

docker-compose -f /etc/buildkite-agent/plugins/github-com-uw-ipd-github-checks-buildkite-plugin-master/hooks/../docker-compose.yml run --workdir=/var/lib/buildkite-agent/builds/alpha-1/<owner>/<repo> --rm ghapp -v check from_job_env
--

The agent is running on a debian server (metal), and I have a very similar command as @Dog . Even though I'm getting the job_from_env not found, yesterday I got the same error as him when I tried getting it to work with a Docker Agent in a Docker container.

Any pointers? 😄

@Dog
Copy link

Dog commented Feb 1, 2019

@cmitz

Well I’m a Dalmatian and I’m a little unsure why it can’t find the command. However the ghapp command comes from a python click cli. That command is here:

https://github.com/uw-ipd/github-checks-buildkite-plugin/blob/master/ghapp/ghapp/cli.py#L252

The setup.py file says the main command is ghapp as well:

https://github.com/uw-ipd/github-checks-buildkite-plugin/blob/master/ghapp/setup.py#L18

If the build succeeded you may be able to try running it manually in the container with ghapp check from_job_env and see if the package is returned in a pip freeze

What version of the repo are you running? (0.0.2?)

Did you try to set the plugin’s debug setting to true? (You can see an example of this in my step above)

@cmitz
Copy link
Contributor

cmitz commented Feb 2, 2019

So, it seems that from_job_env should be from-job-env on my machine. This is output for docker-compose -f /.../docker-compose.yml run --workdir=/.../myapp --rm ghapp check --help:

Usage: ghapp check [OPTIONS] COMMAND [ARGS]...

  github checks api support

Options:
  --help  Show this message and exit.

Commands:
  from-job-env
  list          List current checks on given repo ref.
  push          Push a check to github.
  update        List current checks on given repo ref.

I'll keep debugging and report back when I figure out what to do. It seems commands with Click should always be dasherized since last year: pallets/click#1123

By the way, I use uw_ipd/github-checks#master, not #0.0.2. Maybe a new release with the last 3 PR's would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants