Skip to content

Commit

Permalink
fix: Disable Gitlab trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Jun 28, 2024
1 parent d839be4 commit 1eb7c17
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 34 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/trigger-gitlab.yaml

This file was deleted.

31 changes: 23 additions & 8 deletions .gitlab/images/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,34 @@ RUN apk add findutils coreutils git jq curl bash just parallel podman
# Nix Image
# ===============================================
FROM base-podman as ci-nix
ARG USER_NAME=ci
ARG USER_UID=1000
ARG USER_GID=1000
# ARG USER_HOME="/github/home"

RUN [ "TARGETPLATFORM" = "linux/amd64" ] || echo "Platform not yet supported."
COPY ./tools /container-setup/tools

# Install Nix and pre-cache the env.
RUN bash -c ". /container-setup/tools/general.sh && ci_setup_nix"
COPY rust-toolchain.toml /container-setup/
RUN cd /container-setup && \
git init && git add . && \
nix --accept-flake-config \
build --no-link "./tools/nix#devShells.x86_64-linux.ci" && \
nix store optimise

RUN git config --global safe.directory "*"

# Create user.
# RUN mkdir -p "$USER_HOME" && \
# adduser "$USER_NAME" -s /bin/zsh -D -u "$USER_UID" -g "$USER_GID" -h "$USER_HOME/$USER_NAME" && \
# mkdir -p /etc/sudoers.d && \
# echo "$USER_NAME ALL=(root) NOPASSWD:ALL" > "/etc/sudoers.d/$USER_NAME" && \
# chmod 0440 "/etc/sudoers.d/$USER_NAME" && \
# chown -R "$USER_NAME:$USER_NAME" /home /container-setup
# USER "$USER_NAME"

# COPY rust-toolchain.toml /container-setup/
# RUN cd /container-setup && \
# git init && git add . && \
# nix --accept-flake-config \
# build --no-link "./tools/nix#devShells.x86_64-linux.ci" && \
# nix store optimise

# RUN git config --global safe.directory "*"

# Format image.
# ===============================================
Expand Down
8 changes: 6 additions & 2 deletions .gitlab/scripts/before-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
# This script is sourced.
set -u

echo "Config global:"
git config --global --list | cat
git config --global safe.directory "*" || {
echo "Could not overwrite safe.directory in Git config." >&2
exit 1
}

ROOT_DIR=$(git rev-parse --show-toplevel)
. "$ROOT_DIR/tools/general.sh"

print_info "Running as user: $(id)"

# ci_container_mgr_setup

unset ROOT_DIR

0 comments on commit 1eb7c17

Please sign in to comment.