Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Trusted option is missing for the repository #795

Closed
4 tasks done
rajasekhar-gundala opened this issue Feb 25, 2022 · 8 comments · Fixed by #807
Closed
4 tasks done

Trusted option is missing for the repository #795

rajasekhar-gundala opened this issue Feb 25, 2022 · 8 comments · Fixed by #807
Labels
feedback this needs feedback ui frontend related ux user experience

Comments

@rajasekhar-gundala
Copy link

rajasekhar-gundala commented Feb 25, 2022

Component

server, web-ui

Describe the bug

The "Trusted" option is missing under Project settings for the repository. I can see only "Allow Pull Requests" and "Protected".

image

System Info

I am using Caddy Server in front of Woodpecker and Gitea.

Docker Compose

version: "3.7"

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:latest
    volumes:
      - /localvolume:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=https://woodpecker.example.com
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_CLIENT=client id
      - WOODPECKER_GITEA_SECRET=secret
      - WOODPECKER_GITEA_URL=https://gitea.example.com
      - WOODPECKER_AGENT_SECRET=agent secret
    networks:
      - caddy
    ports:
      - "8000:8000"
    deploy:
      placement:
        constraints: [node.role == worker]
      replicas: 1
      update_config:
        parallelism: 2
        delay: 10s
      restart_policy:
        condition: on-failure

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:latest
    command: agent
    depends_on:
      - woodpecker-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WOODPECKER_SERVER=woodpecker-server:9000
      - WOODPECKER_AGENT_SECRET=agent secret
      - WOODPECKER_MAX_PROCS=10
    networks:
      - caddy
    deploy:
      placement:
        constraints: [node.role == worker]
      replicas: 1
      update_config:
        parallelism: 2
        delay: 10s
      restart_policy:
        condition: on-failure
volumes:
  localvolume:
    driver: "local"
networks:
  caddy:
    external: true

Caddyfile

{
    email you@example.com
    cert_issuer acme
    # Production acme directory
    acme_ca https://acme-v02.api.letsencrypt.org/directory
    # Staging acme directory
    #acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
    servers {
        protocol {
            experimental_http3
            allow_h2c
            strict_sni_host
        }
        max_header_size 16384
    }
}

woodpecker.example.com {
    root * /var/lib/woodpecker
    encode gzip zstd
    reverse_proxy woodpecker-server:8000
}

Additional context

No response

Validations

@wxiaoguang
Copy link

You should set a user as admin in woodpecker server.

https://woodpecker-ci.org/docs/administration/server-config#administrators

Only admin can set the trusted repo.

Indeed, I believe it's a UI or document problem, most people do not know this trick (it is not obvious and can not be found easliy, no guide on UI)

@anbraten
Copy link
Member

I will try to add some hints to the docs at the places it describes the trusted option (https://woodpecker-ci.org/docs/usage/project-settings#trusted).

@rajaseg Where did you found the trusted option? Was it at the place I linked above?

@wxiaoguang
Copy link

Also maybe there are some logs about trusted concept? IIRC if I use the volumes in a non-trusted repo, some error logs are printed

@rajasekhar-gundala
Copy link
Author

You should set a user as admin in woodpecker server.

https://woodpecker-ci.org/docs/administration/server-config#administrators

Only admin can set the trusted repo.

Indeed, I believe it's a UI or document problem, most people do not know this trick (it is not obvious and can not be found easliy, no guide on UI)

@wxiaoguang Thank you very much for the tip. I added the environment variable - WOODPECKER_ADMIN=admin to the docker-compose and re-deployed the stack. Now I can see the option "Trusted" under the Project settings of the repository.

image

@rajasekhar-gundala
Copy link
Author

I will try to add some hints to the docs at the places it describes the trusted option (https://woodpecker-ci.org/docs/usage/project-settings#trusted).

@rajaseg Where did you found the trusted option? Was it at the place I linked above?

@anbraten Yes, that's the link where we need to hint users how to enable it.

@6543
Copy link
Member

6543 commented Feb 25, 2022

we could "grey out" it as "disabled" so it's visible ... and show a hint on mouse over that only admins can use this option ?

@6543 6543 added ui frontend related feedback this needs feedback ux user experience and removed pending:bug labels Feb 25, 2022
@rajasekhar-gundala

This comment was marked as off-topic.

@anbraten
Copy link
Member

we could "grey out" it as "disabled" so it's visible ... and show a hint on mouse over that only admins can use this option ?

I think we should keep things simple and add the hint to the docs as that was the place this question initially came from.
Normally a user would not notice that something is missing at all, if he is not reading the docs before.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feedback this needs feedback ui frontend related ux user experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants