From d9d35a1270709a99f1e627096cdc26e470e00e0c Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 21:53:05 +0200 Subject: [PATCH 01/11] added testing branch --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8541e5e..48e9cd8 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# TESTING BRANCH!!!! + # Freifunk Meshviewer Unifi Access Points und Richtfunkstrecken import Dieses tool Importiert Nodes für die Freifunk Map aus den APIs UNMS (Richtfunk) & Unifi (Access Points) @@ -63,4 +65,4 @@ Es gibt 3 Module die Ein/Ausgeschatet werden können: * Unifi * Meshviewer -Die Funktion Meshviewer importiert die vorhandenen meshviewer.json und manipuliert dort die Userzahlen. Sobald ein Access Point einen Node aus einer Meshviwer.json als "gateway_nexthop" eingetragen hat, werden die Clients an dem verbundenen Access Point und nicht mehr am Offloader angezeigt. \ No newline at end of file +Die Funktion Meshviewer importiert die vorhandenen meshviewer.json und manipuliert dort die Userzahlen. Sobald ein Access Point einen Node aus einer Meshviwer.json als "gateway_nexthop" eingetragen hat, werden die Clients an dem verbundenen Access Point und nicht mehr am Offloader angezeigt. From 3f27d527e00c8a8583a4d9595e0829163dffb335 Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 28 Apr 2023 21:52:43 +0200 Subject: [PATCH 02/11] typo --- .drone.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index f46c5e3..4415abb 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -35,7 +35,7 @@ local pipeline(os, arch) = { image: "plugins/docker:" + os + "-" + arch, settings: { repo: "git.freifunk-rhein-sieg.net/freifunk-froisdorf/ubnt-freifunk-map-api", - registry: git.freifunk-rhein-sieg.net + registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, auto_tag: true, From 61ace83ebd5ddce01d73d58df96802086e4a34fe Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:09:25 +0200 Subject: [PATCH 03/11] testing more stuffz --- .drone.jsonnet | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 4415abb..2af11e3 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -34,7 +34,7 @@ local pipeline(os, arch) = { name: "upload to docker hub " + os + "/" + arch, image: "plugins/docker:" + os + "-" + arch, settings: { - repo: "git.freifunk-rhein-sieg.net/freifunk-froisdorf/ubnt-freifunk-map-api", + repo: "git.freifunk-rhein-sieg.net/api_user/ubnt-freifunk-map-api", registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, @@ -111,4 +111,4 @@ local validateJSON() = { pipeline("linux", "amd64"), // pipeline("linux", "arm64"), manifest() -] \ No newline at end of file +] From 7225bf5146dbd42b2f2244fef02a95ece055f620 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:22:55 +0200 Subject: [PATCH 04/11] changed repo name back --- .drone.jsonnet | 2 +- manifest.yml | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 2af11e3..59bebfd 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -34,7 +34,7 @@ local pipeline(os, arch) = { name: "upload to docker hub " + os + "/" + arch, image: "plugins/docker:" + os + "-" + arch, settings: { - repo: "git.freifunk-rhein-sieg.net/api_user/ubnt-freifunk-map-api", + repo: "git.freifunk-rhein-sieg.net/freifunk-troisdorf/ubnt-freifunk-map-api", registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, diff --git a/manifest.yml b/manifest.yml index 8923e25..50f22da 100644 --- a/manifest.yml +++ b/manifest.yml @@ -8,12 +8,7 @@ tags: {{/if}} manifests: - - image: git.freifunk-rhein-sieg.net/freifunk-froisdorf/ubnt-freifunk-map-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + image: git.freifunk-rhein-sieg.net/freifunk-troisdorf/ubnt-freifunk-map-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 platform: architecture: amd64 os: linux - # - - # image: fftdf/ffmap-ubnt-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 - # platform: - # architecture: arm64 - # os: linux \ No newline at end of file From c1554cbbc91cb6485fbda492b37d83182951f089 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:30:19 +0200 Subject: [PATCH 05/11] removed unnecessary pipeline arguments, removed manifest --- .drone.jsonnet | 65 ++------------------------------------------------ 1 file changed, 2 insertions(+), 63 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 59bebfd..00b4a73 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -31,8 +31,8 @@ local pipeline(os, arch) = { }, }, { - name: "upload to docker hub " + os + "/" + arch, - image: "plugins/docker:" + os + "-" + arch, + name: "upload to gitea container registry" + image: "plugins/docker:", settings: { repo: "git.freifunk-rhein-sieg.net/freifunk-troisdorf/ubnt-freifunk-map-api", registry: "git.freifunk-rhein-sieg.net", @@ -48,67 +48,6 @@ local pipeline(os, arch) = { ], }; -local manifest() = { - kind: "pipeline", - type: "docker", - name: "manifest", - depends_on: ["linux/amd64"], - when: { - event: "tag" - }, - - steps: [ - { - name: "publish", - image: "plugins/manifest", - settings: { - auto_tag: true, - ignore_missing: true, - spec: "manifest.yml", - username: { "from_secret": "docker_username" }, - password: { "from_secret": "docker_password" }, - }, - when: { - event: "tag" - }, - }, - ], -}; - -local validateJSON() = { - kind: "pipeline", - type: "docker", - name: "validate json", - when: { - event: "push" - }, - - steps: [ - { - name: "validate ucDevices", - image: "fftdf/docker-json-validate", - commands: [ - "jsonlint ucDevices.json" - ], - when: { - event: "push" - }, - }, - { - name: "validate Devices", - image: "fftdf/docker-json-validate", - commands: [ - "jsonlint devices.json", - ], - when: { - event: "push" - }, - }, - ], -}; - [ pipeline("linux", "amd64"), - // pipeline("linux", "arm64"), - manifest() ] From 3cf3cfc9065d6115285d19ee36bb427e4b13afc3 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:31:02 +0200 Subject: [PATCH 06/11] deleted unused file manifest --- manifest.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 manifest.yml diff --git a/manifest.yml b/manifest.yml deleted file mode 100644 index 50f22da..0000000 --- a/manifest.yml +++ /dev/null @@ -1,14 +0,0 @@ -image: fftdf/ffmap-ubnt-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} -{{#if build.tags}} -tags: - - "latest" -{{#each build.tags}} - - {{this}} -{{/each}} -{{/if}} -manifests: - - - image: git.freifunk-rhein-sieg.net/freifunk-troisdorf/ubnt-freifunk-map-api:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 - platform: - architecture: amd64 - os: linux From 26bad6c9a82d52ab284de87629ec9ca7d0388e6e Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:34:55 +0200 Subject: [PATCH 07/11] removed wrong comma --- .drone.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 00b4a73..9658e3a 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -49,5 +49,5 @@ local pipeline(os, arch) = { }; [ - pipeline("linux", "amd64"), + pipeline("linux", "amd64") ] From 968f3b3f57bd6ee6876f07e7c405619a0ef140c1 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:37:31 +0200 Subject: [PATCH 08/11] more foo --- .drone.jsonnet | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 9658e3a..8a7be34 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -31,15 +31,14 @@ local pipeline(os, arch) = { }, }, { - name: "upload to gitea container registry" - image: "plugins/docker:", + name: "upload to gitea container registry", + image: "plugins/docker:latest", settings: { repo: "git.freifunk-rhein-sieg.net/freifunk-troisdorf/ubnt-freifunk-map-api", registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, auto_tag: true, - auto_tag_suffix: os + "-" + arch }, when: { event: "tag" From 812c44e2fec7c596142165c6d43bc1204d983193 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:41:03 +0200 Subject: [PATCH 09/11] added tag latest --- .drone.jsonnet | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.jsonnet b/.drone.jsonnet index 8a7be34..bb0682b 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -38,6 +38,8 @@ local pipeline(os, arch) = { registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, + tags: + - latest auto_tag: true, }, when: { From 9cf5834e53930b72497e955b3efdf71bd6c59608 Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:45:07 +0200 Subject: [PATCH 10/11] syntax --- .drone.jsonnet | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index bb0682b..cc488fb 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -38,8 +38,7 @@ local pipeline(os, arch) = { registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, - tags: - - latest + tags: {"latest"}, auto_tag: true, }, when: { From 97097adf581903d918bc4aab0d5f58c54334b40e Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Fri, 28 Apr 2023 22:46:08 +0200 Subject: [PATCH 11/11] syntax guessing --- .drone.jsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index cc488fb..4683bca 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -38,7 +38,7 @@ local pipeline(os, arch) = { registry: "git.freifunk-rhein-sieg.net", username: { "from_secret": "docker_username" }, password: { "from_secret": "docker_password" }, - tags: {"latest"}, + tags: ["latest"], auto_tag: true, }, when: {