How to add deployment message parameter with CloudBees Deployer plugin - jenkins-plugins

Is there a way to give a custom message to the deployment with the Cloudbees Deployer plugin? We are used to putting the git version to the deployment so that it's easier to see which version we have running at run#cloud.
We've tried doing the deployment with the bees maven plugin and there it's possible to get the message parameter set from a build parameter. It just would be nice to be able to use the plugin instead of having to mess with the maven plugin, which is easier to get wrong in the configuration phase.

This feature was not available prior to version 4.4 of the CloudBees Deployer plugin.
Version 4.4 adds the ability to configure the description in the "Advanced" button:
The default value for this field is ${JOB_NAME} #${BUILD_NUMBER} so as to retain the previous behaviour.
The field supports all the usual Jenkins Environment token macro expansion, so you probably want to set it to something like ${GIT_COMMIT} or maybe ${GIT_COMMIT} ${JOB_NAME} #${BUILD_NUMBER}. In any case the standard token macros should provide the flexibility you require.
Note: If you are using DEV#cloud, and the Jenkins has a pre-4.4 version of the plugin you will have to wait until after 2013-04-15T15:00Z and restart your Jenkins instance to pick up the newer version of the plugin.
Note: If you are using the CloudBees Deployer plugin via the CloudBees Free Enterprise Plugins route, you will have to force the update center metadata to update or wait until after 2013-04-16T12:30Z to see the update in the list of plugins.

Related

GAE: No longer able to update my Gaelyk project due to appcfg losing support

