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

All predeploy and postdeploy hooks triggered for single target deployment #1597

Closed
duizabojul opened this issue Aug 13, 2019 · 2 comments
Closed

Comments

@duizabojul
Copy link

duizabojul commented Aug 13, 2019

[REQUIRED] Environment info

firebase-tools: 7.2.2

Platform: macOS, Windows, Ubuntu

[REQUIRED] Test case

.firebase.json example file

"hosting": [
{
    "target": "production",
    "public": "dist",
    "predeploy" : "echo 'production predeploy'",
    "postdeploy" : "echo 'production postdeploy'"
},
{
    "target": "staging",
    "public": "dist",
    "predeploy" : "echo 'staging predeploy'",
    "postdeploy" : "echo 'staging postdeploy'"
},
{
    "target": "development",
    "public": "dist",
    "predeploy" : "echo 'development predeploy'",
    "postdeploy" : "echo 'development postdeploy'"
}]

firebase deploy --only hosting:staging will produce following output :

production predeploy
staging predeploy
development predeploy
// STAGING DEPLOYMENT
production postdeploy
staging postdeploy
development postdeploy

[REQUIRED] Steps to reproduce

  • In firebase project, create multiple hosting sites and create targets accordingly with CLI.

  • Add predeploy and/or postdeploy hooks for each target in firebase.json file.

  • Deploy on firebase with one target : firebase deploy --only hosting:your-target.

[REQUIRED] Expected behavior

Only target hooks have to be triggered.

[REQUIRED] Actual behavior

All targets predeploy and postdeploy hooks are triggered.

@google-oss-bot
Copy link
Contributor

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@bkendall
Copy link
Contributor

This is a duplicate of #1160 which I am reopening.

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

No branches or pull requests

3 participants