I Have a Jar file. that takes arguments and perform certain actions.
EX:
java -jar MyJavaEx.jar dev
this jar file will execute some logic inside it and then prints some log.
I want run this job daily using ADF trigger. how to do this?
if this is not possible what's the best alternative approach.
If you're looking for a lightweight, serverless way to run your Java app, I'd consider Azure Functions.
You might find this document helpful:
Azure Functions Java developer guide
Related
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.
We are trying to establish a continuous deployment environment. Conflicted how to do ARM deployments. Deploying all the resources as a group is much better them handling them individually.
ARM has a nice declarative syntax. We are telling what we intend to create" without having to write the sequence of programming commands to create it. Which is great but how should we run them ?
Two options come up to my mind
I.I could download the templates and use power shell.
II. Trigger using Azure automation
III. x
What is the best practice ?
Reference
Octopus integration from source code
If you're doing this as part of your CI/CD chain, you probably want to check in the templates and deployment scripts with your source code. That way, the definition of the infrastructure is kept with the code that's intended to run on it.
If this is part of some other workflow, it really depends on the workflow :)
I would suggest using powershell\cli and just invoke the template from the uri, that is the easiest way of doing that (instead of downloading it). This can be run with anything that is capable of running a custom script task, or specific CI\CD systems that have steps to deploy ARM Template (VSTS\Octopus\probably something else)
I would advice against Azure Automation for that cause.
Also, I do suggest separate code from arm templates
I have 4 projects, which are depended each other,I am suppose to run 4 projects one by one.
Is there any way to run as single package?
I suppose that you're running the SOAPUI project using testRunner. Looking at testRunner documentation you can see that it's only possible to pass one project to the call.
However if you're using some automation build tool like gradle you can create and approach creating a custom task to for example make various calls to testRunner passing your projects to execute all sequentially, for more details take a look on this answer.
If you're not using any automation tool or you don't know how to implement it then as a possible workaround you can simply can create a CLI script to do so. For example supposing that you've the SOAPUI_HOME/bin in your classpath on Windows you can create myTestRunner.bat with the follow content:
call testrunner "path/to/your/project1.xml"
call testrunner "path/to/your/project2.xml"
call testrunner "path/to/your/project3.xml"
...
Hope it helps,
I tried to find this answer but hardly found it anywhere. I am doing the API testing, In process I need to call the rest API from my local machine. local machine contains the maven project and a framework to call respective rest API.
I need to check the code coverage of remote Rest API and form a report based on the code coverage. please help, how to do that?
Note: I found this link useful but it does not elaborate clearly on what to do?
http://eclemma.org/jacoco/trunk/doc/agent.html
you will probably do a bit of file copying around - depending on the way you run the tests.
JaCoCo runs as a java agent. So you usually add the javaagent parameter as mentioned in the docs you linked to the start script of you application server.
-javaagent:[yourpath/]jacocoagent.jar=[option1]=[value1],[option2]=[value2]
so it would look like:
java -javaagent: -jar myjar.jar
Using tomcat you can add the "-javaagent" part into JAVA_OPTS or CATALINA_OPTS environment variables. Should be similar for other servers.
this will create the jacoco*.exec files. you need to copy those back to your build or CI server to show its results (for ex if you use sonar you need those files before running the sonar reporter). Its important to just include the packages you're interested in.
You can also create one jacoco.exec file per test flavour (jacoco.exec for unit tests, jacoco-it.exec for integration tests, jacoco-at.exec for application tests).
And I would not mix coverage with performance testing - just to mention that too.
There are some examples on stackoverflow for JBoss
I'm looking to automate the deployment of XMLA scripts. I've come across an article that gives a small demo, but I'm hoping to find more info.
Specifically, where is the documentation for Microsoft.AnalysisServices.Xmla.XmlaClient and what is the best approach for overridding the database and connection values that are embedded in the XMLA script?
I assume you are just trying to deploy the analysis service cube. This utility has commandline switches and can suport configuration for different targets
Analysis Services Deployment Wizard
If you need to add further customizations, you can always process the resulting xml files with either xslt, powershell, or .net
ascmd.exe can also run xmla scripts:
ascmd.exe commandlline utility
Apparently Microsoft.AnalysisServices.Xmla.XmlaClient is an undocumented library that is actually part of Management Studio and is not re-distributable. I think that using one of Jason's suggestions or the AMO library are your only approaches.