<commit_before>workspace:
  base: /drone
  path: src/github.com/goharbor/harbor

clone:
  git:
    image: plugins/git
    tags: true
    recursive: false

pipeline:
  check-org-membership:
    image: 'wdc-harbor-ci.eng.vmware.com/default-project/vic-integration-test:1.44'
    pull: true
    environment:
      BIN: bin
      GOPATH: /go
      SHELL: /bin/bash
    secrets:
      - github_automation_api_key
      - skip_check_membership
    commands:
      - echo ${DRONE_COMMIT_AUTHOR}
      - echo $SKIP_CHECK_MEMBERSHIP
      - if [ "$SKIP_CHECK_MEMBERSHIP" = "true" ]; then echo 'check-org-membership step skipped'; else /bin/bash -c '[[ ! $(curl --silent "https://api.github.com/orgs/vmware/members/${DRONE_COMMIT_AUTHOR}?access_token=$GITHUB_AUTOMATION_API_KEY") ]]'; fi
    when:
      status: success

  test-and-issue-build:
    image: vmware/harbor-e2e-engine:1.41
    pull: true
    privileged: true
    environment:
      BIN: bin
      GOPATH: /drone
      SHELL: /bin/bash
      TERM: xterm
      LOG_TEMP_DIR: install-logs
    secrets:
      - ci_domain
      - drone_server
      - drone_token
      - drone_token_inte
      - github_automation_api_key
      - gs_client_email
      - gs_private_key
      - gs_project_id
      - harbor_admin
      - harbor_password
      - <PASSWORD>_pwd
      - <PASSWORD>_password
      - npm_username
      - docker_hub_username
      - docker_hub_password
    commands:
      - export DOMAIN=${CI_DOMAIN}
      - export HOST_CONTAINER_ID=$(hostname)
      - echo $HOST_CONTAINER_ID
      - tests/integration.sh
    when:
      status: success

  notify-slack:
    image: plugins/slack
    secrets:
      - source: slack_url
        target: slack_webhook
    username: drone
    template: >
      build https://ci-vic.vmware.com/goharbor/harbor/{{ build.number }} finished with a {{ build.status }} status. Please find logs at https://storage.googleapis.com/harbor-ci-logs/integration_logs_{{ build.number }}_{{ build.commit }}.tar.gz
    when:
      repo: goharbor/harbor
      event: [push, tag, deployment]
      branch: [ master, release-*, refs/tags/* ]
      status: [ failure, success ]<commit_msg>add npm registry into drone yml<commit_after>workspace:
  base: /drone
  path: src/github.com/goharbor/harbor

clone:
  git:
    image: plugins/git
    tags: true
    recursive: false

pipeline:
  check-org-membership:
    image: 'wdc-harbor-ci.eng.vmware.com/default-project/vic-integration-test:1.44'
    pull: true
    environment:
      BIN: bin
      GOPATH: /go
      SHELL: /bin/bash
    secrets:
      - github_automation_api_key
      - skip_check_membership
    commands:
      - echo ${DRONE_COMMIT_AUTHOR}
      - echo $SKIP_CHECK_MEMBERSHIP
      - if [ "$SKIP_CHECK_MEMBERSHIP" = "true" ]; then echo 'check-org-membership step skipped'; else /bin/bash -c '[[ ! $(curl --silent "https://api.github.com/orgs/vmware/members/${DRONE_COMMIT_AUTHOR}?access_token=$GITHUB_AUTOMATION_API_KEY") ]]'; fi
    when:
      status: success

  test-and-issue-build:
    image: vmware/harbor-e2e-engine:1.41
    pull: true
    privileged: true
    environment:
      BIN: bin
      GOPATH: /drone
      SHELL: /bin/bash
      TERM: xterm
      LOG_TEMP_DIR: install-logs
    secrets:
      - ci_domain
      - drone_server
      - drone_token
      - drone_token_inte
      - github_automation_api_key
      - gs_client_email
      - gs_private_key
      - gs_project_id
      - harbor_admin
      - harbor_password
      - mail_pwd
      - npm_password
      - npm_username
      - docker_hub_username
      - docker_hub_password
      - npm_registry
    commands:
      - export DOMAIN=${CI_DOMAIN}
      - export HOST_CONTAINER_ID=$(hostname)
      - echo $HOST_CONTAINER_ID
      - tests/integration.sh
    when:
      status: success

  notify-slack:
    image: plugins/slack
    secrets:
      - source: slack_url
        target: slack_webhook
    username: drone
    template: >
      build https://ci-vic.vmware.com/goharbor/harbor/{{ build.number }} finished with a {{ build.status }} status. Please find logs at https://storage.googleapis.com/harbor-ci-logs/integration_logs_{{ build.number }}_{{ build.commit }}.tar.gz
    when:
      repo: goharbor/harbor
      event: [push, tag, deployment]
      branch: [ master, release-*, refs/tags/* ]
      status: [ failure, success ]
{'fraction_non_alphanumeric': 0.10883571099861943, 'fraction_numerical': 0.0032213529682466636, 'mean_word_length': 2.414768263943441, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4498877', 'n_tokens_mistral': 1551, 'n_tokens_neox': 1492, 'n_words': 282}