From d45443058237257c69fdf1e6f1d388c0c1a4015f Mon Sep 17 00:00:00 2001
From: Bastien Abadie <bastien@nextcairn.com>
Date: Tue, 28 Jul 2020 14:55:06 +0200
Subject: [PATCH] Publish openapi schema on an S3 bucket

---
 .gitlab-ci.yml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7af4325579..ce4e002372 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -171,6 +171,23 @@ backend-static-deploy:
   script:
     - ci/static-deploy.sh
 
+backend-openapi-deploy:
+  stage: deploy
+
+  # Run on master updates only
+  only:
+   - master
+
+  # Ensure artifacts are available
+  dependencies:
+    - backend-openapi
+
+  before_script:
+    - pip install awscli
+
+  script:
+    - aws s3 cp output/schema.yml s3://teklia-assets-release/arkindex/openapi.yml
+
 sentry-release:
   image: getsentry/sentry-cli
   stage: deploy
-- 
GitLab