代码托管平台
[TOC]
代码托管平台
By: weimenghua
Date: 2022.07.04
Description:
Github
github packages
github 的镜像仓库地址
docker login ghcr.io -u USERNAME -p TOKEN
docker tag IMAGE_NAME:TAG ghcr.io/USERNAME/REPO_NAME:TAG
docker push ghcr.io/USERNAME/REPO_NAME:TAG
docker pull ghcr.io/USERNAME/REPO_NAME:TAG
DIY Github 首页
新建一个仓库名和自己 Github 用户名相同的仓库并且添加一个 README.md。
参考资料:awesome-github-profile-readme
Gitlab
安装 Gitlab Runner
设置 Gitlab Runner
@todo:使用 Docker 部署 JavaWeb
GitLab Runner
1、进入 GitLab 的仓库 > 设置 > CI/CD > Runner,新建项目 Runner,注册 GitLab Runner,执行 gitlab-runner register --url https://jihulab.com --token <token>
输入Gitlab实例的地址 输入token 输入Runner的描述 输入与Runner关联的标签 输入Runner的执行器 设置执行器的版本,alpine:latest
2、进入 GitLab 的仓库 > 代码,在项目根目录添加 .gitlab-ci.yml
,可以选择模板,详细可参考 gitlab-ci
此处选择 Bash 模板,模板内容如下:
image: busybox:latest
before_script:
- echo "Before script section"
- echo "For example you might run an update here or install a build dependency"
- echo "Or perhaps you might print out some debugging details"
after_script:
- echo "After script section"
- echo "For example you might do some cleanup here"
build1:
stage: build
script:
- echo "Do your build here"
test1:
stage: test
script:
- echo "Do a test here"
- echo "For example run a test suite"
test2:
stage: test
script:
- echo "Do another parallel test here"
- echo "For example run a lint test"
deploy1:
stage: deploy
script:
- echo "Do your deploy here"
environment: production
3、进入 GitLab 的构建 > 流水线,查看流水线构建情况
Gitea
CodeArt
阿里云效
知识碎片
- 在项目页面,按
。
进入在线编辑器,举例:https://github.dev/iewiewiew/Learn-Java - 在 github 后加1s,举例:https://github1s.com/iewiewiew/wei-notebook
- 在具体页面,按
L
输入行号跳转到对应行 - 按
ctrl + k
快速查看内容 - 在项目地址前加上
gitpod.io
可在线运行项目,举例:https://gitpod.io/github.com/iewiewiew/Learn-Java - 树状查看 github 插件:Octotree
- 树状查看 gitee 插件:GitCodeTree
- 查看 github 仓库大小:https://github.com/settings/repositories
Gitaly 简介
参考资料
Gitaly 文档
Gitaly 提供对 Git 存储库的高级 RPC 访问。 GitLab 使用它来读取和写入 Git 数据。 Gitaly 存在于每个 GitLab 安装中,并协调 Git 存储库的存储和检索。 Gitaly 可以是:在单个实例上运行的后台服务 Omnibus GitLab(一台机器上的所有 GitLab)。 根据扩展和可用性要求,分离到自己的实例并配置为完整的集群配置。 在 Gitaly 文档中:
- Gitaly 服务器是指任何本身运行 Gitaly 的节点.
- Gitaly 客户端指的是任何运行向 Gitaly 服务器发出请求的进程的节点. 流程包括但不限于:
- GitLab Rails 应用程序 .
- GitLab 外壳 .
- 亚搏体育 app Labhorse . GitLab 最终用户无法直接访问 Gitaly. Gitaly 仅管理 GitLab 的 Git 存储库访问. 其他类型的 GitLab 数据无法使用 Gitaly 访问.