Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Platform permission is unable to see builds in the project specific build-info repository. #201

Open
jndz2 opened this issue Feb 3, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jndz2
Copy link

jndz2 commented Feb 3, 2025

We are currently trying to develop a promotion permission that allows projects to promote artifacts. Unfortunately, we cannot view builds in the project build info repo with this permission.

resource "platform_group" "promotion" {
  name             = "project-local-generic-promotion-group"
  admin_privileges = false
  auto_join        = false
}

resource "platform_permission" "promotion_permissions" {
  name = "project-local-generic-promotion-permission"

  artifact = {
    actions = {
      groups = [
        {
          name        = platform_group.promotion.name
          permissions = ["WRITE", "DELETE"]
        }
      ]
    }

    targets = [
      {
        name             = "project-local-generic",
        include_patterns = ["**"]
      },
      {
        name             = "project-dev-local-generic",
        include_patterns = ["**"]
      }
    ]
  }
  build = {
    actions = {
      groups = [
        {
          name        = platform_group.promotion.name
          permissions = ["READ", "WRITE", "DELETE", "ANNOTATE"]
        }
      ]
    }
    targets = [
      {
        name             = "artifactory-build-info",
        include_patterns = ["test-project-build-info/**"]
      }
    ]
  }
}

with this permission I cannot see builds in the test-project-build-info. When I execute jf rt cl "/api/build/test-build?project=test-project" I get

{
  "errors" : [ {
    "status" : 404,
    "message" : "No build was found for build name: test-build-a"
  } ]
}
@alexhung alexhung added the bug Something isn't working label Feb 3, 2025
@alexhung
Copy link
Member

alexhung commented Feb 3, 2025

@jndz2 Thanks for the report! I've added this to our plan to investigate and fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants