Skip to content

Bitbucket integration error "unable to fetch diff" #48

@christopher502

Description

@christopher502

Considered this ansible file which deploys the Drone Server and the drone-tree-config

- name: Deploy Drone Server and Runner
  hosts: all
  tasks:
    - name: Ensure Docker network is present
      community.docker.docker_network:
        name: drone-network
        state: present

    - name: Start Drone Server container
      community.docker.docker_container:
        name: drone-server
        image: drone/drone
        state: started
        recreate: yes
        pull: true
        restart_policy: unless-stopped
        env:
          DRONE_OPEN: "true"
          DRONE_BITBUCKET_CLIENT_ID: ""
          DRONE_BITBUCKET_CLIENT_SECRET: ""
          DRONE_RPC_SECRET: ""
          DRONE_SERVER_HOST: ""
          DRONE_SERVER_PROTO: http
          DRONE_USER_CREATE: ""
          DRONE_YAML_ENDPOINT: http://drone-tree-config:3000
          DRONE_YAML_SECRET: ""
        ports:
          - "8080:80"
        networks:
          - name: drone-network

    - name: Start Drone Tree Config Plugin
      community.docker.docker_container:
        name: drone-tree-config
        image: bitsbeats/drone-tree-config
        state: started
        recreate: yes
        env:
          BITBUCKET_AUTH_SERVER: https://bitbucket.org
          SERVER: https://api.bitbucket.org
          PLUGIN_DEBUG: "true"
          PLUGIN_SECRET: 5d60e74712626ef453c08c74c555b898
          BITBUCKET_CLIENT: ""
          BITBUCKET_SECRET: ""
        networks:
          - name: drone-network

BITBUCKET_CLIENT and BITBUCKET_SECRET is the same as DRONE_BITBUCKET_CLIENT_ID and DRONE_BITBUCKET_CLIENT_SECRET.

With this basic configuration, it should pick the first .drone.yml located in the root path of the repository. However, with this simple config, I am still encountering the following problem:

time="2024-07-17T14:53:27Z" level=info msg="7f84858b-3721-4636-8ec0-5edc42154ee5 playground-ws/flusk-auth-app started"
time="2024-07-17T14:53:27Z" level=info msg="7f84858b-3721-4636-8ec0-5edc42154ee5 Authenticated with BitBucket: 'https://bitbucket.org'"
time="2024-07-17T14:53:27Z" level=info msg="7f84858b-3721-4636-8ec0-5edc42154ee5 Created BitBucket API client: 'https://api.bitbucket.org'"
time="2024-07-17T14:53:27Z" level=info msg="7f84858b-3721-4636-8ec0-5edc42154ee5 allowlisted for: playground-ws/flusk-auth-app"
time="2024-07-17T14:53:27Z" level=debug msg="drone-tree-config environment" after=4440c37a23804c9577c63857fa8e672da161c9a9 before=ffc2af5c5c27d85110ccdc2cdcd63060b20a1168 branch=main ref=refs/heads/main slug=playground-ws/flusk-auth-app trigger=@hook
time="2024-07-17T14:53:28Z" level=error msg="7f84858b-3721-4636-8ec0-5edc42154ee5 unable to fetch diff: 'Get \"https://api.bitbucket.org/2.0/repositories/playground-ws/flusk-auth-app/diffstat/ffc2af5c5c27d85110ccdc2cdcd63060b20a1168..4440c37a23804c9577c63857fa8e672da161c9a9\": unexpected EOF'"
time="2024-07-17T14:53:28Z" level=info msg="7f84858b-3721-4636-8ec0-5edc42154ee5 finished"
time="2024-07-17T14:53:28Z" level=debug msg="config: cannot find configuration: playground-ws/flusk-auth-app: main: Get \"https://api.bitbucket.org/2.0/repositories/playground-ws/flusk-auth-app/diffstat/ffc2af5c5c27d85110ccdc2cdcd63060b20a1168..4440c37a23804c9577c63857fa8e672da161c9a9\": unexpected EOF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions