Skip to content

Commit

Permalink
Add dockcross_assemble_command env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahbeckford committed Oct 2, 2024
1 parent b0bba96 commit 6b73e45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changes

## 2.1.4

- Add `dockcross_assemble_command` environment variable to inject a shell command into the Docker container during its build assembly.
- bugfix: Update apt and yum while building dockcross container
- Batch all opam pin operations. Fixes <https://gitlab.com/dkml/distributions/dkml/-/issues/29>

## 2.1.3

- Upgrade `actions/cache` and `actions/checkout` from v3 to v4

## 2.1.2

- Use a fixed commit of [ocaml/opam-repository.git](https://github.com/ocaml/opam-repository.git) by default.
Expand Down
3 changes: 2 additions & 1 deletion src/scripts/setup-dkml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ if [ "${in_docker:-}" = "true" ] && [ -n "${dockcross_image:-}" ]; then
install -d .ci/sd4/docker-image
# Since GitLab CI limits environment variables to 255 characters, if you need to exceed that there are five (5)
# variations of `dockcross_packages_apt` and `dockcross_packages_yum` to spread the packages over.
printf "FROM %s\nENV DEFAULT_DOCKCROSS_IMAGE %sdkml-workflows/dockcross:latest\nRUN if command -v apt-get; then apt-get update -y && apt-get install -y rsync %s %s %s %s %s && rm -rf /var/lib/apt/lists/*; fi\nRUN if command -v yum; then yum update -y && yum install -y rsync %s %s %s %s %s && yum clean all && rm -rf /var/cache/yum; fi" \
printf "FROM %s\nENV DEFAULT_DOCKCROSS_IMAGE %sdkml-workflows/dockcross:latest\nRUN if command -v apt-get; then apt-get update -y && apt-get install -y rsync %s %s %s %s %s && rm -rf /var/lib/apt/lists/*; fi\nRUN if command -v yum; then yum update -y && yum install -y rsync %s %s %s %s %s && yum clean all && rm -rf /var/cache/yum; fi; %s" \
"${dockcross_image:-}" "${docker_fqin_preusername}" \
"${dockcross_packages_apt:-}" "${dockcross_packages_apt2:-}" "${dockcross_packages_apt3:-}" "${dockcross_packages_apt4:-}" "${dockcross_packages_apt5:-}" \
"${dockcross_packages_yum:-}" "${dockcross_packages_yum2:-}" "${dockcross_packages_yum3:-}" "${dockcross_packages_yum4:-}" "${dockcross_packages_yum5:-}" \
"${dockcross_assemble_command:-true}" \
>.ci/sd4/docker-image/Dockerfile
docker build --quiet --tag "${docker_fqin_preusername}dkml-workflows/dockcross:latest" .ci/sd4/docker-image

Expand Down

0 comments on commit 6b73e45

Please sign in to comment.