Commit 34cfe2be authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Removal of artifact from Resolve

parent 7cf76dea
Loading
Loading
Loading
Loading
+24 −5
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ variables:
  LOGFILE_YANG: "yang-validation.log"
  LOGFILE_LINT: "yang-linting.log"
  LOGFILE_OPENAPI: "openapi-validation.log"
  RESOLVE_ID: ""

stages:
  - resolve
@@ -36,10 +37,15 @@ Resolve:
    - git clone https://forge.3gpp.org/rep/reinaortega/3gpp-scripts.git scripts/
  after_script:
    - ls
    - echo "RESOLVE_ID=${CI_JOB_ID}" >> resolveId.env
    - RESOLVE_ID=${CI_JOB_ID}
    - echo ${RESOLVE_ID} #>> resolveId.env
  artifacts:
    paths:
      - scripts/
    expire_in: 5 mins #It should be deleted after last stage of this pipeline
    #expire_in: 5 min #It should be deleted after last stage of this pipeline
    reports:
       dotenv: resolveId.env
    
YANG Strict:
  stage: validation
@@ -48,6 +54,9 @@ YANG Strict:
  needs:
    - job: Resolve
      artifacts: true
  before_script:
    - |
     curl "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/files/sa5/validate-data-models.sh/raw?ref=master" >> validate-data-models-directly.sh
  script:
    - echo 'YANG Strict'
    - ./scripts/sa5/validate-data-models.sh .   
@@ -90,11 +99,21 @@ CR contribution:
  when: on_success
  only:
    - merge_requests
  dependencies:
    - Resolve
  needs:
    - job: Resolve
      artifacts: true
  script:
    - echo 'CR contribution'
    - ./scripts/sa5/generate_changemarks.sh ${CI_PROJECT_URL} ${CI_MERGE_REQUEST_PROJECT_ID} ${CI_MERGE_REQUEST_IID}  
  artifacts:
    paths:
      - ./*.docx
  after_script:
    - echo 'Removing Resolve artifact ...'
    - echo ${SA5_ACCESS_TOKEN}
    - echo ${CI_API_V4_URL}
    - echo ${CI_PROJECT_ID}
    - echo ${RESOLVE_ID}
    - |
     curl --request DELETE --header "PRIVATE-TOKEN : ${SA5_ACCESS_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${RESOLVE_ID}/artifacts"
    
 No newline at end of file