How to clone github repos from jenkins using github app installation - jenkins-pipeline

How can I clone repos from jenkins using the GiHhub app?

Related

How can I edit python files in heroku?

I am using Heroku to run a Python telegram bot with Heroku Postgres as DB. I wanted to edit a Python file in my app so how can I do it? Is there any live text editor I can use to edit my file?
Thanks.
You need to have git installed on your CLI.
Clone the git repo from GitHub (the following git url is just an example)
git clone https://github.com/NNTin/discord-twitter-bot.git
Go to Heroku settings. There you will find a Heroku git URL. Add the Heroku remote.
git remote add heroku https://git.heroku.com/[yourappname].git
Do your code changes with your editor of choice. Version and commit your changes
git add .
git commit -m "a helpful commit message to know what you have done in the past"
Push the changes to your heroku remote
git push heroku master

Heroku clone creates an empty folder

So I am trying to learn heroku and yesterday from another computer I created an app. Today, from a different computer I am trying to clone the app (download the code) and keep working on the same app so I did this
heroku git:clone -a myappname
I get the message
warning you have appeared to have cloned an empty directory
The app is running online so the code must be there.
According to the documentation this command does this
This will create a new directory named after your app with its source
and complete repository history, as well as adding a heroku git remote
to facilitate further updates.
However, the repository is empty.
I saw the question below but I that didn't work for me. How can I simply get the code locally and keep working on this app without creating a new one? Thanks.
Why am I getting an empty repo when cloning my keystone app to local repo from heroku?
This is counterintuitive, but looks like it is by design at Heroku. You don't copy from Heroku git to local drive, but the other way around - from your PC to Heroku.
You need to create or clone a repository on your local PC.
git create <new repository> OR
git clone <source>
then init your repository and commit code:
$ cd myapp
$ git init
Initialized empty Git repository in .git/
$ git add .
$ git commit -m "my first commit"
Then you need to link your repository with Heroku. Download their Toolbelt and run:
heroku git:remote -a your_app_name_on_heroku
And deploy code:
git push heroku master
Hope that helps. I had to open a ticket at Heroku to figure this out. Check Heroku Git instructions for further reference.

Deploy Parse-Server

I deployed Parse-Server-exemple to Heroku using thee Deploy button, and everything is working fine. (up to the fact that there are some bugs)
But the Parse-Server(https://github.com/ParsePlatform/parse-server)is being updated more frequently and now has lower bugs.
How to deploy Parse-Server on Heroku ?? or at least how to update the server running on my existing Heroku app ?? I can't find the answer anywhere
Parse-server is the nodejs package. you can remove this line here and you can remove the node_modules from .gitignore, then you need to download the "Parse Server" to your node_modles folder and deploy it. but it will be easy if you try to use some service like www.parseground.com
Your starting point should be reading up on how to deploy nodejs apps on heroku. Parse Server is just another npm module. Contrary to #pivanov's answer you should preferably keep node_modules in gitignore and let heroku install the npm packages including Parse Server. This is what heroku recommends in their documentation.
You can clone your parse-apps by running the falling command using the heroku work belt
$ heroku login
$ heroku git:clone -a
Heroku at this point automatically create a git branch 'master' that you can commit to.
You can now make changes to your parse server version depending in the available version.
Current version i think is 2.1.4
"parse-server": "^2.1.4",
You can now commit and push changes to the master branch created.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
You can use
npm update
it will update the parse server if you have used "*" as its version in your package.json file.

Xcode tries to push git submodule

I've added a a git submodule to my project, but whenever I try to push to git using Xcode it wants to push the submodule project as well.
Since I have read-only access to the artemis repo, I can't push. I can get around this by downloading a zip of the artemis project and including that, but then I lose the git submodule update functionality.

Clone a github app to heroku

I'm a newbie and i want to clone an app from github to heroku. I tried this command
heroku git:clone git#github.com:[Creator]/[APPname].git [HerokuappDirectory]
But i get Resource Not Found.
Clone the repo like normal with git clone git#github... . Then cd into the directory and run heroku create [an optional app name] . Then you'll have two Git remotes setup, on for the repo (origin), one for the heroku app(heroku). Then 'git push heroku master' will deploy to heroku.

Resources