Recently tried to update my Gaelyk project (yes, it's old, but it works well and I still use it), but Google App Engine will no longer accept the update. The error message returned is "Deployments using appcfg are no longer supported. See https://cloud.google.com/appengine/docs/deprecations". The thing is, I never used appcfg to deploy my application; I used Gaelyk and Gradle. But obviously Gaelyk must have used appcfg under the covers.
I did download the replacement Google Cloud SDK, but this new tool is not similar at all to how Gaelyk and Gradle worked. Is there anything I can do to get Gaelyk to work anymore? Or is Gaelyk just dead and I need to rewrite my application (like in Node.js or something instead of Groovy).
This will be hard, however I will try to help you as possible. I think you may try to migrate it somehow to app.yaml configuration of GAE.
I am not sure what plugins are used in the project. From Gaelyk temple project I can see that it's using appengine-geb which, according to the documentation, behind the scenes, is using gradle-appengine-plugin (there is wrong link on this doc, but proper is bellow).
On the github of gradle-appengine-plugin I have found following.
There is a note:
NOTE: All App Engine users are encouraged to transition to the new
gradle plugin for their projects.
And in FAQ part there is following information:
How do I deploy with gcloud?
If you're using gcloud to deploy your application, the newest version of app deploy > doesn't support war
directories, you will need to provide it with an app.yaml OR you can
use the appengineStage task to create a directory that is deployable
in /build/staged-app
$ ./gradlew appengineStage
$ gcloud app deploy build/staged-app/app.yaml --project [app id]
--version [some version]
NOTES:
You must explicitly define all config files your want to upload
(cron.yaml, etc)
This does not work with EAR formatted projects.
I think the best option will be to migrate to new appenine plugin or if not possible try to implement is with gcloud app deploy command crating the config files manually (at least app.yaml). And for this migration I can provide you this document.
I hope you will manage somehow...
I can confirm that Serge's answer on the Gaelyk Groups site works; the same procedure that he figured out also worked for me. To summarize:
Run gradlew appengineRun as run previously with Gaelyk.
Copy all jar files inside the build\exploded-app\WEB-INF\lib folder into a \src\main\webapp\web-inf\lib folder (for me the new lib folder did not exist previously).
To deploy, use the new required gcloud tool, and instead of running gradlew appengineUpdate (which fails now), instead run
gcloud app deploy appengine-web.xml where that XML file can be found in your webapp/WEB-INF directory. I navigated to that directory to run the gcloud command, but you can use a relative path there if your working directory is elsewhere. (There are a number of optional flags associated with the gcloud app deploy command, but I didn't need any of them.)
Serge needed to use these instructions to convert datastore-indexes.xml to index.yaml and run gcloud app deploy index.yaml, however, I didn't need to do this because I had no datastores.

App rejected by Apple due to UIWebView being deprecated

I was working on a minor update to an app already accepted and available in the Apple App Store, and when I uploaded the new version, I got an e-mail that the binary was rejected because:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no
longer accepted. Instead, use WKWebView for improved security and
reliability. Learn more
(https://developer.apple.com/documentation/uikit/uiwebview).
How do I go about doing that? Is there a build hint or something?
Additional Information:
My app is using some CN1 extensions:
SENSORS,
BLUETOOTHLE,
JSON (required for BLUETOOTHLE)
As the BLUETOOTHLE extension uses a Cordova plugin, and Cordova was using UIWebView, I think that is the likely source.
According to Cordova's issue tracker, the Cordova plugin doesn't use UIWebView in its latest. It is possible that the build server has an old version cached. Try explicitly setting the version to 6.1 by adding the following build hint:
ios.pods=Cordova ~> 6.1
You'll already have this build hint, you just need to add the "~> 6.1" part.
Please post to indicate whether this fixed your issue, and I'll update the cn1lib to automatically add the version to the build hint.
Codename One doesn't use UIWebView at all. Make sure all your cn1libs are up to date and list them. Review your own native code and dependencies if you have any to make sure there's no usage there.

Configuring Groovy on Jenkins

I'm using Jenkins ver 2.121.2. I'm trying to configure the Groovy plugin to run groovy scripts via a Jenkins job. The plugin documentation provided here
does not appear to match the UI I see in the System Configuration - Groovy section of this version of Jenkins. The various parameters don't match and so far I'm unable to get the plugin to run a simply groovy script. Not being familar with java and how the classpath works I'm not able to loosely interpret the instructions and get it working. If anyone can point me at documentation that more closely matches the Groovy plugin with the most current version of Jenkins I would appreciate it.
First, you need to configure an instance (or instances) of Groovy to run scripts in your builds. You do that on the Global Tool Configuration page.
You should have a least one JDK configured in the Global Tools Configuration (or have JAVA_HOME defined).
You can have Jenkins install the version of Groovy you want (on first use), or you can install Groovy yourself and point to it as in the example below:
Once this is in place, you can use the Execute Groovy Script build step in a build:

Google Endpoints V2 and Maven plugin version?

We have a multi-module (war-packaged) project that uses com.google.appengine - appengine-maven-plugin target being ear file.
We have migrated succesfully to Java8 and EndpointsV2. It builds and runs fine in Cloud. However the following requirement is still a bit questionmark in the migration instructions. What is the reason behind this incompatibility and requirement? Or is it just related to for example "discovery docs" that we are not using anyway?
The old App Engine Maven plugin, with group com.google.appengine, is incompatible with the Endpoints Framework plugin. You must use the new version shown above
https://cloud.google.com/endpoints/docs/frameworks/java/migrating
If you aren't using discovery docs or generated client libraries and are only using Endpoints as a library dependency, you can remove the Endpoints plugin and the error should go away.

Failed to initialize App Engine SDK 1.8.9

I am using Indigo on a Mac Pro (10.9.1). I updated to Java1.7 in order to run some updated Google Play Service samples. Under Installed JREs, JAVA7 is shown as the only and default choice, which points to the new Java path. But when I start Eclipse, it started complaining that "JRE version is 1.6.0; version 1.7.0 or later is needed to run Google plugin for Eclipse".
I tried to add the vm option in eclipse.ini, i.e. I added
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/home/bin/java
above "-vmargs" as described here: http://wiki.eclipse.org/Eclipse.ini.
It doesn't make any difference though. Since then, I have uninstalled GPE from Eclipse and installed them again via "install new software" from https://dl.google.com/eclipse/plugin/3.7. Still the same problem. Under Google->App Engine, there is an error message "Failed to initialize App Engine SDK (path)". This points to appengine-java-sdk-1.8.9.
I have checked my Java version using all means I am aware of, i.e. from run Java -version, using Java's control panel, output from code... They all show I am using Java 1.7.0.51.
Any help is appreciated!
Edit: Google has provided a solution that works great. Add this argument in eclipse.ini
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib
Make sure that eclipse Is compiling your project to 1.7 specifications. Even though you have 1.7 selected as your virtual machine, it might be compiling to 1.6. It's in the eclipse project settings

Resources