聴く!
結局のところ、星が点灯している場合、
それは誰かがそれを必要としていることを意味しますか?
(V.V.マヤコフスキー)
序文
たまたま、ある時、私の仕事の1つで、Fortranプログラマーの1つのグループのために集合的なコード開発ツールをセットアップしなければなりませんでした。最初に、彼らはGitosisを設定し、次にTracを設定しましたが、常に何かが欠けていました。コードの同時注入や、いわゆるコードレビューには常に問題がありました...一般に、この開発者グループは、CI / CDとの共同開発の本格的なシステムに成長しました。グループは金持ちではないため、共同開発システムのインストール時に、2GBのRAMを自由に使用できる弱いデュアルコアサーバーがありました。このため、選択はゴグ+ドローンの束に落ちました。Goで書かれた小さなもの、実質的にプログラムの特別な「機能」はありません。しかし、次にコードを挿入した直後に、アセンブリをチェックして、正しく機能するかどうかをテストすることが可能になりました。
これは、「戦闘」モードで使用されているドローン0.8の現在のバージョンがどのように見えるかです。
更新
, , , 2021 . Gitea Drone . Gogs Gitea , . Drone 0.8 1.x , , , . , , — . Gitea + Drone 1.10 Drone 2.0 (13 2021 ), .
Drone 2.0
Drone CI . -, Drone CI Harness CI, :
, ( ). , : , , — ? , , Drone UI .
, , CSS . , , . , , , CSS Drone UI. , Drone GitHub Drone UI. , (.drone.yml) Drone UI. Drone UI . , , . — , :
go get -v -insecure xxx.com/xxx/drone-ui
sed -i '' 's/github.com\/drone\/drone-ui/xxx.com\/xxx\/drone-ui/' ./handler/web/{logout,pages,web}.go
( ), Drone Drone UI . - , , Node.js, . .
, , . drone : (clone), Go (test), drone-server (build) Docker- (publish). — .drone.yml, drone:
---
kind: pipeline
type: docker
name: linux-amd64
platform:
arch: amd64
os: linux
steps:
- name: test
image: golang:1.14.4
commands:
- go test ./...
- name: build
image: golang:1.14.4
commands:
- sh scripts/build.sh
environment:
GOARCH: amd64
GOOS: linux
- name: publish
image: plugins/docker:18
settings:
auto_tag: true
auto_tag_suffix: linux-amd64
dockerfile: docker/Dockerfile.server.linux.amd64
repo: drone/drone
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
- tag
, , , Drone UI.
. drone:
- name: clone
image: drone/git
commands:
- export DRONE_TAG=v2.0.0
- export DRONE_COMMIT_REF=refs/tags/$DRONE_TAG
- export DRONE_REMOTE_URL=https://github.com/drone/drone.git
- clone
- name: clone drone-ui
image: drone/git
commands:
- export DRONE_COMMIT_BRANCH=drone2
- export DRONE_COMMIT_REF=refs/heads/$DRONE_COMMIT_BRANCH
- export DRONE_COMMIT_SHA=d96f1e26d4482663535cfc913f650956c914f27f
- export DRONE_REMOTE_URL=https://github.com/drone/drone-ui.git
- export DRONE_WORKSPACE=$DRONE_WORKSPACE_BASE/web
- clone
. , , drone/git.
- name: clone patch
image: drone/git
commands:
- export DRONE_WORKSPACE=$DRONE_WORKSPACE_BASE/patch
- mkdir -p $DRONE_WORKSPACE
- clone
. , Drone, , $DRONE_WORKSPACE_BASE
drone, patch
. , , :
clone:
disable: true
drone-ui - CSS .
- name: patch drone-ui
image: node:15.14.0
commands:
- cd $DRONE_WORKSPACE_BASE/web
- patch -p1 < ../patch/drone-ui-2.0-customize.patch
, web drone-ui, () drone-server.
— drone-ui:
- name: build drone-ui
image: node:15.14.0
commands:
- cd $DRONE_WORKSPACE_BASE/web
- npm install
- npm run build
environment:
CI: false
Node.js, drone-ui . , CI
false
, (warnings) .
drone-ui — . dist_gen.go
, drone. :
- name: generate drone-ui
image: golang:1.14.4
commands:
- cd $DRONE_WORKSPACE_BASE/web
- go get github.com/bradrydzewski/togo
- rm -vf dist/dist_gen.go
- go generate ./dist
. togo, dist_gen.go
:
go get github.com/bradrydzewski/togo
, , dist_gen.go
:
go generate ./dist
( ) . , , :
rm -vf dist/dist_gen.go
- name: replace drone-ui
image: golang:1.14.4
commands:
- cd $DRONE_WORKSPACE_BASE/web
- go mod init github.com/drone/drone-ui
- cd $DRONE_WORKSPACE_BASE
- go mod edit -replace=github.com/drone/drone-ui=./web
github.com/drone/drone-ui web:
go mod init github.com/drone/drone-ui
.
, , drone-ui , web:
go mod edit -replace=github.com/drone/drone-ui=./web
, . — ./web
. ./
, web.
- name: test
image: golang:1.14.4
commands:
- export GOPATH=$DRONE_WORKSPACE_BASE/go
- go test ./...
- name: build
image: golang:1.14.4
commands:
- export GOPATH=$DRONE_WORKSPACE_BASE/go
- sh scripts/build.sh
- strip -s -R .comment release/linux/$GOARCH/drone-server
environment:
GOARCH: amd64
GOOS: linux
—
export GOPATH=$DRONE_WORKSPACE_BASE/go
— , . , DRONE_WORKSPACE_BASE
/drone/src
, Drone CI.
,
strip -s -R .comment release/linux/$GOARCH/drone-server
, .
- name: publish
image: plugins/docker:18
settings:
tags: [ latest, "2", "2.0", "2.0.0" ]
dockerfile: docker/Dockerfile.server.linux.amd64
repo: drone/drone-server-customized
username:
from_secret: docker_username
password:
from_secret: docker_password
dry_run: true
when:
repo:
- tkushnir/drone-server-customized
branch:
- main
event:
exclude:
- pull_request
Drone 2.0 :
Gitea Drone .
, , Drone. , - . , , , Vue Node.js .
ドローン 0.8からドローン 1.10、さらにドローン 2.0へのアップグレード中に、バージョン0.8で作成され、通常は標準ユーティリティによってバージョン1.10に転送されたアセンブリの古いステップが表示されなくなることがわかりました。この問題は非常に簡単に解決されました。ドローン 0.8からドローン 2.0への移行手順を説明する場合は、この経験も共有します。
GogsからGiteaの最新バージョンへの移行で発生した問題(およびその解決策)を共有することも理にかなっているかもしれません。当初、この移行は非常に簡単であると考えられていましたが、ここにもいくつかの落とし穴があることが判明しました。