mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 09:05:10 +00:00
ci: remove .git dir to skip fetch_details_from_tag
fixes https://github.com/frappe/frappe_docker/actions/runs/3938883301/jobs/6738091655
This commit is contained in:
parent
6980deee43
commit
1b33fc6c11
3 changed files with 3 additions and 6 deletions
|
|
@ -59,7 +59,7 @@ Note:
|
|||
- Make sure `APPS_JSON_BASE64` variable has correct base64 encoded JSON string. It is consumed as build arg, base64 encoding ensures it to be friendly with environment variables. Use `jq empty apps.json` to validate `apps.json` file.
|
||||
- Make sure the `--tag` is valid image name that will be pushed to registry.
|
||||
- Change `--build-arg` as per version of Python, NodeJS, Frappe Framework repo and branch
|
||||
- Set `--build-arg=REMOVE_GIT_REMOTE=true` to remove git upstream remotes from all apps. Use this in case they have secrets or private tokens and you don't wish to ship them in final image.
|
||||
- `.git` directories for all apps are removed from the image.
|
||||
|
||||
### Push image to use in yaml files
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ RUN if [ -n "${APPS_JSON_BASE64}" ]; then \
|
|||
|
||||
USER frappe
|
||||
|
||||
ARG REMOVE_GIT_REMOTE
|
||||
ARG FRAPPE_BRANCH=version-14
|
||||
ARG FRAPPE_PATH=https://github.com/frappe/frappe
|
||||
RUN export APP_INSTALL_ARGS="" && \
|
||||
|
|
@ -117,9 +116,7 @@ RUN export APP_INSTALL_ARGS="" && \
|
|||
cd /home/frappe/frappe-bench && \
|
||||
echo "$(jq 'del(.db_host, .redis_cache, .redis_queue, .redis_socketio)' sites/common_site_config.json)" \
|
||||
> sites/common_site_config.json && \
|
||||
if [ -n "${REMOVE_GIT_REMOTE}" ]; then \
|
||||
find apps -name .git -type d -prune | xargs -i git --git-dir {} remote rm upstream; \
|
||||
fi
|
||||
find apps -mindepth 1 -path "*/.git" | xargs rm -fr
|
||||
|
||||
WORKDIR /home/frappe/frappe-bench
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ RUN bench init \
|
|||
bench get-app --branch=${ERPNEXT_BRANCH} --resolve-deps erpnext ${ERPNEXT_REPO} && \
|
||||
echo "$(jq 'del(.db_host, .redis_cache, .redis_queue, .redis_socketio)' sites/common_site_config.json)" \
|
||||
> sites/common_site_config.json && \
|
||||
find apps -name .git -type d -prune | xargs -i git --git-dir {} remote rm upstream
|
||||
find apps -mindepth 1 -path "*/.git" | xargs rm -fr
|
||||
|
||||
FROM base as erpnext
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue