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

Team project builds are failing because now inspect uses default scope #50

Closed
Regaddi opened this issue May 14, 2020 · 4 comments · Fixed by amondnet/vercel-action#5
Closed
Assignees
Labels
Milestone

Comments

@Regaddi
Copy link

Regaddi commented May 14, 2020

Hey 👋

It would be good to be able to configure the --scope flag for now inspect.
By default it uses my personal space, but when deploying a team project it should instead search within the team scope.

Example output:

$ now inspect https://my-team-project.now.sh/
Now CLI 19.0.1
Error! Failed to find deployment "https://my-team-project.now.sh/" in regaddi

$ now inspect https://my-team-project.now.sh/ --scope my-team
Now CLI 19.0.1
> Fetched deployment "my-team-project.now.sh" in my-team [2s]
...

This leads to failing builds, because the team project can't be found within my personal scope.

It used to work with now 18.0.0, but fails with now 19.0.1.

Thanks in advance for your help!

@amondnet amondnet added this to the v2.0.4 milestone May 16, 2020
@amondnet
Copy link
Owner

Hi, @Regaddi
Currently, you can do this through a vercel configuration file.
https://vercel.com/docs/configuration#project/scope

{
  "github": {
     "enabled": false
  },
  "version" : 2,
  "scope": "my-team"
}

I will add this feature to the next version.

@Regaddi
Copy link
Author

Regaddi commented May 18, 2020

Hey @amondnet,

thanks for your response!
I tested this by adding the scope property to my configuration file, but unfortunately it still doesn't respect the configured scope for the inspect step:

image

This is the configuration file:

{
  "version": 2,
  "scope": "my-team",
  "builds": [
    {
      "src": "/packages/dashboard/package.json",
      "use": "@now/next"
    }
  ],
  "routes": [
    {
      "src": "/(.*)",
      "dest": "/packages/dashboard/$1",
      "continue": true
    }
  ]
}

Thanks!

@amondnet
Copy link
Owner

hi @Regaddi ,
Fixed in amondnet/vercel-action#5

      - uses: vercel-action@v19 //v19.0.1+1
        id: vercel-action
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID_TEAM_SCOPE }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_TEAM_SCOPE }}
          working-directory: example/team-scope
          scope: ${{ secrets.VERCEL_SCOPE }}

@Regaddi
Copy link
Author

Regaddi commented May 19, 2020

It's working perfectly! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants