Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@a-b-r-o-w-n
Copy link
Contributor

Description

Updates docker build after moving extensions directory outside ./Composer. Also enables docker builds in CI again.

Task Item

fixes #4435

@coveralls
Copy link

coveralls commented Oct 21, 2020

Coverage Status

Coverage decreased (-0.005%) to 55.358% when pulling 5a95fd7 on abrown/fix-compile-extensions into d18b0fb on main.

when NODE_ENV is production, yarn will not install dev dependencies. We need those to build extensions.
@a-b-r-o-w-n
Copy link
Contributor Author

@cdonke Can you take a look at this PR and let me know if there are any optimizations that can be made?

@cdonke
Copy link
Contributor

cdonke commented Oct 21, 2020

@a-b-r-o-w-n Sure! right now!

@cdonke
Copy link
Contributor

cdonke commented Oct 21, 2020

@a-b-r-o-w-n

Some dependencey requires the .git folder
image

Not sure if it is strictly necessary. If it is, I would COPY the .git folder as well, just after line 16
COPY /.git ../.git

I saw that you added a try-catch block on /Composer/scripts/compileExtensions.js because of the git command it uses. It is complaining that the git command is unknown. You have 2 options:

  1. remove the whole getLastModified method, because it will always fail,
  2. or to add Git to the container, adding this just after line 10:
    RUN apk add --no-cache git

@a-b-r-o-w-n
Copy link
Contributor Author

@cdonke thanks for the review. The dependency that is complaining about the .git directory is when developing locally. It runs eslint before each commit. It's fine to ignore in the docker environment.

As for the try/catch in compileExtensions.js, in the case of not having git installed, I will treat that as always needing to be compiled. I don't think the docker container needs git installed because we should always build the extensions.

@cdonke
Copy link
Contributor

cdonke commented Oct 21, 2020

@a-b-r-o-w-n Makes sense...

So I don't see any more changes... besides removing a redundant WORKDIR at line 35... but that is not affecting anything...

@a-b-r-o-w-n a-b-r-o-w-n merged commit e8d0d55 into main Oct 22, 2020
@a-b-r-o-w-n a-b-r-o-w-n deleted the abrown/fix-compile-extensions branch October 22, 2020 00:03
@cwhitten cwhitten mentioned this pull request Nov 13, 2020
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* always compile extensions if git not present

* compile extension if main module is missing

* do not print git errors

* fix docker builds

* re-enable docker on CI

* load image into docker after building

* report on errors and fail script

* remove buildx

* force extensions to install all dependencies

when NODE_ENV is production, yarn will not install dev dependencies. We need those to build extensions.

* revert not using buildx

* start up docker in background

* update code scan action to run on push to main
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker not building

4 participants