Resolvi testar a VPS seguindo as dicas do Tiago Matos, e como deu certo, estou compartilhando os playbooks aqui com a galera.
Referências:
Resolvi testar a VPS seguindo as dicas do Tiago Matos, e como deu certo, estou compartilhando os playbooks aqui com a galera.
Referências:
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: ubuntu | |
| labels: | |
| app: ubuntu | |
| spec: | |
| containers: | |
| - image: ubuntu | |
| command: |
| // testing against socat: | |
| // socat -u TCP-LISTEN:5555,reuseaddr,fork STDOUT | |
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "time" | |
| ) |
| # OpenAI/GPT version of https://gist.github.com/evbruno/13ba9181b64eeb063079d8d1146125b4 | |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "os/signal" | |
| "slices" |
| # Gemini version of https://gist.github.com/evbruno/13ba9181b64eeb063079d8d1146125b4 | |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "os/signal" |
| # learning go day 3 | |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "os/signal" | |
| "slices" |
| FROM node:lts | |
| WORKDIR /app | |
| RUN echo "const express = require('express')" > index.js | |
| RUN echo "const app = express()" >> index.js | |
| RUN echo "app.get('/', function (req, res) {" >> index.js | |
| RUN echo "res.send('Hello World')" >> index.js | |
| RUN echo "})" >> index.js | |
| RUN echo "app.listen(3000)" >> index.js |
| def subject = "job name" | |
| Jenkins.instance.getAllItems(Job.class).each { job -> | |
| if (job.toString().contains(subject)) { | |
| println " > " + job.name | |
| job.builds.each { build -> | |
| println ' >> ' + build.number + ' > ' + build.result + ' > ' + build.getDescription() | |
| // | |
| //if (build.number < 100) build.delete() | |
| //if (Result.SUCCESS != build.result) build.delete() |