Add a specific file of a project into the release GitLab - 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?

Related

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.

VS Code Source Control is tracking all my files

I cloned a couple of repositories from Github, but now every time a make a new file, my Source Control tracks it and wants to send it to Github. I only want it to track the files I cloned from Github.
Also, every time I load a Python file, I have to choose a Python Interpreter. How do I get it to choose automatically? I only have one Python anyway.
You can add them to .gitignore file.
If you'd like to set up a default interpreter for your applications, you can add an entry for python.pythonPath manually inside your User Settings.

Maven - copying properties file from SVN to Linux based App Server machines

We are using Maven and Jenkins for our automated Build and Deployment needs. Our Build Engineer has left and it is now up to me (Java Architect) to implement a few remaining stuff. I tried a lot of things to resolve this issue we are having. The problem statement is -
We have made a separate project in Eclipse to store properties files. The Developers check-in the properties file into SVN once they make any changes to it. Now we want that Maven, when triggered to do a deploy, to do the following -
1. Take the latest properties files from the SVN from the project used to store properties files.
2. Copy the same onto the Linux based JBoss App Server's /conf/ folder
3. Carry on with its deployment task.
We would like to have solution to point 1 and 2 above.
I dont know the exact answer. But it is quite doable. Quick google search did not show up any svn related plugin to retrieve properties. But you can always write your own maven plugin to do that task. For an example, if you want to retrieve properties file from a svn location to a local file system, just write a simple maven plugin[1] using the svn-kit [2].
we can use maven-wagon plugin[3] to transfer any artifact to a destination. Given that it supports SCP i would go with that. (just like a doing a scp to a remote Linux machine)
HTH.
[1] http://maven.apache.org/guides/plugin/guide-java-plugin-development.html
[2] http://svnkit.com/
[3] http://mojo.codehaus.org/wagon-maven-plugin/usage.html

How does a bin folder that is excluded from a project affect automated builds?

We do automated builds using Nant and CruiseControl.net. I'm very green when it comes to the process. While looking into some things, I noticed that for most(all?) of the solutions involved in the automated build process, the bin folders are included in the project. Is this a requirement for automated builds? If the bin folder is excluded, will the folder and any files in it need to be copied to the deployment servers manually?
Thanks.
If you are referring to the /bin/debug/ folder under a project, you should not need those checked into your source control. If you have external libraries (log4net.dll for example) they should be checked into source control along with your code, but in a separate folder (named "ThirdParty" or "DLLs" for example.) When CruiseControl.net runs, it should compile any assemblies that have been modified, and copy output to the /bin/debug/ folder in the same way as VisualStudio copies those files on your box.
It is better to include bin folder in the automated build process, since it contains some external dlls like AjaxControlToolkit along with internal dlls.
We here excluded the Debug folder and user option files(*.suo) from the automated build.

CruiseControl.net checking files in source control (into different projects) after building them

I have set up an automated build server - so far so good. Now I want to sort out dependencies. We have several DLL files that are included in many (unrelated) projects, and I want to set up CruiseControl.NET to first build our DLL files and then "check them in" other projects in SVN, so when they get built, they will always use the last version of DLL files.
Is something like that even possible? Is there a better way to keep dependencies sorted over several projects on many computers?
The way I do this is to have a project in cruise control for the common dll, it uses a source control trigger and builds whenever changes are checked in.
On the dependant project, I have the source control trigger, but also a project trigger so any checkin on the common.dll causes the common.dll to be rebuilt, which in turn triggers a build of the dependant project.

Resources