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) 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