I just created a new account on hub.docker.com. I successfully linked my GitHub account in settings. After I clicked on Create Repository, I am presented with the familiar screen, where I can create a new docker repository. However, the first strange thing here I noticed is, that I don't have the additional build options.
This is what is missing:
I went on and created a blank repository. After that I went to the builds tab and clicked on the GitHub button, which said I was connected:
In the following screen, I can select the the desired repository. After filling out the remainder of the form, nothing happens after I click Save or Save and Build.
I do not see any error messages popping up either.
Any ideas what I am doing wrong with this newly created docker account?
Thank you very much for your time and help!
For GitHub, I'd recommend this guide for setting up a connection with GitHub Actions and Docker.
I've only set up a connection with BitBucket and Docker, but I'll share the process with BitBucket for anyone else searching, or in case that provides any additional insight that might help with GitHub.
In BitBucket, you need to set up a pipeline to push the build to the repo. The docs here outline the process.
A quick summary of the steps in BitBucket:
Go to your repo in bit bucket
Click on pipelines and add the Docker template
Update the image name in the yml template
Commit the yml to the repo
Set up the variables in the repository settings in BitBucket for your credentials and repo slug
Check the status of your build in the pipelines tab, it should automatically rebuild up update.
Related
I am new to CI with travis and I am trying to learn it by following a course. I have created a public repository in dockerhub, and pushed the project to github with .travis.yml file. I have previously connected and authorised travis at github. The github project can be found here. The travis build gets triggered and it appears to be successful, but nothing is pushed to dockerhub.
You can see the build process here:
The travis build appears to be successful, but nothing is pushed to docker hub. On expanding the log I could see this message is being logged:
Must provide --username with --password-stdin
But, I have already set up the environment variables in travis as you can see below, so I don't get why I get this message?
I didn't realise that environment variables need to be set per project. Also I wasn't even getting the option for settings for that repository until I synced again github with travis. Once I done the syncing part one more time, the option appeared and I was able to set the variables for that repository. And then the build process went through and the image was pushed to dockerhub.
I have configured bitbucket-pipelines.yml, but i can't find the window i was configuring it with.
If i go to the Deployments menu on bitbucket, i see the following picture and i have no option of changing my pipeline anymore. It just says: Deployment tracking with Bitbucket.
How am i able to change the pipeline again?
In another repository, which i have not configured yet, this screen loads and i am able to configure my bitbucket pipeline.
I got this answer from the support, if anyone is interested:
Where does the bitbucket-pipelines.yml file reside ?
You will be able to see the bitbucket-pipelines.yml file on the main branch once pipelines is enabled on your repository
How do I know pipelies is enabled and how can I enable it ?
You can find the pipelines settings by accessing the repository settings > Pipelines > Toggle to enable pipelines
Other ways to access bitbucket-pipelines.yml ?
You can access it from the repository source section:
You can go to a build and click on the GEAR icon next to the build it will redirect you to the pipelines.yml page
You can navigate to the commit that recorded the change to the Bitbucket-pipelines.yml file, this will have a link to the YML file
I have the same question as this one:
Trigger build only on pushes to master
Only the answer there is not correct. Does anybody know a solution? What sense does it even make to build a certain branch on pushes to any other branch than itself? What I mean to say is that this should really be a very common thing...
In the advanced section of Build Triggers, there's this section, that really looks like the thing:
However, it doesn't work for me. Like this, it does not trigger the build at all. I also tried putting there just master (without the asterisk) but that doesn't help.
If I select the first option (Allow all branches...) then it works, but obviously all the pushes to any branch triggers the build on master which makes no sense.
Any help appreciated.
Thanks!
To integrate GitLab with Jenkins I'd suggest using Gitlab Plugin
Install Gitlab plugin on Jenkins and configure Gitlab Connection (Manage Jenkins -> Configure -> Gitlab), for this you need to create new credentials of type GitLab API token.
Select trigger in Jenkins job configuration Build when a change is pushed to GitLab (when you click on advanced options there is Secret token which should be used together with webhook URL in Gitlab Webhooks).
Add webhook (Push Events) in Gitlab project Settings -> Integrations, with url and token from Jenkins job and filter them by branch name.
Update: So my original point was to filter push events on GitLab so Jenkins doesn't need to do it but as you pointed out it should work with Jenkins filter as well.
I tried filtering branch in my job and Jenkins displayed dropdown list with suggested branches after I started typing, then when I choose brach a label appeared Matching 1 branch:
On the other hand in your screenshot there is some ERROR indicator which would suggest that your GitLab connection is improperly configured. I'd suggest to go to test your connection to GitLab and fix it.
I am new to jenkin's but what i am looking for is as below
1.How to create project or how to push your code in to jenkin's?
2.How it will directly push this code into github's branch?
I have followed some tutorial but nothing is clear.
Please help me.
Jenkins is not a repository, Jenkins is just a CI tool, basically build server, you cannot "store" codes in Jenkins, but yes, it is able to pull codes from repositories and eg. build it. (or push artifact- war/jar/ whatever to some machine via ssh eg.- look for publish over ssh plugin for this)
Create eg. freestyle project, and then take a look into "Source code management" section, there you can choose git, github, svn, whatever.. Will fill credentials and repo URL, then in "Build" step you will choose what you need to do.
For build check this
If you really mean how to push the changes back to repository, than I have found this- its done with git plugin.
I am not sure, but either you didnt understood what the jenkins is for, or you are using not proper name convetions. Hope that helps.
We found this solution works
It uses Add post-build action ⇒ Git Publisher
I setup an organisation on github a while (maybe a week) ago, and I am yet to see it appear on travis-ci. The organisation is mr-php (https://travis-ci.org/profile/mr-php / https://github.com/mr-php).
Do I have to do something to make it appear, or if this length of wait usual?
It was to do with organisation permissions. I had to go to GitHub and into the Travis-CI app settings then give it permission to access the organisation.
Please login into Github and then sign into Travis CI.
Give Travis permissiona to access the organisation.
And on your profile page https://travis-ci.org/profile/mr-php
use the "sync" button to synchronize your repos.
If no repos are found, file a bug.
If repos are found: flick the switch to turn Travis on for your repo.
You might also trigger your first build with a git push.
Or go back to your repo on Github and into Settings, then Webhooks & Services.
Click the "Travis CI" link, enter PW again and trigger a manual build, to test the service.