Follow instructions here [https://docs.gitlab.com/runner/install/linux-repository.html]
Create the service file :
| mr_automatic_link_ticket: | |
| stage: validate | |
| rules: | |
| - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' | |
| before_script: | |
| - apk add jq curl bash | |
| script: | |
| - | | |
| cat > script.sh << 'EOF' | |
| #!/bin/bash |
| stages: | |
| - test | |
| - coverage | |
| test: | |
| stage: test | |
| rules: | |
| - if: ($CI_PIPELINE_SOURCE == 'merge_request_event') | |
| when: always | |
| - when: always |
Follow instructions here [https://docs.gitlab.com/runner/install/linux-repository.html]
Create the service file :
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--flannel-backend=vxlan" sh -
Without traefik
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable traefik --flannel-backend=vxlan" sh -
| func main() { | |
| stringifyData := `{"name":"toto"}` | |
| var data interface{} | |
| if err := json.Unmarshal([]byte(stringifyData), &data); err != nil { | |
| panic(err) | |
| } | |
| //transform interface to declared struct | |
| res := transform[Test](data) |
| package service | |
| import ( | |
| "crypto/dsa" | |
| "crypto/rand" | |
| "crypto/sha256" | |
| "encoding/asn1" | |
| "encoding/base64" | |
| "encoding/pem" | |
| "errors" |
| # Execute this to create alias | |
| #cd $env:USERPROFILE\Documents | |
| #md WindowsPowerShell -ErrorAction SilentlyContinue | |
| #cd WindowsPowerShell | |
| #New-Item Microsoft.PowerShell_profile.ps1 -ItemType "file" -ErrorAction SilentlyContinue | |
| #powershell_ise.exe .\Microsoft.PowerShell_profile.ps1 | |
| #then execute $profile to save and restart powershell |
| /* | |
| npm install http | |
| npm install fs | |
| npm install path | |
| npm install xml | |
| npm install querystring | |
| */ | |
| var http = require('http'), | |
| fileSystem = require('fs'), | |
| path = require('path'), |
| :label | |
| echo start | |
| timeout 5 | |
| REM replace COMMAND by your command | |
| for /f "delims=" %%i in ('COMMAND') do set _string=%%i | |
| rem --- Remove whitespace at left | |
| for /F "tokens=*" %%s in ("%_string%") do set _trimmed=%%s | |
| echo off | |
| echo [%_trimmed%] | |
| if not %_trimmed% == "healthy" goto label |