The code changes happening on cloud build(deployment) is not reflecting in repository - google-cloud-functions

I'm using Cloud Build to deploy automatically during code push(Bitbucket). I'm changing the versions on prebuild which has a script to increase the number on JSON file.
The changes are not reflected on the mirrored repository and also I could not able to push that code to the bitbucket repo. how can I push the code from google cloud to bitbucket? or is there any other way?

Related

Can Sphinx source files be pushed to ReadTheDocs without a linked repository?

I'm moving the Mercurial repositories for all my open-source projects to OSDN (OSDN.net) from Bitbucket because Bitbucket will soon drop support for Mercurial. However, OSDN only supports SSH, not HTTPS, as a file exchange protocol, and ReadTheDocs does not support SSH URLs. The ReadTheDocs public API allows builds to be triggered, but does not support any way to provide the source files with the build trigger.
Or any documented way, at least. Does anybody know of a way to either push document source files to RTD with a build trigger, or connect an OSDN repository to RTD so that RTD can clone the source files itself?
Thanks.
OSDN does support both SSH & HTTP(S), for "writing" the only option is ssh. However, read-the-docs needs only to 'read'; https is fine (And supported, although a bit hard to find).
On OSDN, toggle the "RO|r/w" button, to see the other-URL. It's not a button, nor trigger; but it looks like it --The UX/UI design isn't very great ...
Copy that RO value (again: ignore the UI-feedback. You can copy the https-URL. And past it on RTfD.
Note: for now, I could get webhooks/integration working. So, you have to go read-the-docs to rebuild, after a push. Or use the curl webhook from e.g a Makefile locally, see: https://docs.readthedocs.io/en/stable/webhooks.html#parameters

How to trigger Openshift deployment when a repository changes?

I'm trying to configure continuous deployment with Openshift. I have sample React.js application which I want to deploy automatically when the new commit appears in the repository.
I created "application" and "build" and in Openshift, the build is deploying the web app to a new pod well (I used standard Node.js builder template). But it doesn't do it automatically when the code is updated in repo. How can I make Openshift build to observe the repository?
Short answer is: webhooks.
Openshift exposes so called webhooks. Source code repository (for example Bitbucket) can notify Openshift's build (using a web interface) when event like a push to the repository happens.
In build settings we have triggers section. We can configure new trigger with a specific secret. The triggers are visible in the configuration section of the build in read only mode then. They are the https addresses basically.
After creation of the trigger we can configure the repository to notify Openshift using webhook.

v3 where to get git_url?

I am trying to clone to my local git repository.
From Mac terminal:
git clone git_url directory_to_create
In the web console, I tried to use the GitHub Webhook URL and Generic Webhook URL. But I got this error: The requested URL returned error: 405
Any suggestions?
OpenShift doesn't host a Git repository for you. It relies on you having a separate hosted Git repository to pull application source code from. Alternatively, you can use a binary input build and push source code from your local system.
If you already have a deployed application how did you create it?
If it was a sample S2I application, you need to go to GitHub where the source code for that sample application was and clone it into your GitHub account. You can then check it out from your fork in your own GitHub account to your local system. You will though need to update the build configuration for the application in OpenShift to then use your fork of the original sample application.

Openshift Origin (Minishift) - Making changes to application repository pulled on VM

I have installed and configured a custom Laravel private repository hosted on bitbucket on minishift running on my laptop. I found that all the files were imported properly without any issues and the image is running.
However, now I want to make configuration changes in my repository for my application to work. How do I make it?
Will I have to import the image from VM on my laptop, work on them
and then push the changes back
Or will I be able to access the files or folder from within my editor or IDE?
I am new to Openshift origin and using it for the first time.
If you have your source code on Bitbucket, you would checkout the repository to your local laptop, make the changes, commit them, and push them back to the repository on Bitbucket. You would then tell OpenShift to rebuild the application by clicking on the Start Build button on the build configuration details in the web console, or by using oc start-build on the command line, supplying it the name of the build configuration to do the build for. The rebuilding of the image from the code when done will automatically trigger a new deployment. If you set up a webhook in Bitbucket, you can have it tell OpenShift when new changes have been pushed and that will trigger a build without you needing to do it manually.
If you are quite new, I would suggest you work through the interactive tutorials at:
https://learn.openshift.com
Also read the free eBook on OpenShift.
https://www.openshift.com/promotions/for-developers.html

Jenkins projects pointing to same Mercurial repo do not share source

I am using Jenkins for our build server. I have multiple projects using the same Mercurial (Hg) repository and want to avoid each project cloning it's own local repo to build from (since the repo is rather large). This is supposed to be possible via Jenkins and the Mercurial plugin.
In my Mercurial plugin configuration I have checked both "Use Repository Caches" and "Use Repository Sharing". In each project, the same repository location (a network location specified via IP address) is listed.
However, each project still seems to want to create a clone of the repository. Any ideas?
In our setup (using Jenkins 1.506), I've defined a custom workspace under the Advanced Project Options for each of my builds, typically at [project]\repo and then build from there into a \build\ folder.
If you define the custom workspace for each Jenkins project to point to the same shared custom workspace using the same source for the repo it will reuse what is already there.
I've not tested this, but I would assume that under this setup, it is important to prevent concurrent builds from occurring in the same working directory. Bad things would follow.
As a followup question: What is your rationale for not wanting each build to have its own source code?