From da11bed3b30143cfe54d278ad58ae0d7b319be7d Mon Sep 17 00:00:00 2001 From: Fernando Freire Date: Tue, 12 Jan 2021 13:50:48 -0800 Subject: [PATCH] chore(cleanup): remove unused files & update readme (#127) --- .gitignore | 1 + LICENSE | 2 +- README.md | 39 +++++++++++++++++++++++---------------- diagrams/workflow.mmd | 25 ------------------------- diagrams/workflow.mmd.svg | 4 ---- dinghy_test.go | 25 ------------------------- dinghy_version | 1 - dinghyfile | 39 --------------------------------------- package.json | 5 ----- 9 files changed, 25 insertions(+), 116 deletions(-) delete mode 100644 diagrams/workflow.mmd delete mode 100644 diagrams/workflow.mmd.svg delete mode 100644 dinghy_test.go delete mode 100644 dinghy_version delete mode 100644 dinghyfile delete mode 100644 package.json diff --git a/.gitignore b/.gitignore index 6efeba59..48e8b9a5 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ tags .vim # End of https://www.gitignore.io/api/vim +dinghy diff --git a/LICENSE b/LICENSE index 261eeb9e..f72c756d 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2021 Armory, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index d04adcba..1a1f1745 100644 --- a/README.md +++ b/README.md @@ -2,32 +2,39 @@ # dinghy -_A little boat to take you to the big boat_ - Miker +Dinghy allows you to create and maintain Spinnaker pipeline templates in source +control. -## Yo, but what do it do? +Read more in our +[documentation](https://docs.armory.io/docs/armory-admin/dinghy-enable/). -Users should be able to specify a pipeline in code in their GitHub repo. Dinghy should keep the pipeline in Spinnaker in sync with what is in the GitHub repo. Also, users should be able to make a pipeline by composing other pipelines, stages, or tasks and templating certain values. - -### Deets +### How It Works There are two primitives: -- Stage/Task templates: These are all kept in a single GitHub repo. They are json files with replacable values in them. -- Pipeline definitions: These define a pipeline for an application. You can compose stage/task templates to make a full definition. +- Stage/Task templates: These are all kept in a single GitHub repo. They are + json files with replacable values in them. +- Pipeline definitions: These define a pipeline for an application. You can + compose stage/task templates to make a full definition. How it works: -- GitHub webhooks are sent off when either the templates or the definitions are modified. +- GitHub webhooks are sent off when either the templates or the definitions are + modified. - Templates should be versioned by hash when they are used. -- Dinghy will keep a dependency graph of downstream templates. When a dependency is modified, the pipeline definition will be rebuilt and re-posted to Spinnaker. (sound familiar? haha) - - -![](diagrams/workflow.mmd.svg) +- Dinghy will keep a dependency graph of downstream templates. When a + dependency is modified, the pipeline definition will be rebuilt and re-posted + to Spinnaker. (sound familiar? haha) -### Testing manually. +### Testing Manually -curl -X POST -H "Content-Type: application/json" -d "@example/github_payload.json" http://localhost:8089/webhooks/git/github +```shell +curl -X POST \ + -H "Content-Type: application/json" \ + -d "@example/github_payload.json" \ + http://localhost:8089/webhooks/git/github +``` (The github_payload.json file in the example directory is a minimal set for testing the git webhook, as an example) - - +Dinghy is also embedded in the [arm cli](https://github.com/armory-io/arm) tool +for local validation of pipelines. diff --git a/diagrams/workflow.mmd b/diagrams/workflow.mmd deleted file mode 100644 index c99d4da8..00000000 --- a/diagrams/workflow.mmd +++ /dev/null @@ -1,25 +0,0 @@ -sequenceDiagram - - Engineer->>Github: Make PR for dinghyfile to App Repo - Engineer->>Github: Merge PR to master - Github ->>gate: Send a "merged to master" webhook - gate ->> echo: Send event to event bus - echo ->> dinghy: Forward event to dinghy - dinghy ->> Github: Fetch's dinghyfile contents - dinghy ->> redis: Fetches dependancy graph - dinghy ->> dinghy: Creates Pipeline - dinghy->> Front50: Save the pipeline - - Engineer->>Github: Make PR for moduleX to Modules Repo - Engineer->>Github: Merge PR to master - Github ->>gate: Send a "merged to master" webhook - gate ->> echo: Send event to event bus - echo ->> dinghy: Forward event to dinghy - dinghy ->> Github: Fetch's moduleX's contents - dinghy ->> redis: Fetches dependancy graph - dinghy ->> dinghy: Creates pipeline1 - dinghy->> Front50: Save the pipeline1 - dinghy ->> dinghy: Creates pipeline2 - dinghy->> Front50: Save the pipeline2 - dinghy ->> dinghy: Creates pipeline3 - dinghy->> Front50: Save the pipeline3 diff --git a/diagrams/workflow.mmd.svg b/diagrams/workflow.mmd.svg deleted file mode 100644 index 6a000bf8..00000000 --- a/diagrams/workflow.mmd.svg +++ /dev/null @@ -1,4 +0,0 @@ -EngineerGithubgateechodinghyredisFront50Make PR for dinghyfile to App RepoMerge PR to masterSend a "merged to master" webhookSend event to event busForward event to dinghyFetch's dinghyfile contentsFetches dependancy graphCreates PipelineSave the pipelineMake PR for moduleX to Modules RepoMerge PR to masterSend a "merged to master" webhookSend event to event busForward event to dinghyFetch's moduleX's contentsFetches dependancy graphCreates pipeline1Save the pipeline1Creates pipeline2Save the pipeline2Creates pipeline3Save the pipeline3EngineerGithubgateechodinghyredisFront50 \ No newline at end of file diff --git a/dinghy_test.go b/dinghy_test.go deleted file mode 100644 index 31e3f5f2..00000000 --- a/dinghy_test.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* Copyright 2019 Armory, Inc. - -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at - -* http://www.apache.org/licenses/LICENSE-2.0 - -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ - -package main - -import ( - "testing" -) - -func TestMain(t *testing.T) { - // Stub -} diff --git a/dinghy_version b/dinghy_version deleted file mode 100644 index bcab45af..00000000 --- a/dinghy_version +++ /dev/null @@ -1 +0,0 @@ -0.0.3 diff --git a/dinghyfile b/dinghyfile deleted file mode 100644 index 912662f8..00000000 --- a/dinghyfile +++ /dev/null @@ -1,39 +0,0 @@ -{ - "application": "dinghy", - "pipelines": [ - { - "application": "dinghy", - "index": 2, - "keepWaitingPipelines": false, - "limitConcurrent": true, - "name": "Simple", - "stages": [ - { - "name": "Wait", - "refId": "1", - "requisiteStageRefIds": [], - "type": "wait", - "waitTime": 60 - } - ], - "triggers": [] - }, - { - "application": "dinghy", - "index": 3, - "keepWaitingPipelines": false, - "limitConcurrent": true, - "name": "Made By Dinghy", - "stages": [ - { - "name": "Wait", - "refId": "1", - "requisiteStageRefIds": [], - "type": "wait", - "waitTime": 60 - } - ], - "triggers": [] - } - ] -} diff --git a/package.json b/package.json deleted file mode 100644 index 887dde6a..00000000 --- a/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "dependencies": { - "mermaid.cli": "^0.5.1" - } -}