Goland CORS, logs and healtcheck

In this guide, we’ll walk through how to create CORS (Cross-Origin Resource Sharing) and a health check endpoint in a Golang application using the Chi router. Setting Up Chi and CORS Middleware We’ll use the go-chi/chi and go-chi/cors packages to handle routing and CORS in our application. Step 1: Import Required Packages First, make sure to import the necessary packages: import ( "fmt" "net/http" "log" "github.com/go-chi/chi" "github.com/go-chi/chi/middleware" "github.com/go-chi/cors" AdminMiddleware "github.com/project/api/middleware" "github....

2024-06-01

Trigger pipelines by using the API

When you join a new project, company, customer, etc. (you’re still in the onboarding phase 😅), meanwhile you may find that you need to make a few changes to get your team’s production pipelines up and running. In this case, you can call an API trigger from one project to another (this is just a example). I’ve been in the situation described above before, and it was how I discovered this amazing feature in GitLab....

2023-07-15

Fixing tags on Azure invoices

Merging two CSV files using Pandas in Python 3 on Linux is a quick and easy process that can save you a lot of time and effort, however in my case I used other script to extract specific tag values from a CSV file, converts them into a JSON object, and writes them to a new CSV file, in that way I provided a workaround for those tags wanted....

2023-02-21

Trigger pipelines in Gitlab

The following post is example of how to activate and use Trigger pipeline by API the official documentation over here as it mentioned is can be use “to trigger a pipeline for a specific branch or tag”; for our example I use it to activate a pipeline into specific branch. Steps: repoA will be the main one where the pipeline trigger it will be activate From repoA go to Settings-CI/CD-Pipeline triggers Click on “add trigger” copy your token From repoB that will be our caller of the repoA pipeline create a variable where you can paste the token....

2022-11-10