From 39ff95e741aa185419ee49e967a6f6e28720a36b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Anda=20Estensen?= Date: Thu, 17 Oct 2019 11:02:29 +0200 Subject: [PATCH 1/3] Only deploy changed pipelines --- deploy.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deploy.py b/deploy.py index 64ec11f..b47165f 100644 --- a/deploy.py +++ b/deploy.py @@ -11,11 +11,22 @@ exit("Empty deployment file") print("Deploying...") + changes = False for pipeline in pipeline_updates: data = pipeline_updates[pipeline] + + if pipeline in deployed_pipelines: + old_data = deployed_pipelines[pipeline] + if data == old_data: + continue + deployed_pipelines[pipeline] = data + changes = True print(f"{pipeline} deployed") # Or actually run a deployment script + if not changes: + print("Changes are already deployed") + production_file.truncate(0) # Remove content from file production_file.write(dump(deployed_pipelines)) deploy_file.truncate(0) From c9112074f91113335be335f5e04c485f11201c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Anda=20Estensen?= Date: Thu, 17 Oct 2019 11:02:48 +0200 Subject: [PATCH 2/3] Add pipeline --- pipeline.yaml | 3 +++ pipelines.yaml | 24 +++--------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/pipeline.yaml b/pipeline.yaml index e69de29..ba830a4 100644 --- a/pipeline.yaml +++ b/pipeline.yaml @@ -0,0 +1,3 @@ +pipeline: + description: such wow + image: huge image diff --git a/pipelines.yaml b/pipelines.yaml index e478c82..3e32585 100644 --- a/pipelines.yaml +++ b/pipelines.yaml @@ -1,33 +1,15 @@ auth: - description: hello world app - docker-image: estensen/hello + description: authentication + docker-image: estensen/auth auth-v2: - description: auth app + description: authentication docker-image: estensen/auth2 -auth-v3: - description: auth app - docker-image: estensen/auth3 -auth-v4: - description: auth app - docker-image: estensen/auth4 -auth-v5: - description: auth app - docker-image: estensen/auth5 -auth3: - description: auth - docker-image: estensen/auth-v4 -authr: - description: hello world app - docker-image: estensen/hello.py id: description: new id app docker-image: estensen/id login: description: login app docker-image: estensen/login -name: - description: new service - image: somewhere pipeline: description: such wow image: huge image From dd39dabc867dd94ecae2dbba507acfdaca85e422 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 17 Oct 2019 09:05:16 +0000 Subject: [PATCH 3/3] Add pipeline --- pipeline.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pipeline.yaml b/pipeline.yaml index ba830a4..e69de29 100644 --- a/pipeline.yaml +++ b/pipeline.yaml @@ -1,3 +0,0 @@ -pipeline: - description: such wow - image: huge image