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

Workaroud yes not allowed for edge promotions (infra) #877

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Dec 6, 2023

Description

Snapcraft doesn't natively allow to non-interactively promote a snap from an un-branched edge channel as it can be seen here(link). We need this feature as we do use an unbranched edge channel and we want to automatically promote to beta the builds. This PR removes the --yes switch replacing with yes |.

Note: This would not work as snapcraft will try to understand if it is in an interactive session or not. To make snapcraft just use the input provided in stdin, the SNAPCRAFT_HAS_TTY envvar is also added.

Resolved issues

Failing build: https://github.com/canonical/checkbox/actions/runs/7112360707/job/19362163613

Documentation

A comment documents why we need the environment variable and the yes | workaround

Tests

I will launch the workflow from this branch before merging

Copy link
Contributor

@kissiel kissiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried myself with my testing snap and got to the same dead end, indeed this looks like the only way out of this mess.

@Hook25 Hook25 merged commit e786c3f into main Dec 6, 2023
7 checks passed
@Hook25 Hook25 deleted the fix_promotion_call_wf branch December 6, 2023 15:44
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
* Workaroud yes not allowed for edge

* Added comments to document decisions
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

Successfully merging this pull request may close these issues.

2 participants