You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Propose that github publish an "official" CircleCI Orb to install the gh-cli #3441
Love the ability to use the gh api subcommand for integrating CircleCI builds with github. I'm ecstatic that the gh cli is available out of the box on GH Actions. But I have clients that use CircleCI, and it is quite painful getting the gh cli installed and available.
What was confusing or gave you pause?
I'll document the pain of getting the cli installed on circle.
First attempt was essentially wget https://github.com/cli/cli/releases/download/v1.9.0/gh_1.9.0_linux_amd64.deb but it hardcodes the release 😢 .
Second attempt used curl against the Releases API to get the latest release. However, jq isn't available by default on most images, so hitting the REST api is painful from a vanilla ubuntu image.
Third attempt used the recommended installation method for linux. But running apt-get on circle's images is painful.(have to install software-properties-common; and lots of missing public keys that need added before that succeeds)
Are there features you'd like to see added?
I recognize that this is out of the realm of the cli itself. But I think it could increase adoption of the tool (and therefore also increase integration with github's platform by leveraging its api features), if it were easier to install the cli on circle. So I propose that github create a circleci orb that handles cli installation. (Perhaps even exposing a few circle commands for common integrations like deployments) It could be handled by the community, but I know most of my clients' circle configurations don't allow using third party circle orbs; so an orb by github itself could be certified by circle.
In general we try to severely limit the number of official packages we offer given how small our team is. I don't think this is an unreasonable request and I'd personally like to see it easier to use gh from CircleCI; however, given our bandwidth, an official orb is not something we're ready to jump into.
I'm wondering if there is a stopgap solution here: if we came up with a blessed one-liner that would install gh to a debian environment with minimal dependencies would that suffice?
I later discovered the reason those instructions didn't work is because the orb we were using was running an old image of linux. I went through that yak shave to upgrade the underlying machine image and then the 3-liner above worked as expected.
So that's not to say that it wouldn't be desirable to still streamline the installation on linux; but it seems that anyone on a somewhat modern linux would be off to the races with the instructions you have already provided.
Thanks for the followup. There is also this form a user suggested recently which is a bit verbose but doesn't have any dependencies beyond a vanilla debian/ubuntu environment:
I've got a growing laundry list of linux installation experience improvements kicking around in my head so I'll see if I can come up with a nice one liner...it may end up taking the form of one of those curl foo.bar > bash hacks though
Activity
vilmibm commentedon Apr 22, 2021
Thanks for the suggestion!
In general we try to severely limit the number of official packages we offer given how small our team is. I don't think this is an unreasonable request and I'd personally like to see it easier to use
ghfrom CircleCI; however, given our bandwidth, an official orb is not something we're ready to jump into.I'm wondering if there is a stopgap solution here: if we came up with a blessed one-liner that would install
ghto a debian environment with minimal dependencies would that suffice?jasonkarns commentedon Apr 22, 2021
Understood!
Yes, that would be amazing. Ideally, just apt-get gh would be sufficient. I was initially following the linux installation instructions as documented:
I later discovered the reason those instructions didn't work is because the orb we were using was running an old image of linux. I went through that yak shave to upgrade the underlying machine image and then the 3-liner above worked as expected.
So that's not to say that it wouldn't be desirable to still streamline the installation on linux; but it seems that anyone on a somewhat modern linux would be off to the races with the instructions you have already provided.
vilmibm commentedon Apr 23, 2021
Thanks for the followup. There is also this form a user suggested recently which is a bit verbose but doesn't have any dependencies beyond a vanilla debian/ubuntu environment:
I've got a growing laundry list of linux installation experience improvements kicking around in my head so I'll see if I can come up with a nice one liner...it may end up taking the form of one of those
curl foo.bar > bashhacks thoughkostya313 commentedon May 22, 2021
mislav commentedon May 24, 2021
@jasonkarns @vilmibm Could we close this in favor of #3672?
vilmibm commentedon May 24, 2021
that makes sense to me.
jasonkarns commentedon May 25, 2021
👍