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

azd package requires an environment name #3182

Closed
1 task done
aaronpowell opened this issue Jan 8, 2024 · 3 comments
Closed
1 task done

azd package requires an environment name #3182

aaronpowell opened this issue Jan 8, 2024 · 3 comments

Comments

@aaronpowell
Copy link
Contributor

Output from azd version
Run azd version and copy and paste the output here:

azd version 1.5.1 (commit 3856d1e98281683b8d112e222c0a7c7b3e148e96)

Describe the bug
I want to use azd package as a "smoke test" in CI to ensure that the packages can be successfully built on each commit/push to a branch.

I've created a workflow like so:

name: azd package

on:
  push:
    branches: ["main"]
  pull_request:
    branches: ["main", "feature/*"]

jobs:
  package:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Install azd
        uses: Azure/setup-azd@v0.1.0

      - name: Package with azd
        run: azd package

But it errors when running because there's not environment name set, as showing by the repeated log message:

Enter a new environment name: environment name '' is invalid (it should contain only alphanumeric characters and hyphens)

Also, it keeps attempting to get the environment name, so I either have to kill the job or wait for it to time out. Here's an example run.

To Reproduce

  • Create a GitHub Actions workflow as above
  • Push and run
  • See the logs for GitHub Actions.

Expected behavior
Since I'm not deploying, I shouldn't need an environment name to run azd package.

Environment
GitHub Actions

@rajeshkamal5050
Copy link
Contributor

Seems a duplicate of issue #2857

Can you try the following workaround? #2857 (comment)

cc @wbreza

@aaronpowell
Copy link
Contributor Author

Ah damn, I tried to search but seems like I was unsuccessful in my efforts 🤣

That workaround is what I've done in our situation too.

@rajeshkamal5050
Copy link
Contributor

Marking as duplicate of #2857

@rajeshkamal5050 rajeshkamal5050 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants