From 4a26297d16449212d834642e6b8930fe70ca7a1a Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 13:59:52 +0200 Subject: [PATCH 1/8] Add support for S3 deployment Signed-off-by: Jonas Franz --- .drone.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 2a21e3e..226e3c2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,7 +32,8 @@ pipeline: commands: - make release when: - event: [ tag ] + event: [ push, tag ] + branch: [ master ] gitea: image: plugins/gitea-release:latest pull: true @@ -54,3 +55,26 @@ pipeline: when: event: [ push, tag ] branch: [ master ] + s3: + image: plugins/s3 + secrets: [ aws_access_key_id, aws_secret_access_key ] + bucket: gitea-github-migrator + acl: public-read + source: release/* + target: /master + strip_prefix: release/ + endpoint: https://storage.h.jonasfranz.software + when: + event: [ push ] + branch: [ s3 ] + s3: + image: plugins/s3 + secrets: [ aws_access_key_id, aws_secret_access_key ] + bucket: gitea-github-migrator + acl: public-read + source: release/* + target: /${DRONE_TAG##v} + strip_prefix: release/ + endpoint: https://storage.h.jonasfranz.software + when: + event: [ tag ] \ No newline at end of file -- 2.36.2 From d7acc9841e24d6f7dc29f416452d3bbfd84dcf4e Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:01:11 +0200 Subject: [PATCH 2/8] Test if S3 works Signed-off-by: Jonas Franz --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 226e3c2..517cb34 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,7 +33,7 @@ pipeline: - make release when: event: [ push, tag ] - branch: [ master ] + branch: [ master, S3 ] gitea: image: plugins/gitea-release:latest pull: true @@ -66,7 +66,7 @@ pipeline: endpoint: https://storage.h.jonasfranz.software when: event: [ push ] - branch: [ s3 ] + branch: [ S3 ] s3: image: plugins/s3 secrets: [ aws_access_key_id, aws_secret_access_key ] -- 2.36.2 From 5a646e1145f8a16728c84c5e397745f4724366ad Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:11:07 +0200 Subject: [PATCH 3/8] Test S3 by using path_style Signed-off-by: Jonas Franz --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index 517cb34..3a39f56 100644 --- a/.drone.yml +++ b/.drone.yml @@ -59,6 +59,7 @@ pipeline: image: plugins/s3 secrets: [ aws_access_key_id, aws_secret_access_key ] bucket: gitea-github-migrator + path_style: true acl: public-read source: release/* target: /master @@ -71,6 +72,7 @@ pipeline: image: plugins/s3 secrets: [ aws_access_key_id, aws_secret_access_key ] bucket: gitea-github-migrator + path_style: true acl: public-read source: release/* target: /${DRONE_TAG##v} -- 2.36.2 From dc686e6910af0aefca06577b824a2326ebcb154c Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:15:59 +0200 Subject: [PATCH 4/8] Set version of s3 Signed-off-by: Jonas Franz --- .drone.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 3a39f56..8c515e0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -56,7 +56,8 @@ pipeline: event: [ push, tag ] branch: [ master ] s3: - image: plugins/s3 + image: plugins/s3:1 + pull: true secrets: [ aws_access_key_id, aws_secret_access_key ] bucket: gitea-github-migrator path_style: true @@ -69,7 +70,8 @@ pipeline: event: [ push ] branch: [ S3 ] s3: - image: plugins/s3 + image: plugins/s3:1 + pull: true secrets: [ aws_access_key_id, aws_secret_access_key ] bucket: gitea-github-migrator path_style: true -- 2.36.2 From a54f6261a0d38a78162985a5237c7fd6f149dde8 Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:29:21 +0200 Subject: [PATCH 5/8] Fix paths Signed-off-by: Jonas Franz --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8c515e0..73ecbfd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -62,9 +62,9 @@ pipeline: bucket: gitea-github-migrator path_style: true acl: public-read - source: release/* + source: releases/* target: /master - strip_prefix: release/ + strip_prefix: releases/ endpoint: https://storage.h.jonasfranz.software when: event: [ push ] @@ -76,9 +76,9 @@ pipeline: bucket: gitea-github-migrator path_style: true acl: public-read - source: release/* + source: releases/* target: /${DRONE_TAG##v} - strip_prefix: release/ + strip_prefix: releases/ endpoint: https://storage.h.jonasfranz.software when: event: [ tag ] \ No newline at end of file -- 2.36.2 From 7115bbb27678b43887accb0d182c8d90f0899210 Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:34:53 +0200 Subject: [PATCH 6/8] Go back to master branch Signed-off-by: Jonas Franz --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 73ecbfd..30d8880 100644 --- a/.drone.yml +++ b/.drone.yml @@ -33,7 +33,7 @@ pipeline: - make release when: event: [ push, tag ] - branch: [ master, S3 ] + branch: [ master ] gitea: image: plugins/gitea-release:latest pull: true @@ -68,7 +68,7 @@ pipeline: endpoint: https://storage.h.jonasfranz.software when: event: [ push ] - branch: [ S3 ] + branch: [ master ] s3: image: plugins/s3:1 pull: true -- 2.36.2 From 31da11156d1c29d14f4cad30c1a7c9a3c3a152e6 Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:36:48 +0200 Subject: [PATCH 7/8] Move releases to dist folder Signed-off-by: Jonas Franz --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 30d8880..ea0ae69 100644 --- a/.drone.yml +++ b/.drone.yml @@ -63,7 +63,7 @@ pipeline: path_style: true acl: public-read source: releases/* - target: /master + target: dist/master strip_prefix: releases/ endpoint: https://storage.h.jonasfranz.software when: @@ -77,7 +77,7 @@ pipeline: path_style: true acl: public-read source: releases/* - target: /${DRONE_TAG##v} + target: dist/${DRONE_TAG##v} strip_prefix: releases/ endpoint: https://storage.h.jonasfranz.software when: -- 2.36.2 From 4f336165f433f5a3918dd7f12b7034e78e8ab0fc Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Sun, 24 Jun 2018 14:46:25 +0200 Subject: [PATCH 8/8] Add README section about binary dist Signed-off-by: Jonas Franz --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f9b36a5..9e9ebae 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,13 @@ Migrates: - [x] Milestones - [x] Comments - [ ] Users -- [ ] Pull Requests +- [x] Pull Requests (as issue) - [ ] Statuses ## Installation +### From source + ```bash go get git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator cd $GOPATH/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator @@ -27,6 +29,12 @@ dep ensure go install ``` +### From Binary +We provide binaries of master builds and all releases at our [minio storage server](https://storage.h.jonasfranz.software/minio/gitea-github-migrator/dist/). + +Additionally we provide them for every release as release attachment under [releases](https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/releases). + +You don't need any dependencies except the binary to run the migrator. ## Usage Migrate one repository: -- 2.36.2