cli: add export-login command
Metadata
Current evaluation
Merged the export-login CLI command and a --with flag for login to support CI systems. Review feedback updated packages to snaps and adjusted formatting. Approved and merged.
Suggested action: —
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
This PR resolves #1711 by adding the `export-login` command as well as a `--with` option to `login` to use the exported login file. This is the agreed-upon method for supporting Circle CI. See the issue as well as the [forum topic](https://forum.snapcraft.io/t/better-support-for-other-ci-systems/2968) for more details.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged the export-login CLI command and a --with flag for login to support CI systems. Review feedback updated packages to snaps and adjusted formatting. Approved and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged the export-login CLI command and --with flag for login to enable CI token export, resolving #1711. Terminology was updated from packages to snaps based on reviewer feedback. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds the export-login CLI command and --with flag to login for CI authentication. Review feedback prompted renaming the --packages option to --snaps and adjusting line wraps. Resolves #1711. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2043 cli: support exporting login to stdout | snapcraft | merged | Merged a PR adding CLI support to export login credentials to stdout. Output is base64-encoded for direct CI environment variable injection, eliminating the need to manage encrypted credential files. | |
| #3164 cli: remove enable-ci command | snapcraft | merged | Merged removal of the enable-ci CLI command, superseded by export-login. Approved by one reviewer, passed CI checks, and removed 753 lines across seven files. | |
| #2736 cli: prompt for login if required | snapcraft | merged | Merged CLI update that prompts for login when required instead of exiting with an error. Approved and passed CI checks. | |
| #3797 store: export-login with legacy | snapcraft | merged | Merged to main. Resolves export-login to stop prioritizing legacy credentials during export. Approved, passed CI, and maintained 100% coverage. |