Skip to content
Snippets Groups Projects
Verified Commit 527c5d50 authored by Louis's avatar Louis :fire:
Browse files

Include cargo cross in image, bump rust version, restrict image building to tags

parent 74ba4b9d
No related branches found
No related tags found
No related merge requests found
Pipeline #715 failed
......@@ -15,4 +15,7 @@ build:
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
- docker build --pull -f Dockerfile -t "$CI_REGISTRY_IMAGE${tag}" .
- docker push "$CI_REGISTRY_IMAGE${tag}"
\ No newline at end of file
- docker push "$CI_REGISTRY_IMAGE${tag}"
rules:
if: $CI_COMMIT_TAG
when: always
\ No newline at end of file
......@@ -7,7 +7,7 @@ ARG USER_GID=$USER_UID
ARG RUST_VERSION
ARG NODE_VERSION
ENV RUST_VERSION=${RUST_VERSION:-1.82}
ENV RUST_VERSION=${RUST_VERSION:-1.84}
ENV NODE_VERSION=${NODE_VERSION:-22.11.0}
RUN groupadd --gid $USER_GID $USERNAME \
......@@ -35,4 +35,9 @@ RUN rustup install $RUST_VERSION && \
rustup install nightly && \
cargo install cargo-binstall junitify cargo-nextest
RUN cargo install cross --git https://github.com/cross-rs/cross
ENV CROSS_CONTAINER_IN_CONTAINER=true
ENV CROSS_CONTAINER_UID=${USER_UID}
ENV CROSS_CONTAINER_GID=${USER_GID}
ENV PATH="${PATH}:/home/${USERNAME}/.cargo/bin:${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/"
\ No newline at end of file
......@@ -7,7 +7,7 @@ Rust base image for use in Gitlab CI. Includes extra tools to support the CI use
To use this image as the base for your CI pipeline, include the following at the head of your `.gitlab-ci.yml`:
```yaml
image: cr.weirdboi.dev/base/rust:1.82
image: cr.weirdboi.dev/base/rust:1.84
```
To use this image for a specific pipeline job, include the following in your job spec:
......@@ -36,4 +36,9 @@ my_build_step:
### Extra Binaries
- `junitify` - Can be used to transform the output of `cargo test` into a junit.xml file
\ No newline at end of file
- `junitify` - Can be used to transform the output of `cargo test` into a junit.xml file
- `node` - Node.js javascript runtime
### Cross support
- The container also includes `cross`, but does not install additional toolchains by default. This can be used to avoid prebuilding additional image versions in environments with DinD support
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment