-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from matsubara0507/develop
version 0.2.0
- Loading branch information
Showing
33 changed files
with
1,121 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ PORT= | |
WORK= | ||
CONFIG= | ||
DRONE_HOST= | ||
DRONE_PORT= | ||
DRONE_TOKEN= | ||
GH_TOKEN= | ||
GH_SECRET= | ||
APP_SERVER= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
sudo: required | ||
services: | ||
- docker | ||
language: elm | ||
cache: | ||
timeout: 360 | ||
directories: | ||
- "$HOME/.stack/" | ||
- "$HOME/.local/bin/" | ||
- ".stack-work/" | ||
install: | ||
- mkdir -p ~/.local/bin | ||
- export PATH=$HOME/.local/bin:$PATH | ||
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' | ||
- stack docker pull | ||
jobs: | ||
include: | ||
- stage: build dependencies | ||
script: stack --no-terminal --install-ghc test --bench --only-dependencies | ||
- stage: run test | ||
script: stack --no-terminal test --bench --no-run-benchmarks --no-haddock-deps --pedantic | ||
- stage: push docker image | ||
if: branch = master AND type = push | ||
script: | ||
- stack test | ||
- stack --docker --no-terminal build -j 1 Cabal | ||
- stack --docker image container | ||
- docker build -t matsubara0507/git-plantation . | ||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
- docker push matsubara0507/git-plantation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,60 @@ | ||
# Changelog for git-plantation | ||
|
||
## Unreleased changes | ||
|
||
## v0.2.0 | ||
|
||
* org アカウント以外で config 設定 (#10) | ||
* dotenv ファイルが使えるようになる (#10) | ||
* `/score` エンドポイントで drone から取得できなくても空リストを返す (#10) | ||
* `fail` の代わりに例外処理を追加 (#11) | ||
* JSON 形式のログを追加(#11) | ||
* 回答リポジトリの生成の各ステップコマンドを追加(#13) | ||
* GitHub に空リポジトリを作成 | ||
* リポジトリを初期化(問題リポジトリを参照して) | ||
* 回答のためCIを問題リポジトリに設定 | ||
* メンバーを回答リポジトリに招待する(#13) | ||
* 回答リポジトリのリセット(#13) | ||
* コマンドの追加と変更(#14) | ||
* `verify` : 設定ファイルの検査 | ||
* `delete_repo` : 回答リポジトリとCIの設定の削除 | ||
* private リポジトリを生成できるように変更 | ||
* org アカウント以外でもちゃんと動作するように修正 | ||
* 設定周りの更新(#14) | ||
* `Problem` と 回答リポジトリの対応関係を `id` にした | ||
* `provate` 設定の追加 | ||
* `org` と `owner` を明示的に指定するように変更 | ||
* 解答リポジトリの生成時に GitHub Webhook の設定をする(#15) | ||
* GitHub Webhook の設定をするコマンドを追加(#15) | ||
* Webhook API の修正(#15) | ||
* 問題の検索周りの処理が間違っていた | ||
* Docker イメージの修正(#15) | ||
* `static` ディレクトリの追加 | ||
* git コマンドの設定を追加 | ||
* `.env` ファイルがなくても動作するように修正(#15) | ||
* app の base image を変更(#16) | ||
* `invite_member` コマンドの修正(#17) | ||
* 変数の指定間違い | ||
* 失敗時にエラーを返すように(`github` パッケージから修正) | ||
* `setup_webhook` コマンドの GitHub Webhook の設定の仕方を修正(#17) | ||
* `APP_HOST` や `APP_PORT` を `APP_SERVER` 環境変数に変更して URL を修正 | ||
* Secret を追加 (`GH_SECRET`) | ||
* 各コマンドで `git checkout` の前に `git pull` をするように修正(#17) | ||
* リポジトリ系のコマンドの `--repo` 引数を `problem.id` に変更(#17) | ||
* work space をチームごとに区切るように修正(#17) | ||
* 別々のチームから同じ問題に対し同時にプッシュが来ても問題ないようになった | ||
* 同じチームから同じ問題で別々のブランチなどに対し同時にプッシュが来たらおそらくまずい | ||
* webhook の時に `ci` ブランチにプッシュするのを `answer_branch` だけに限定(#17) | ||
* これで「同じチームから同じ問題で別々のブランチなどに対し同時にプッシュ」も平気 | ||
* 一つのブランチでしか動作しないので | ||
* スコアボードに「採点中」を追加(#19) | ||
* `invite_member` コマンドを修正(#20) | ||
* 201 が返ってくる(`github` 側から修正) | ||
* リポジトリ系コマンドの修正・変更(#20) | ||
* work directory の cd 先が間違っていたのを修正 | ||
* `--repos` で複数問題を指定できるように変更 | ||
* スコアボードのスコアの総和の仕方が間違っていたのを修正(#20) | ||
* スコアボードで回答リポジトリに飛べるようにした(#20) | ||
* `new_repo` コマンドで任意の処理をスキップできるように変更(#21) | ||
* スコアボードの更新間隔を設定ファイルから指定できるように変更(#21) | ||
* 参加者をリポジトリからキックするコマンドを追加(#24) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
FROM git-plantation-bin | ||
RUN apt-get update && apt-get install -y \ | ||
ca-certificates \ | ||
git \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /work | ||
COPY script /usr/local/bin/ | ||
COPY static /work/static | ||
|
||
CMD ["run-app.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,56 @@ | ||
scoreboard: | ||
interval: 60000 | ||
|
||
problems: | ||
- problem_name: tutorial | ||
repo_name: matsubara0507/git-challenge-tutorial | ||
- id: 1 | ||
name: tutorial | ||
repo: matsubara0507/git-challenge-tutorial | ||
difficulty: 1 | ||
challenge_branches: | ||
- readme | ||
- master | ||
- task-1 | ||
- task-2 | ||
answer_branch: master | ||
ci_branch: ci | ||
|
||
- problem_name: is-order-an-adding | ||
repo_name: matsubara0507/git-challenge-is-order-an-adding | ||
- id: 2 | ||
name: is-order-an-adding | ||
repo: matsubara0507/git-challenge-is-order-an-adding | ||
difficulty: 1 | ||
challenge_branches: | ||
- readme | ||
- master | ||
answer_branch: master | ||
ci_branch: ci | ||
|
||
- problem_name: minesweeper | ||
repo_name: matsubara0507/git-challenge-minesweeper | ||
- id: 3 | ||
name: minesweeper | ||
repo: matsubara0507/git-challenge-minesweeper | ||
difficulty: 1 | ||
challenge_branches: | ||
- readme | ||
- master | ||
- checker | ||
answer_branch: master | ||
ci_branch: ci | ||
|
||
teams: | ||
- name: sample | ||
github: sample-hige | ||
id: alpha | ||
member: | ||
- matsubara0507 | ||
- name: MATSUBARA Nobutada | ||
github: matsubara0507 | ||
repos: | ||
- name: git-challenge-tutorial | ||
org: sample-hige | ||
problem: 1 | ||
private: false | ||
- name: git-challenge-is-order-an-adding | ||
org: sample-hige | ||
problem: 2 | ||
private: false | ||
- name: git-challenge-minesweeper | ||
org: sample-hige | ||
problem: 3 | ||
private: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ DRONE_HOST= | |
DRONE_GITHUB_CLIENT= | ||
DRONE_GITHUB_SECRET= | ||
DRONE_SECRET= | ||
HOSTNAME= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
version: '2' | ||
|
||
services: | ||
drone-server: | ||
image: drone/drone:0.8 | ||
|
||
drone: | ||
image: drone/drone:1 | ||
ports: | ||
- 8000:8000 | ||
- 9000 | ||
- 8000:80 | ||
- 443:443 | ||
volumes: | ||
- .:/var/lib/drone/ | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- .:/data | ||
restart: always | ||
environment: | ||
- DRONE_OPEN=true | ||
- DRONE_HOST=${DRONE_HOST} | ||
- DRONE_GITHUB=true | ||
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} | ||
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} | ||
- DRONE_SECRET=${DRONE_SECRET} | ||
|
||
drone-agent: | ||
image: drone/agent:0.8 | ||
- DRONE_GITHUB_SERVER=https://github.com | ||
- DRONE_GITHUB_CLIENT_ID=${DRONE_GITHUB_CLIENT} | ||
- DRONE_GITHUB_CLIENT_SECRET=${DRONE_GITHUB_SECRET} | ||
- DRONE_AGENTS_ENABLED=true | ||
- DRONE_RPC_SECRET=${DRONE_SECRET} | ||
- DRONE_SERVER_HOST=${DRONE_HOST} | ||
- DRONE_SERVER_PROTO=https | ||
- DRONE_TLS_AUTOCERT=true | ||
|
||
command: agent | ||
agent: | ||
image: drone/agent:1 | ||
restart: always | ||
depends_on: | ||
- drone-server | ||
- drone | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
environment: | ||
- DRONE_SERVER=drone-server:9000 | ||
- DRONE_SECRET=${DRONE_SECRET} | ||
- DRONE_RPC_SERVER=http://drone | ||
- DRONE_RPC_SECRET=${DRONE_SECRET} | ||
- DRONE_RUNNER_CAPACITY=2 | ||
- DRONE_RUNNER_NAME=${HOSTNAME} |
Oops, something went wrong.