Using a Code Repositories library in a Code Workbook - shared-libraries

Is it possible to build a library using Code Repositories and then call that library in a Code Workbook?

Yes. You need to ensure that the shared channel that libraries are published to from Code Repositories is configured in the Code Workbook profile's conda-environment.shared-channel-dependencies setting.
Please work with your Palantir Support Team to get this backend configuration change made.

This is a simple way to do it for testing purposes.
Create the library
Create the repository of Python Library type:
Add the function:
You can inspect the library name in the file gradle.properties.
Note: underscores _ will be translated into hyphens -
Commit and pull into the master branch.
Create a new tag (necessary) and wait until Checks pass.
Create Code Workbook
Create a new code workbook in the same project:
"Environment" -> "Customize Spark environment".
Click "Customize profile".
Search for and add your library:
Click "Update environment" and wait until the customized environment initializes.
Result

Related

Testing ARM-Templates with ARM-TTK

I am trying to use ARM-TTK for doing unit testing for my ARM templates and ensuring that the templates follow uniformity. I am only running few tests.
We are using Azure Repos as our VCS
I have incorporated this in my AZDO pipeline as a pre PR merge task which is in the form of a branch policy, so that before a PR is merged, these tests will run and validate all the templates that are pushed to the main branch.
But the problem is, the tests are returning false positives even though there are no issues with the JSON files.
According to this link ARM-TTK it seems there has to be one azuredeploy.json or maintemplate.json and all the other files are tested as linked templates.
I have JSON files with other names pertaining to the function of the template like win_vm_deploy.json, function_app-deploy.json etc etc.
It is not possible for me to have all the files as linked templates to the azuredeploy.json or maintemplate.json as mentioned in the URL.
I would also like to run the selected tests against the files loaded in the repo automatically and not specify a particular file to run the tests against.
So does that mean that in my situation i won't be able to use the ARM-TTK and utilize the unit tests?
What is the best way to check my templates in my particular folder and utilize some of the unit tests that i choose from ARM-TTK, but then i don't have to have a main template and the other templates as linked templates.
Appreciate any help
When we are working with several people to create a complex deployment it is recommended to use separate JSON files linked to an azureDeploy.json or a mainTemplate.json file. But it's not mandatory to do the same in every case.
To test one file in that folder, add the -File parameter. However, the folder must still have a main template named azuredeploy.json or maintemplate.json. In your case all files need to be specified in a script. There is no such shortcut available for automation.
You can customize the default test or even create your own test. You can implement you own set of rules by authoring the custom tests. A custom test needs to be placed in the correct directory:
_/arm-ttk/testcases/deploymentTemplate_
You can check this documentation for more information.
Also try this tasks for integration with Azure Pipeline.

How to connect asciidoc with source code in gitlab?

I manage my Spring Boot project with Gitlab. (git#gitlab.com:user/project.git).
I keep the documentation in the separate wiki project provided by Gitlab. (so git#gitlab.com:user/project.wiki.git).
Now I want to refer directly from the documentation to the source code in the project and list code snippets for explanation. This way the code would always be up-to-date and you would only have to adapt the explanation if necessary. But how can I link from the wiki project to a remote file? To give an example, this is how it should look later on.
[source,java]
----
include:: https://gitlab.com/user/project/-/raw/master/src/main/java/de/mycompany/project/ProjectApp.java[]
----
asciidoctor doesn't provide a way to perform remote includes: all include content has to be in the local filesystem.
If you use asciidoctor.js, you could use this extension: https://github.com/feelpp/asciidoctor-remote-include-processor
Otherwise, you could use some form of build coordination, such as make, Ant, etc. to fetch the remote content to a known local location, update your Asciidoc document(s) to include the now-local location, and then run asciidoctor.

How to define project version in Azure Boards?

All
I'd like to create some project release versions(released and unreleased). In JIRA, you can find these versions in following JSON file. I need these versions to associate with work items in Azure boards. For example, to show a work item (Type: Bug) is found in certain version. My project is not built on Azure pipeline, So I don't have any release pipeline, so Is there any way to define these versions and name them with whatever name I want. Thanks.
https://jira.XXXX.com/rest/api/latest/project/XXXXX/versions
Currently, we seem have no method to directly link work items on Azure Boards to the 3rd-party CI/CD pipelines. Only Azure Pipelines is supported.
As a workaround, you can try to add a custom field on the work item to show the related release as the field value.
For example, add a text field named "Release" on the Bug item, then you can fill this field with the release version or the URL of the related release.
In the 3rd-party CI/CD pipelines, you can set up a step to execute the REST API "Work Items - Update" to automatically fill the release version in the field.

how to add clone git to my own created repo in gitlab

How to take the project from one repo (where I've been given developer rights by some other person who is the master) to my own created repo (where I'm the master). I'm able to use both CMD and webstorm IDE for accessing GIT.
The action you want to perform is called 'fork' in the context of source code management (e.g git). Quoting https://docs.gitlab.com/ee/gitlab-basics/fork-project.html:
A fork is a copy of an original repository that you put in another namespace where you can experiment and apply changes that you can later decide whether or not to share, without affecting the original project.
To fork a project in GitLab, you just have to click on the 'fork' button on the project's main page.
You can read detailed steps on https://docs.gitlab.com/ee/user/project/repository/forking_workflow.html#creating-a-fork

TFS copy build output to source control

I have been working with a TFS project that supports copying build output to source control. If I open the build definition, this is under "Build Defaults". There is an option to copy build output to a source control folder.
I have just installed TFS Server 2013 (with update 2) and I want to use this feature with a new Team Project. However, if I create new build in VS 2012 or VS 2013 on the new server, I am not given the option to copy build output to source control. What gives?
I am not looking for a workaround, I want to know what to change so that my server acts like the first one I described. Thanks!
Screenshots of what I'm talking about: http://imgur.com/a/mhDNQ
This was a feature that was temporarily present in TFS, but I believe has since been removed. If I recall it was put in there specifically to support the cloud-hosted elastic build servers which didn't have access to network shares to drop the builds in.
Most people recommend against putting your build outputs into TFS. The best approach is to publish them to a NuGet feed.
In any case if you want to put your build outputs into TFS (or a NuGet feed) you'll have to modify the build workflow to do that yourself.
Open a new build definition > process.
Under template select new and you should be able to choose project and folder. Find your original template and link it. Your option should appear.
In TFS 2013 this has changed to be "store drops in TFS". When you select this option the drop I'd stored in a new inversioned store that you can access.
While you can easily get the files out as indecision or zips the built in tools like release management do not support it yet. I would recommend that you use this option but publish your assets to a nugget repository.
If your TFS is available online (VSO or https) then you can use MyGet to dynamically load the nugget packages that you are publish and make them available on a feed.
http://docs.myget.org/docs/how-to/use-tfs-online-git-with-myget-build-services

Resources