Skip to content
New issue

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

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

Already on GitHub? # to your account

Document how to use Briefcase in CI #400

Open
freakboy3742 opened this issue May 21, 2020 · 6 comments
Open

Document how to use Briefcase in CI #400

freakboy3742 opened this issue May 21, 2020 · 6 comments
Labels
documentation An improvement required in the project's documentation.

Comments

@freakboy3742
Copy link
Member

freakboy3742 commented May 21, 2020

We should add a topic guide for how to incorporate Briefcase into a CI setup.

This includes:

  • On a pull request, running:
    • code style checks
    • checking for errors in documentation
    • running the test suite
    • checking for release notes
  • Tagging a new app release.
  • Signing a released app.
  • Publishing a new release.

This will, by necessity, be a very opinionated guide; I would currently expect it to reccomend:

  • Github Actions for CI configuration
  • towncrier for release notes
  • flake8 (possibly mentioning black)
  • sphinx for docs
  • tox as a common point of testing configuration
  • pytest to run test suites

Traveltips currently has an incomplete CI configuration, but can serve as a good "working example". Briefcase has a much more complete CI configuration.

@freakboy3742 freakboy3742 added documentation An improvement required in the project's documentation. up-for-grabs labels May 21, 2020
@saroad2
Copy link
Member

saroad2 commented Jun 2, 2020

As you probably remember, I incorporate Briefcase in my CI/CD process of Eddington for about a few months now, but I'm using CircleCI as my platform for that.

If anyone who works on this issue needs some reference, he/she can take a look here to see how I did it there.

@jgirardet
Copy link
Contributor

is briefcase create runnable now on github action ?
There are problems with docker.
For now it fails on linux.

@freakboy3742
Copy link
Member Author

@jgirardet Not sure where you got the idea that Github Actions doesn't have an Ubuntu 16.04 environment - it's definitely on their official list

As for the "input device is not a TTY" error - I'm not sure what specifically caused that (and the log has expired); but that will almost certainly be because the console is asking for input. There's a --no-input flag to explicitly turn that off (and fall back to safe defaults).

@jgirardet
Copy link
Contributor

@freakboy3742 ok sorry it's fine on 16.04 (how I missed it ?) but it's not working on ubuntu 20.04 even with `--no-input`` : https://pastebin.com/FyvENBip
"input device is not a TTY" is 5 lines before the end of the log.

Concerning this I could "maybe" reproduce it locally. With pycharm you can run some commands outside a terminal (its called run configurations). If I create a configuration which runs python -m briefcase create --no-input. I have the same error.
Commenting the line 174 "--tty" of docker.py file seems to fix the error. I don't know what does --tty so I have no idea if it's a usable fix.

@freakboy3742
Copy link
Member Author

@jgirardet Interesting - it makes sense that would be failing; --tty is attempting to allocate a pseudo terminal to the docker container. The downside to removing --tty is that you won't see the output of the Docker container as it builds, which can be useful debugging detail.

Do you still see a failure if you comment out the --interactive instead? That flag attempts to connect stdin, which is the underlying problem (CI doesn't have an stdin); I wonder if enabling the tty, but disabling interactive would allow us to have the best of both worlds (visible logs, but able to work under CI)

@freakboy3742
Copy link
Member Author

This workflow contains details for how to sign a Windows binary in CI. The example code is slightly old, as it installs a code-signing-windows branch of Briefcase from github; that is no longer required, as that branch has been fully merged into the stable Briefcase release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
documentation An improvement required in the project's documentation.
Projects
None yet
Development

No branches or pull requests

3 participants