研发
使用腾讯云 Serverless 开发公众号后端
· ☕ 4 分钟
1. Serverless 的使用场景 如果说云计算是希望资源能够像自来水一样,隋开随用、随关随停,那么 Serverless 就是云计算的未来方向之一。相较于 IaaS、Kubernetes 这些运行时,Serverless 提供更细粒度资源控制的同时,还能提供更大的弹性,允许开发者快速交付

如何远程触发 GitHub Action
· ☕ 2 分钟
通常,我们需要在 GitHub 上进行一些操作,才能触发 GitHub Action。本篇将介绍一种通过 API 远程调用触发 GitHub Action 的方法。 1. 常见的几种触发 GitHub Action 的方式 下面是一个 GitHub Action 的示例: 1 2 3 4 5 6 7 name: GitHub Actions Demo on: [push, pull_request] jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - run: echo "Hello World!" 在 on 关键字下,定义的就是触发 Workflow 执行的事件。

Go 私有包的构建和使用
· ☕ 2 分钟
1. 创建一个 Go Modules 项目 创建目录 1 2 mkdir go-test cd go-test 初始化包 1 2 3 4 5 go mod init gitlab.private.com/shaowenchen/go-test go: creating new go.mod: module gitlab.private.com/shaowenchen/go-test go: to add module requirements and sums: go mod tidy 添加业务代码 main.go 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 package main import ( "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "hello world.", }) }) r.Run() } 下载依赖到 vendor 1 2 go mod tidy go mod vendor 本地运行 1 2 3 4 5 go run

一个通用流水线设计
· ☕ 5 分钟
1. 解耦引擎释放流水线能力 在设计系统时,我们常面临两难。是内敛复杂度,对外提供单一易用的功能;还是释放复杂度,将灵活归还用户。这非常考验产品能力。 设计 CICD 系统时,我们可以直接将 Jenkinsfile、PipelineRun 等概念直接抛给用户,让

国内访问 GitHub 的若干方法
· ☕ 1 分钟
由于众所周知的原因,在国内的网络环境下,访问 Github 时,网络会阻断或者很慢。本文提供了若干访问方法。 1. 使用 Github Mirror 下载 直接在 GitHub 仓库前面拼接 Proxy 地址,不同的 Mirror 拼接方式可能有所不同。下面以拉取 https://github.com/shaowenchen/scripts 仓库为例。 https://ghproxy.chenshaowen.com 1 git clone https://github.com/shaowenchen/ops 2. 通过 Gitee 导入 GitHub 项目 可以参考文档: GitHu