jenkins自动发布之go/golang项目

go语言项目 后端API接口 beego框架 Dockerfile FROM golang:1.16-alpine as builder WORKDIR /work ENV GO111MODULE=on \ GOPROXY=https://goproxy.cn,direct COPY . . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app . \ && mkdir run && cp -r conf app run && cp conf/app-test.conf run/conf/app.conf #FROM scratch FROM alpine RUN apk add --no-cache ca-certificates tzdata \ && ln

Docker安装jenkins

运行jenkins 1 2 3 4 5 6 7 8 9 10 11 12 13 sudo docker run \ --name jenkins-blueocean \ --env TZ='Asia/Shanghai' \ -u root \ -d \ -p 8080:8080 \ -p 50000:50000 \ --restart always \ -v /data/jenkins_home:/var/jenkins_home \ -v /var/run/docker.sock:/var/run/docker.sock \ jenkinsci/blueocean sudo docker exec jenkins-blueocean cat /var/jenkins_home/secrets/initialAdminPassword 安装插件 Publish Over SSH https://plugins.jenkins.io/publish-over-ssh/

k8s部署elasticsearch

安装ECK 1 2 kubectl create -f https://download.elastic.co/downloads/eck/2.1.0/crds.yaml kubectl apply -f https://download.elastic.co/downloads/eck/2.1.0/operator.yaml 安装Elasticsearch 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 tee elasticsearch-7.16.3.yaml << EOF

Debian 11初始化脚本

不推荐使用 不推荐使用! 仅供参考! 2025.3.29 参考 debian 10初始化脚本 此脚本比debian10初始化脚本略有变化,引用了一个环境变量$VERSION_COD

go/golang学习之路(1)go指南练习题解答

go指南练习题 练习:切片 https://tour.go-zh.org/moretypes/18 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 package main import ( "math" "golang.org/x/tour/pic" ) func Pic(dx, dy int) [][]uint8 { pic := make([][]uint8, dy) for y := 0; y < dy; y++ { pic[y] = make([]uint8, dx) for x := 0; x