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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃挕 setup:emulators:ui #3152

Merged
merged 1 commit into from Feb 22, 2021
Merged

馃挕 setup:emulators:ui #3152

merged 1 commit into from Feb 22, 2021

Conversation

mac2000
Copy link
Contributor

@mac2000 mac2000 commented Feb 20, 2021

fixes #3151

Motivation: to build docker image with firestore emulator and ui we can prefetch firestore emulator with help of setup:emulators:firestore but there is no such command for ui, so it is being downloaded each time container starts.

Workaround: meanwhile workaround is to

ADD https://storage.googleapis.com/firebase-preview-drop/emulator/ui-v1.4.1.zip /root/.cache/firebase/emulators/ui-v1.4.1.zip
RUN unzip /root/.cache/firebase/emulators/ui-v1.4.1.zip -d /root/.cache/firebase/emulators/ui-v1.4.1

What was done:

If I understood everything correctly all we need is add

src/commands/setup-emulators-ui.js

"use strict";

const { Command } = require("../command");
const { Emulators } = require("../emulator/types");
const { downloadEmulator } = require("../emulator/download");

const NAME = Emulators.UI;

module.exports = new Command(`setup:emulators:${NAME}`)
  .description(`downloads the ${NAME} emulator`)
  .action((options) => {
    return downloadEmulator(NAME);
  });

And add it to src/commands/index.js

@google-cla google-cla bot added the cla: yes Manual indication that this has passed CLA. label Feb 20, 2021
@samtstern
Copy link
Contributor

@mac2000 thank you! This LGTM

@samtstern samtstern merged commit ee9e9d3 into firebase:master Feb 22, 2021
samtstern added a commit that referenced this pull request Feb 22, 2021
joehan added a commit that referenced this pull request Feb 22, 2021
Co-authored-by: joehan <joehanley@google.com>
This was referenced Mar 9, 2021
This was referenced Mar 12, 2021
devpeerapong pushed a commit to devpeerapong/firebase-tools that referenced this pull request Dec 14, 2021
devpeerapong pushed a commit to devpeerapong/firebase-tools that referenced this pull request Dec 14, 2021
Co-authored-by: joehan <joehanley@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

馃挕 setup:emulators:ui
2 participants