Commit 8125cfa8 authored by Mathis Goichon's avatar Mathis Goichon
Browse files

feat: silent mode for node-outdated job

parent 937671d2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ variables:

  # Outdated
  NODE_OUTDATED_ARGS: "--long"
  NODE_OUTDATED_SILENT: "true"
  NODE_OUTDATED_JSON_PATH: "reports/npm-outdated-report.json"

  # default production ref name (pattern)
@@ -320,12 +321,14 @@ node-audit:
      allow_failure: true

# outdated
node-npm-outdated:
node-outdated:
  extends: .node-base
  stage: test
  script:
    - set +e
    - mkdir -p reports
    - npm outdated --json $NODE_OUTDATED_ARGS | tee $NODE_OUTDATED_JSON_PATH
    - npm outdated --json $NODE_OUTDATED_ARGS | tee $NODE_OUTDATED_JSON_PATH || EXIT_CODE=$?
    - if [[ $NODE_OUTDATED_SILENT == "true" ]] && [[ $EXIT_CODE == 1 ]]; then exit 0; fi
  artifacts:
    name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
    expire_in: 1 day