Loading templates/validation.yml +18 −2 Original line number Diff line number Diff line variables: YAJSV_IMAGE: "registry.hub.docker.com/amux/yajsv:latest" YAJSV_IMAGE: "registry.hub.docker.com/badouralix/curl-jq:latest" YAJSV_RELEASE: "https://github.com/neilpa/yajsv/releases/download/v1.4.1/yajsv.linux.amd64" .kicker-scripts: &kicker-scripts | set -e Loading Loading @@ -29,6 +30,16 @@ variables: fi } function install_yajsv() { export PATH=$PATH:$(pwd) if ! command -v yajsv > /dev/null then log_info "Installing yajsv" curl -sSL -o ./yajsv "${YAJSV_RELEASE}" chmod +x ./yajsv fi } # Abstract JSON schema validation job # $JSON_FILE : the JSON file to test # $SCHEMA_URL : the schema url Loading @@ -38,9 +49,14 @@ variables: before_script: - !reference [.kicker-scripts] - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - install_yajsv script: - 'wget --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "$SCHEMA_URL" -O schema.json' - 'curl -sSL -o schema.json -H "PRIVATE-TOKEN: $GITLAB_TOKEN" "$SCHEMA_URL"' - yajsv -s schema.json "$JSON_FILE" cache: key: "$CI_COMMIT_REF_NAME-yajsv" paths: - ./yajsv rules: # enabled if kicker.json file found - exists: Loading Loading
templates/validation.yml +18 −2 Original line number Diff line number Diff line variables: YAJSV_IMAGE: "registry.hub.docker.com/amux/yajsv:latest" YAJSV_IMAGE: "registry.hub.docker.com/badouralix/curl-jq:latest" YAJSV_RELEASE: "https://github.com/neilpa/yajsv/releases/download/v1.4.1/yajsv.linux.amd64" .kicker-scripts: &kicker-scripts | set -e Loading Loading @@ -29,6 +30,16 @@ variables: fi } function install_yajsv() { export PATH=$PATH:$(pwd) if ! command -v yajsv > /dev/null then log_info "Installing yajsv" curl -sSL -o ./yajsv "${YAJSV_RELEASE}" chmod +x ./yajsv fi } # Abstract JSON schema validation job # $JSON_FILE : the JSON file to test # $SCHEMA_URL : the schema url Loading @@ -38,9 +49,14 @@ variables: before_script: - !reference [.kicker-scripts] - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}" - install_yajsv script: - 'wget --header "PRIVATE-TOKEN: $GITLAB_TOKEN" "$SCHEMA_URL" -O schema.json' - 'curl -sSL -o schema.json -H "PRIVATE-TOKEN: $GITLAB_TOKEN" "$SCHEMA_URL"' - yajsv -s schema.json "$JSON_FILE" cache: key: "$CI_COMMIT_REF_NAME-yajsv" paths: - ./yajsv rules: # enabled if kicker.json file found - exists: Loading