-
Notifications
You must be signed in to change notification settings - Fork 75
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
Независимый от версии EDT поиск jar-файлов для Coverage41C #60
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,17 +3,17 @@ ARG BASE_IMAGE=edt | |||||||||||||
ARG BASE_TAG | ||||||||||||||
ARG EDT_VERSION=2021.3 | ||||||||||||||
ARG COVERAGE41C_VERSION=2.7.2 | ||||||||||||||
ARG EDT_PLUGINS=/opt/1C/1CE/components/1c-edt-${EDT_VERSION}*-x86_64/plugins | ||||||||||||||
|
||||||||||||||
FROM ${DOCKER_REGISTRY_URL}/edt:${EDT_VERSION} as base | ||||||||||||||
|
||||||||||||||
RUN ln -s $(find /opt/1C -name "com._1c.g5.v8.dt.debug.*.jar" -printf '%h\n'| sort -u) /opt/1C/edt_plugins | ||||||||||||||
|
||||||||||||||
FROM ${DOCKER_REGISTRY_URL}/${BASE_IMAGE}:${BASE_TAG} | ||||||||||||||
LABEL maintainer="Dima Ovcharenko <[email protected]>, Korus Consulting LLC" | ||||||||||||||
|
||||||||||||||
ARG COVERAGE41C_VERSION | ||||||||||||||
ARG EDT_PLUGINS | ||||||||||||||
|
||||||||||||||
COPY --from=base ${EDT_PLUGINS}/com._1c.g5.v8.dt.debug.core_*.jar ${EDT_PLUGINS}/com._1c.g5.v8.dt.debug.model_*.jar /opt/1C/1CE/ | ||||||||||||||
COPY --from=base /opt/1C/edt_plugins/com._1c.g5.v8.dt.debug.core_*.jar /opt/1C/edt_plugins/com._1c.g5.v8.dt.debug.model_*.jar /opt/1C/1CE/ | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Verify successful file copy operation The COPY command should be followed by a verification step to ensure the required files are present. COPY --from=base /opt/1C/edt_plugins/com._1c.g5.v8.dt.debug.core_*.jar /opt/1C/edt_plugins/com._1c.g5.v8.dt.debug.model_*.jar /opt/1C/1CE/
+RUN if [ $(ls /opt/1C/1CE/com._1c.g5.v8.dt.debug.*.jar 2>/dev/null | wc -l) -ne 2 ]; then \
+ echo "Error: Failed to copy required jar files" && \
+ exit 1; \
+ fi 📝 Committable suggestion
Suggested change
|
||||||||||||||
|
||||||||||||||
ADD https://github.com/1c-syntax/Coverage41C/releases/download/v${COVERAGE41C_VERSION}/Coverage41C-${COVERAGE41C_VERSION}.tar \ | ||||||||||||||
/opt/ | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add error handling to the symbolic link creation
The current implementation might fail silently in edge cases. Consider making it more robust:
📝 Committable suggestion