To migrate from cedar to cedar-14 the docs says to first to a heroku stack:set cedar-14 and then the app will be migrated on the next git push.
The problem is that we are not using buildpacks but instead build our own slug which we publish through the heroku API.
Is there a way to trigger the migration without pushing to the heroku git repo?
To change the stack using the build API you need to send the stack as part of the Slug create post call.
e.g
local response=`curl -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/vnd.heroku+json; version=3' \
-d { \
"process_types": { \
"web": "java $JAVA_OPTS -Djetty.port=$PORT -jar target/dependency/jetty-runner.jar --config jetty.xml target/xxxx.war" \
}, \
"stack": "cedar-14" \
} \
-n https://api.heroku.com/apps/EXAMPLE_APP/slugs`
This will change your stack!
NOTE: You need to include the correct JVM when creating the slug
Related
I have the following aws cli code in my project's makefile trying to deploy my troposphere cf template:
aws cloudformation deploy \
--template-file params/batch.json \
--stack-name $(STACK_NAME) \
--parameter-overrides file://params/$(ENV).json \
--capabilities CAPABILITY_NAMED_IAM \
--output json && \
aws cloudformation wait stack-create-complete \
--stack-name $(STACK_NAME)
I am trying to wait for the template to complete and deploy. Even so, it gets stuck in review_in_progress. Not sure if it is just a template issue or I also have to execute the changeset as I am only creating it.
Need to Trigger "Perform Maven Release" of other job by using command smthing like this
curl 'https://192.10.160.105/jenkins/view/job/mavwn/m2release/'
-H 'Content-Type: application/x-www-form-urlencoded'
--data 'releaseVersion=$releaseVersion&developmentVersion=$developmentVersion&json={ releaseVersion: $releaseVersion, developmentVersion: $developmentVersion}&Submit=Schedule+Maven+Release+Build'
mentioned in
"https://medium.com/#fercalderon/how-to-trigger-a-maven-release-job-from-a-pipeline-job-in-jenkins-6449cf2e6263"
But in the maven Jenkins job there is dry-run checkbox to select, How to select dry-box through given command and schedule a build? Please share if any one has any idea?. Thanks in advance
you can do like this to select a checkbox when triggering the build
&name=dry-box&value=on
curl 'https://192.10.160.105/jenkins/view/job/mavwn/m2release/'
-H 'Content-Type: application/x-www-form-urlencoded'
--data 'releaseVersion=$releaseVersion&developmentVersion=$developmentVersion&name=dry-box&value=on&json={ releaseVersion: $releaseVersion, developmentVersion: $developmentVersion}&Submit=Schedule+Maven+Release+Build'
I'm using Jenkins to run tests before deploying to Heroku using a git publisher plugin. I want to sandwich my deploy with maintenance mode ON/OFF but don't want to install the heroku toolbelt (reference) on my jenkins machine (nor do I want to go to the Web UI and toggle the maintenance mode manually). I don't want to install the heroku toolbelt on jenkins because it adds to the customization and configuration I'd need to do to the jenkins installation and I want to keep my jenkins instance as disposable as possible...driven rather by source code pipelines (Jenkinsfile).
Ideas:
utilize a docker image that has the heroku toolbelt installed on it
utilize a multi-buildpack that does it for me?
Any suggestions or experience on how I might accomplish this?
You can use heroku's platform api to do this:
https://devcenter.heroku.com/articles/platform-api-reference#app-update
The following curl request will put your app into maintenance mode:
curl -n -X PATCH https://api.heroku.com/apps/$APP_ID_OR_NAME \
-d '{"maintenance": true}' \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.heroku+json; version=3"
-H "Authorization: Bearer <heroku token>
You will just need to replace the app name, as well as the token.
You can generate OAuth tokens using the cli-oauth cli plugin locally.
I have setup a Teamcity Project in Windows system within Teamcity.
But I wish to trigger the Teamcity build from Windows command prompt.
Is this possible?
If yes, Is there any documentation or setup guide for this?
Taken from the TeamCity documentation:
curl -v -u user:password http://teamcity.server.url:8111/app/rest/buildQueue --request POST --header "Content-Type:application/xml" --data-binary #build.xml
https://confluence.jetbrains.com/display/TCD9/REST+API#RESTAPI-TriggeringaBuild
This is my Ruby script for GitLab API, I'm doing commits and pushes with it: https://github.com/ivanove/my_works/blob/master/Create-Repo.rb
I'm using CURL inside of it to make requests.
So the question is, how can I set namespace of repository when it's created?
This is the command I use:
cmd = %Q<curl -H "Content-Type:application/json" http://#{#host}/api/v3/projects?private_token=#{#token} -d '{"name":"#{name}","visibility_level":20,"namespace_id":"group-from-1"}'>
I added namespace_id from GitLab Documentation, but it doesn't work.