why drone ci doesn't automatically build my repo after pushing commit? - drone.io

I was trying self hosted drone CI and i have sample repository setup for this project.
I followed all the step to setup and it is able to show and pull the list of all my repo in github, but when i tried to make changes to drone repo nothing happen and it still show empty page with this message.
This will be your commit stream
Add a .drone.yml file and make a commit to trigger a build
I am running drone ci on virtualbox that comes with the Vagrantfile on the drone repo

If you configured everything properly, it may be a formatting problem with your .drone.yml. Drone does not give feedback on these errors and you have to check your webhook logs to discover the problem.
I'm assuming you have properly configured the webhook in your Github repo.
Use your browser to navigate to your Github repo, and select Settings tab.
Under settings, select Webhooks. You should find the webhook you configured to your self hosted Drone
Click on the specific webhook and at the bottom you can find the Recent deliveries section. This is a log of all events your repo has tried to communicate to Drone.
Check the response the Drone server sent you.

Related

How to publish an ASPNET Website automatically to a Linux VPS?

Hello I want to build a build pipeline for a website. Whenever someone pushs something to git I want to trigger an action which builds the website (got that working with teamcity) and automatically deploys it to a staging server (docker container on some linux vps)
I could upload the artifact per ftp and check the ftp folder on the server per cronjob or something similar. But there has to be a better solution. Can you help me with that? Thank you.
TLDR I want to build, deploy and restart a website on every push to git.
Everything is selfhosted. No AWS, Azure or similar

How to switch Intellij Idea project vcs between Gitlab and Amazon CodeCommit?

I am new with Amazon codecommit.
Following their instruction, I did some works like below
make a new IAM user with AdministratorAccess
make a new codecommit repository
install awscli and did aws configure
When I right finished those things, I could pull/push from codecommit.
However it became disabled with intellij Idea.
I did something like...
I pull a project from gitlab
git remote rm origin
git remote add origin [code commit url]
git branch --set-upstream-to origin/master
Now I type git [pull / push] origin master, I got this error message.
unable to access 'https://git-codecommit.ap-northeast-1.amazonaws.com/v1/repos/test17/': The requested URL returned error: 403
When I access this url via browser, it requires id/pw. But my IAM user account information is not working.
What should I do? Is there any way to switch gitlab and codecommit in intellij?
Thanks.
IntelliJ does not use awscli. It uses the default system shell.
From the description, it looks like push/pull does not work for the command-line git in the native shell, so the issue is not IntelliJ-related.
Probably git tries to use wrong credentials save in its credential.helper, that is why it fails.
Check git config credential.helper to see if any is configured. If there is one, try disabling it or clear the saved credentials.
From the description it looks like you are trying to connect to a CodeCommit repository in Intellij using https. To do this you need to generate GitCredentials(username/password) for your iam user in the IAM console.
Detailed steps are documented in the aws documentation: http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
Once you have the username/password you can use those credentials to connect to your CodeCommit repository in Intellij.
Tested on a Mac. Your milage may vary!
I just ran into the same issue. MacOS stores the GIT UID and PW in the Keychain (in your Applications > Utilities Folder). I deleted all references to AWS Code Commit from the keychain, which forced me to reenter the UID & PW. This seems to have solve the problem.
As a side note: I think this happened because I revoked a prior GIT credential on AWS and created a new one. I think that the keychain was entering the old UID/PW which then failed during authentication.
First, you are going to want to create an IAM user with appropriate permissions and then create Git credentials. Then go to IntelliJ IDEA and say you are opening project from VCS with Git credentials, use the AWS git credentials you created and log in. Once you have logged in, you should be able to pull/push to the repo. If you are still having issues and have checked the credentials you are using are active, along with the IAM user those credentials are attached to have the right permissions, I would recommend creating a ticket on AWS support as there may be something wrong with your account that AWS staff will need to fix.

I want Bitbucket cloud merge button to trigger Bamboo cloud build

So I have builds being triggered by bamboo when there's a push to a branch using the Remote Trigger. This works perfectly.
However, I want the same thing to happen when I click the "merge" button on Bitbucket Server. The code merges into master but the build does not get triggered.
Is there a way to fix this?
You can use Http Request Post Receive Hook for this . https://marketplace.atlassian.com/plugins/de.aeffle.stash.plugin.stash-http-get-post-receive-hook/server/overview
For Bitbucket cloud,
You can select Create New Plan Branches for New Branches under Branches->'Automatic branch management'. I just tested it on Bitbucket and Bamboo cloud and it works perfectly.

Rails and Git push, Git pull: logs return same commit, changes aren't made

I've got a local branch (master), a GitHub repo (origin), and another remote repo (server). I've set up my remote so locally I can type git push server master and push the changes to server/master.
When I type git log -1 locally and on the server they return the same commit, but none of the changes I made locally are visible on the server.
I deployed my app with Capistrano so redeploying it makes the changes visible immediately, but I don't want to have to redeploy every time I make a change.
Any idea what's going on here? I'm rather new to Git. Hopefully it's something easy to fix.
It sounds to me that you maybe looking at a different directory than your web server is pointed to.
When I setup capistrano:
cap deploy:setup
#then
cap deploy
it creates a directory structure similar to:
/releases (each deploy gets its own randome number directory)
/current (a sym-link to the latest release)
/shared
None of these folder are tied to git. Which makes me think your webserver may not be pointed to the same directory that you're using with git.
--
You may find cap deploy is preferable as you'll be able to see the output if there are any issues.
I'm not a huge expert but the above is how I've setup rails with Capistrano.
Normally origin is the name used for the GitHub remote and not master. You can check what remotes you have by doing git remote show. If you want even more detail on the remote use git remote show origin (or whatever your remote is called, if it is not origin). This will give you a list. I suspect that what you have is actually two local branches (master and server). Try doing a git push server origin. This will take your server branch and put it on GitHub.
Alternatively
If you are trying to combine the changes in your server branch with your master branch then use checkout master and then git merge server. This will merge your changes from the server branch into your master branch and you can then upload to GitHub via git push master origin.

Authentication failed publishing a repository from Github for Windows

I am trying out Github for Windows and I am getting the following error when I try to publish a newly created repository.
Authentication failed
Your credentials may be out of date. Please log out of the application and then log back in before retrying the operation.
Needless to say I've logged out and back in multiple times without success. I've also uninstalled and installed the latest version to no avail.
The repository is a new one I created within the application and contains only the .gitattributes, .git and README files.
I am a complete newbie to Github so it's quite possible I've messed something up during the setup process.
I was able to solve this by:
Press Settings - Open in GitShell.
git status
git push (or pull)
introduce credentials (here is the most important step, somehow git client messed up or forgot your credentials).
After giving correct credentials you can exit from git shell and use git client again.
It turns out that the problem was Github for Windows was having a problem with the password it had stored. Github support's instructions were as follows:
Log out of Github for Windows.
Change my password on github.com
Log back into Github for Windows.
I was then able to publish my changes.
Did you setup your ssh keys?
https://help.github.com/articles/generating-ssh-keys#platform-windows