rundeck - submit a job from the command line on linux? - rundeck

I have a scenario where I want to submit rundeck jobs via the cli just as if a person was sitting in front of a gui with a keyboard/mouse, to provide an additional way of convenience and automation.
Is there a cli tool for submitting rundeck (relevant doc link would be superb.)
Thanks.

U can refer this github : https://github.com/rundeck/rundeck-cli
also u can build rundeck for your linux from source.

You can use RD CLI tool.
Also, you can execute all Rundeck actions using the API, check this and here to see the full API reference.

Related

on Azure in repo's script of CI/CD for the best practices which code to use?

on Azure in repo's script of CI/CD for the best practices which code to use: JSON or PowerShell or CLI ?
which code from above is the best and professional way to use ?
Thank you.
As for the best practices of script of CI/CD, each of them has their own features and could be used in it.
For example, when you would like to create the script to build VMs, you could select the JSON one because through the JSON script, you could see all information of the VMs more directly than other kinds of scripts. You could see the example through https://learn.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-build-deploy-azure-pipelines?tabs=java-script .
As for building AKS, you could use Power shell to create the script as it needs fewer related properties to be defined while comparing with other scripts. You could see some examples in the following document https://learn.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-powershell
To be concluded, each kind of way to create the script is available for CI/CD and you could select which you are used to using or according to the advantages of each script.

OBIEE RPD automation from one environment to another

I'm looking at a possible script to automated the rpd deployment from one environment to another (dev,test,prod). Has anyone ever worked on such a script on a Windows based platform. There is a runbat.cmd in OBIEE, however there are no instructions on how to build the script.
Any suggestions would be greatly appreciated.
Thanks
Yes, you can automate rpd deployments using wlst scripting language: to connect to weblogic, lock configuration, upload the new RPD, save changes and perform a system restart.
However you'll probably have to perform some aditional tasks to the RPD before uploading it, tipically, changing the connection information, because it will be different between enviroments. For that you'll need to automatically patch the RPD with the correct connection information, using XUDML files.
Here are two blogpost with examples on how to do this, you can adapt the scripts to your own needs:
http://www.askjohnobiee.com/2013/03/how-to-automatic-repository-deployment.html
http://adventuresinobiee.blogspot.co.uk/2013/02/scripted-rpd-deployments-using-udml-and.html
Regards
Ana GH

Is it possible to show Fortify scan result on Jenkins

Is there a way to display Fortify scan result on Jenkins?
I've seen only Jenkins plugin to run Fortify scanning and upload result to Fortify server but not the other way around.
Fortify has a plugin for Jenkins. It allows you to automatically upload results to Software Security Center after a build. The Jenkins plugin also integrates with Software Security Center to show the results of a scan in Jenkins. In your Fortify documentation set, look for a document called HP_Fortify_Jenkins_Plugin_TN_4.30.pdf.
I just found that on Google, you can import the Fortify results into a SonarCube instance:
http://www.sonarsource.com/products/plugins/integration/fortify/
And next, you can use the Sonar Web API to publish the results in Jenkins:
how to publish sonar result in jenkins server, or do we have sonar-report jenkins plugin
I hope it helps :)
You can use either Fortify Audit Workbench (AWB) or the Fortify Software Security Center (SSC) to review (aka audit) the issues (FPR file) generated in the Fortify sourceanalyzer.exe step in your Jenkins script. As an open source build and deployment tool, I do not see how Jenkins would be a suitable tool for auditing issues and posting bug reports. Please clarify your question to explain what you want to with the FPR file on the Jenkins server.
Yes: you need to invoke an external script (gradle?) and use FPRUtility command with "-query" parameter. You can test the queries using the "Advanced..." search in the audit workbench. If you do it after merging with the previous result (FPRUtility -merge ...) you can achieve an incremental scan.
Jenkins is CI/CD tool that help to upload the fortify results directly to the SSC(Software security center) after the build.
Integration of HP Fortify with Jenkins :
Step 1) Install Jenkins plugin on cloud server or you can directly access the cloud Jenkins server(if it is already installed on server).
step 2) Create the folder in Jenkins and configure the properties(making changes in configuration file on left side).
Step 3) Disable upload function in Jenkins (Means you can not provide the SSC link, while configuring the configuration file on left side), so that .FPR file will not uploaded automatically on SSC.
Step 4) Once the batch script or groovy script is successfully build , then you would be able to see the result on Jenkins console.
example:
Critical= 30
High= 20
Medium=10
Let me know if you have any question while integrating Jenkins with fortify -SSC.Thank you
I never used Fortify with Jenkins, but here is another alternative that you use with Jenkins, through a plugin. Read about it here: https://blog.probely.com/how-to-configure-jenkins-to-integrate-security-into-ci-cd-2b340728de56
You scan start a scan from Jenkins both in a freestyle and pipeline project.
Full disclosure: I'm highly affiliated with Probely, I'm the CTO :)

Script error while using deploy.ps1 to deploy virtocommerce project

I'm using the official virtocommerce azure deploy script under folder "virtocommerce\src\Extensions\Setup\VirtoCommerce.PowerShell" to deploy virtocommerce(with azure tool v2.4), i encounted some problems while running "deploy.ps1" script in windows azure powershell
In "azure-db.ps1", there's lot of syntax like "Get-Date –f" , the dash character is wrong ,"–" must be "-", otherwise you will get error.
In "azure-deploy.ps1", there's a function "build-search" which use cspack.exe to create "ElasticSearch.cspkg",that's correct, but for other packages such as "CommerceSite.cspkg" and "AzureScheduler.cspkg", i did not found any functions to create those packages, this will lead to an error says "CommerceSite.cspkg" can not be found.
Does anybody has the same problems?
Turn out that there's some problem inside code:
"deploy.ps1" script is using deploy-tfs.ps1 , and use parameter "$build".
parameter "$build" has been reset to 'False' in "deploy-tfs.ps1"
"azure-deploy.ps1" using "$build" to decide if it's need to build the azure package, and this parameter is always 'False', so the azure package will never be creat.
The script is designed to run on azure sdk 2.4, not 2.5. The script is used to deploy daily both demo and testing environments and were completed succesfully today. You can see the status here: https://virtocommerce.codeplex.com.
As for cspkg, it is generated during actual build, by msbuild. The elastic search ccspkg has to be created differently, as it has to include javaruntime in addition to elasticsearch runtime and packaged into a single setup.
The new, 1.13 version of Virto Commerce by default deploys azure website instead of azure cloud service for website and scheduler (deployed as a web job). Only elastic search is deployed as a cloud service. The setting can be changed in deploy.ps1.
Also make sure to check the complete instructions on how to deploy source code to azure at http://docs.virtocommerce.com/display/vc1devguide/Source+Code+Azure+Deployment.

How to get Jenkins "Console Output" after triggering build remotely?

I am using a Perl script to trigger a build in Jenkins using LWP modules. This works but after executing the job, I would like to parse the console output.
Is there someway to get this?
Log into Jenkins and take a look at the bottom of the webpage near the right hand side and click on the REST API link. This will give you information about the Jenkins RESTful API which is a great way to pull information off of Jenkins once you understand how to construct the URL.
And, here's how you get the console text:
$ curl "${JENKINS_URL}/job/${JOB_NAME}/lastBuild/consoleText"
You can use Perl's various LWP modules to talk to Jenkins.
Use the Log Parser Plugin for Jenkins. Read the page number 24 here for the configuration and other details.
If you want to access the log from another Jenkins job that runs on the master, you can do it from a chained (child) job without needing to send an http GET. See https://stackoverflow.com/a/41974193/1580627.