CI: Add job ref when calling api docs builder
authorrinpatch <rinpatch@sdf.org>
Wed, 3 Feb 2021 14:02:01 +0000 (17:02 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 3 Feb 2021 14:02:06 +0000 (17:02 +0300)
Just grabbing the latest artifact for the branch does not work because
gitlab will only change the latest artifact when the whole pipeline
finishes

.gitlab-ci.yml

index 634c4b893a6720cb0fb197b9f4f3f6b9edc74661..ed145df529f3a5695351587448c59a6aeb68b8ba 100644 (file)
@@ -165,13 +165,16 @@ review_app:
 
 spec-deploy:
   stage: deploy
+  artifacts:
+    paths:
+    - spec.json
   only:
     - develop@pleroma/pleroma
   image: alpine:latest
   before_script:
     - apk add curl
   script:
-    - curl -X POST -F"token=$API_DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" https://git.pleroma.social/api/v4/projects/1130/trigger/pipeline
+    - curl -X POST -F"token=$API_DOCS_PIPELINE_TRIGGER" -F'ref=master' -F"variables[BRANCH]=$CI_COMMIT_REF_NAME" -F"variables[JOB_REF]=CI_JOB_ID" https://git.pleroma.social/api/v4/projects/1130/trigger/pipeline
   
  
 stop_review_app: