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

build/compile split - launcher calls #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions v2/cli_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (r *DockerConfigureCmd) Run(cli *Cli, ctx *context.Context) error {
PupsArgs: "--tags=db,precompile",
FromImageName: namespace + "/" + r.Config + sourceTag,
SavedImageName: namespace + "/" + r.Config + targetTag,
ExtraEnv: []string{"SKIP_EMBER_CLI_COMPILE=1"},
ExtraEnv: []string{},
Ctx: ctx,
ContainerId: containerId,
}
Expand All @@ -122,7 +122,7 @@ func (r *DockerMigrateCmd) Run(cli *Cli, ctx *context.Context) error {
return errors.New("YAML syntax error. Please check your containers/*.yml config files.")
}
containerId := "discourse-build-" + uuid.NewString()
env := []string{"SKIP_EMBER_CLI_COMPILE=1"}
env := []string{}
if r.SkipPostDeploymentMigrations {
env = append(env, "SKIP_POST_DEPLOYMENT_MIGRATIONS=1")
}
Expand Down
4 changes: 0 additions & 4 deletions v2/cli_build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,11 @@ var _ = Describe("Build", func() {
// docker build's stdin is a dockerfile
Expect(buf.String()).To(ContainSubstring("COPY config.yaml /temp-config.yaml"))
Expect(buf.String()).To(ContainSubstring("--skip-tags=precompile,migrate,db"))
Expect(buf.String()).ToNot(ContainSubstring("SKIP_EMBER_CLI_COMPILE=1"))
}

var checkMigrateCmd = func(cmd exec.Cmd) {
Expect(cmd.String()).To(ContainSubstring("docker run"))
Expect(cmd.String()).To(ContainSubstring("--env DISCOURSE_DEVELOPER_EMAILS"))
Expect(cmd.String()).To(ContainSubstring("--env SKIP_EMBER_CLI_COMPILE=1"))
// no commit after, we expect an --rm as the container isn't needed after it is stopped
Expect(cmd.String()).To(ContainSubstring("--rm"))
Expect(cmd.Env).To(ContainElement("DISCOURSE_DB_PASSWORD=SOME_SECRET"))
Expand Down Expand Up @@ -97,7 +95,6 @@ var _ = Describe("Build", func() {
"--env RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR " +
"--env UNICORN_SIDEKIQS " +
"--env UNICORN_WORKERS " +
"--env SKIP_EMBER_CLI_COMPILE=1 " +
"--volume /var/discourse/shared/web-only:/shared " +
"--volume /var/discourse/shared/web-only/log/var-log:/var/log " +
"--link data:data " +
Expand Down Expand Up @@ -220,7 +217,6 @@ var _ = Describe("Build", func() {
Expect(cmd.String()).To(ContainSubstring("docker run"))
Expect(cmd.String()).To(ContainSubstring("--env DISCOURSE_DEVELOPER_EMAILS"))
Expect(cmd.String()).To(ContainSubstring("--env SKIP_POST_DEPLOYMENT_MIGRATIONS=1"))
Expect(cmd.String()).To(ContainSubstring("--env SKIP_EMBER_CLI_COMPILE=1"))
// no commit after, we expect an --rm as the container isn't needed after it is stopped
Expect(cmd.String()).To(ContainSubstring("--rm"))
Expect(cmd.Env).To(ContainElement("DISCOURSE_DB_PASSWORD=SOME_SECRET"))
Expand Down
Loading