Gotcha's which tripped me up
The current cli install process (v2.0.413) does not install
kanikoby default (even though its needed doing
jx install --kanikoafter install may resolve this). The full error is:
unexpected response from pipeline runner service: 400 Bad Request, ... effective project configuration: Missing option: --docker-registry. After doing that , you have to re-import your repo..otherwise serverless jenkins githook no longer fires
If you want a 'git bot' to show as the bot, first log out of your github account
- Create another 'bot' account and add this bot account to the github Organisation which you want your bot to work on (I say organisation becayse jx will need permission to create additional repos in that organisation
If you started this process already, and broke things:
jx uninstallto start over and
jx get contextto get the context name.
- Delete the cluster in gke (or aws) which jx created for you
- Delete your
rm -rf ~/.jx) becayse otherwise jx install will ignore your github bot user selection (https://github.com/jenkins-x/jx/issues/1471 - closed issue, but not fixed yet)
- Remove the repo's jx created in your organisation's repo and start over
- The beauty of this the install of jx is declarative, so removing and starting again is not very painful
- If you've previously tried to import your repo, jenkins x may have created a helm
chartsdirectory, and you'll see the error
./charts/preview: file exists, remove this direcrory and the try
jx importagain (this is harmless, probably, because the exact same folder will be created by the install scrip and any git push that jenkins x does will result in no change to the repo).
For me, the process was:
jx create cluster gke # The install process at time of writing is non interactive for most for the first ~6 steps (this is the cause of the kaniko / --docker flag missing error) and why jx install --kaniko is needed after install # - use nip.io to begin with rather than fafing around with domains whilst getting started # Before doing github, remember to log out of your personal git account and login as your bot user. Otherwise you'll end up setting up the bot under your github account instead of a bot account, which looks confusing/lame # - specify your github bot username (a github bot is just another user account, there is nothing special about them) # Grant your bot account access via the token (follow url that jx install process gives you. # Import your repo # First, clone your repo into /tmp # go into your local repo # jx import # enter your bot username / password # complete!
Good to know
If your install messes up, and your
serverless-jenkins bot failes, you can comment with
/retest after fixing and this will trigger another attempt.
Subscribe to Karma Computing
Get the latest posts delivered right to your inbox