Linking Doxygen files that are generated by Gitlab pipeline to adoc file - gitlab

What I am trying to do is to link a documentation made by Doxygen to a file written in adoc format. I was able to do so when everything was on my Desktop. I used:
link:path/to/documentation/_my_file_name_8c.html[link name to appear]
But now since the adoc file is on Gitlab and also the Doxygen documentation is generated in the pipeline (I am not fully aware of this process). I can't find a way to refer to the Doxygen documentation.
Is there a known way to do so? I need to be able to click on a link in adoc to go to the doxygen HTML file.

Related

Add a specific file of a project into the release GitLab

I'm developing embedded firmware using C and IAR as IDE.
On compiling, the IDE generates a .hex file in a specific folder which (let's say it's /Obj basically is the full code compiled. It can be flashed directly to the microcontroller.
Now, once I got to generate a Release on GitLab, it creates 4 Assets in the form of
Source code (zip)
Source code (tar.gz)
Source code (tar.bz2)
Source code (tar)
Now, I would like to add my .hex file in it as a single file when I generate the release.
I can use all the CI/CD features inside Gitlab as I would like do it automatically when I generate the release
Is there a way to do it?

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 add a new tab in Azure DevOps build result to show HTML content?

I need to display HTML content in a new tab in the build summary of an Azure DevOps pipeline. The HTML file is generated from a task of the pipeline. How to do that?
I have followed this guide (https://github.com/microsoft/vsts-extension-samples/tree/master/build-results-enhancer) which explains briefly how to build an extension that shows an HTML file content in a new tab but this HTML file is included in the extension and can't come from a build task.
Now, I'm able to display a new tab with HTML content in it but this content is in the extension package. I can't choose what file to display.
have you looked at this file in the github repo you mentionned
https://github.com/microsoft/vsts-extension-samples/blob/master/build-results-enhancer/src/enhancer/tab.ts
there is a commented out section from like 22 to 38 that does exactly what you want. You need to upload the html file produced in the build using the ##vso[task.addattachment] command (you can do this as a powershell task in the build and then just consume the html attachment.

How to embed src file in a wiki in Gitlab/Github?

I have a doc folder in my project (in Gitlab) which contains documentation generated using jsdoc. This documentation is generated at build time.
What I want to do now is to embed the resulting index.html file in a wiki, so that on each build, the wiki is automatically updated.
Is there a way to do this?
You can clone your GLitab wiki locally.
That means, after each local build, you can add one step to your build in order to modify and embed the content of the generate files (here the resulting index.html), then add, commit and push back to your GitLab wiki.
As the OP tigermarques adds in the comments:
The only extra thing I had to do was to rename the .html file to either .md or .txt so that Gitlab would show it on the Wiki page list.

Gitlab markdown links to artifacts

Is it possible in Gitlab to have source controlled markdown that contains a link to an artifact?
My runner generates metrics that are saved to a file. This output, of course, does not belong in version control. If it was in version control, I could just link to it, no problem. Instead, I mark the output as an artifact so that it is saved after the build is complete.
Currently, our devs can click the [passed] icon for the build that generates the metrics, then click 'Build Artifacts'|'Browse'|dir1|... down to the generated output metric. This is complicated, and you have to know exactly where to look.
It would be way more convenient to have a link to the artifact in the README.md.
These docs say that I can choose to store my artifacts in a different location, but that seems like a heavy solution, and it does not generalize to artifacts from different projects.
These docs say that I can embed build numbers in the artifact filename, but that's not really what I'm after. I just want the artifacts from the most recent build.
What I want is a persistent URL for the artifact, but I am unable to find anything of this nature.
Update February 2018:
Since Gitlab 8.12, the link is https://gitlabInstance/myNamespace/repository/master/archive.zip. (e.g: https://gitlab.com/rpadovani/my-gitlab-ci/repository/master/archive.zip).
There are also other formats.
You can see all the formats clicking on the little cloud in the top right of the homepage of your project.
ORIGINAL ANSWER
They are working on it right now.
Since GitLab 8.10, there is an API to do that:
curl -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/builds/artifacts/master/download?job=test"
Unfortunately you still cannot use the web interface, but there is already a MR to implement it (and a related bug with discussion).
After that MR you can link the build in your README

Resources