Skip to content

Commit

Permalink
TASK: Optimize cloning in update-neos-ui-compiled.sh
Browse files Browse the repository at this point in the history
The script clones `[email protected]:neos/neos-ui-compiled.git` – and that is a **massive** repository. Cloning it uses a lot of space (over 1 GB) and takes long, as the Jenkins log shows (timestamps are elapsed time):

```
00:00:50.125 + git clone [email protected]:neos/neos-ui-compiled.git tmp_compiled_pkg
00:00:50.137 Cloning into 'tmp_compiled_pkg'...
00:21:54.271 + cd tmp_compiled_pkg
00:21:54.272 + git checkout origin/8.4
```

That took… more than 20 minutes! Yikes!

I suggest to do this instead:

```
git clone --depth 1 [email protected]:neos/neos-ui-compiled.git --single-branch --branch=${BRANCH} tmp_compiled_pkg
```

Takes about 10 seconds for me, transfers around 5 MB of data, uses 23 MB of disk space and even saves us the `git checkout`, as the branch is already taken care of.
  • Loading branch information
kdambekalns authored Feb 11, 2025
1 parent b83a3c0 commit 46a4f5b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Build/Jenkins/update-neos-ui-compiled.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ make clean && make setup
NEOS_UI_VERSION="${GIT_TAG:-${GIT_BRANCH#*/}-dev}" make build-production

rm -Rf tmp_compiled_pkg
git clone [email protected]:neos/neos-ui-compiled.git tmp_compiled_pkg
cd tmp_compiled_pkg
git checkout "$GIT_BRANCH"
cd ..

git clone --depth 1 [email protected]:neos/neos-ui-compiled.git --single-branch --branch=${GIT_BRANCH} tmp_compiled_pkg

mkdir -p tmp_compiled_pkg/Resources/Public/Build

Expand Down

0 comments on commit 46a4f5b

Please sign in to comment.