Skip to content

Commit ce87230

Browse files
DEV: re-split build vs compile
Allow for assets to be precompiled fully in a build image. The only remaining things for configure is update themes, maxmind download, and css compiling.
1 parent 20e33fb commit ce87230

File tree

4 files changed

+7
-453
lines changed

4 files changed

+7
-453
lines changed

launcher_go/v2/cli_build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (r *DockerConfigureCmd) Run(cli *Cli, ctx *context.Context) error {
102102
PupsArgs: "--tags=db,precompile",
103103
FromImageName: namespace + "/" + r.Config + sourceTag,
104104
SavedImageName: namespace + "/" + r.Config + targetTag,
105-
ExtraEnv: []string{"SKIP_EMBER_CLI_COMPILE=1"},
105+
ExtraEnv: []string{},
106106
Ctx: ctx,
107107
ContainerId: containerId,
108108
}
@@ -122,7 +122,7 @@ func (r *DockerMigrateCmd) Run(cli *Cli, ctx *context.Context) error {
122122
return errors.New("YAML syntax error. Please check your containers/*.yml config files.")
123123
}
124124
containerId := "discourse-build-" + uuid.NewString()
125-
env := []string{"SKIP_EMBER_CLI_COMPILE=1"}
125+
env := []string{}
126126
if r.SkipPostDeploymentMigrations {
127127
env = append(env, "SKIP_POST_DEPLOYMENT_MIGRATIONS=1")
128128
}

launcher_go/v2/cli_build_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ var _ = Describe("Build", func() {
5757
// docker build's stdin is a dockerfile
5858
Expect(buf.String()).To(ContainSubstring("COPY config.yaml /temp-config.yaml"))
5959
Expect(buf.String()).To(ContainSubstring("--skip-tags=precompile,migrate,db"))
60-
Expect(buf.String()).ToNot(ContainSubstring("SKIP_EMBER_CLI_COMPILE=1"))
6160
}
6261

6362
var checkMigrateCmd = func(cmd exec.Cmd) {
6463
Expect(cmd.String()).To(ContainSubstring("docker run"))
6564
Expect(cmd.String()).To(ContainSubstring("--env DISCOURSE_DEVELOPER_EMAILS"))
66-
Expect(cmd.String()).To(ContainSubstring("--env SKIP_EMBER_CLI_COMPILE=1"))
6765
// no commit after, we expect an --rm as the container isn't needed after it is stopped
6866
Expect(cmd.String()).To(ContainSubstring("--rm"))
6967
Expect(cmd.Env).To(ContainElement("DISCOURSE_DB_PASSWORD=SOME_SECRET"))
@@ -97,7 +95,6 @@ var _ = Describe("Build", func() {
9795
"--env RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR " +
9896
"--env UNICORN_SIDEKIQS " +
9997
"--env UNICORN_WORKERS " +
100-
"--env SKIP_EMBER_CLI_COMPILE=1 " +
10198
"--volume /var/discourse/shared/web-only:/shared " +
10299
"--volume /var/discourse/shared/web-only/log/var-log:/var/log " +
103100
"--link data:data " +
@@ -220,7 +217,6 @@ var _ = Describe("Build", func() {
220217
Expect(cmd.String()).To(ContainSubstring("docker run"))
221218
Expect(cmd.String()).To(ContainSubstring("--env DISCOURSE_DEVELOPER_EMAILS"))
222219
Expect(cmd.String()).To(ContainSubstring("--env SKIP_POST_DEPLOYMENT_MIGRATIONS=1"))
223-
Expect(cmd.String()).To(ContainSubstring("--env SKIP_EMBER_CLI_COMPILE=1"))
224220
// no commit after, we expect an --rm as the container isn't needed after it is stopped
225221
Expect(cmd.String()).To(ContainSubstring("--rm"))
226222
Expect(cmd.Env).To(ContainElement("DISCOURSE_DB_PASSWORD=SOME_SECRET"))

0 commit comments

Comments
 (0)