Compare commits

..

No commits in common. "524bdf9cdcfb8008c08d7e54a95992ebf05331d5" and "fa33f6e0b71d0a2d733c5ad08c2ea9a99a2b7374" have entirely different histories.

3 changed files with 13 additions and 15 deletions

View file

@ -1 +1 @@
3.0.1
3.0.0

View file

@ -637,12 +637,12 @@ in rec {
// gitlabOptions;
config = let
attrsToKeep = builtins.attrNames gitlabOptions;
job = filterUnset (filterAttrs (n: _v: builtins.elem n attrsToKeep) config);
in {
finalConfig = cilib.mkJobPatched {
key = name;
job = filterUnset (filterAttrs (n: _v: builtins.elem n attrsToKeep) config);
nixConfig = config.nix;
inherit job pipelineName;
inherit pipelineName;
};
depsDrv = cilib.mkJobDeps {
key = name;
@ -651,8 +651,8 @@ in rec {
};
runnerDrv = cilib.mkJobRun {
key = name;
job = config.finalConfig;
jobDeps = config.depsDrv;
inherit job;
};
packages = {
"gitlab-ci:pipeline:${pipelineName}:job-deps:${name}" = config.depsDrv;

View file

@ -28,19 +28,18 @@ while [[ $# -gt 0 ]]; do
;;
*)
echo "Unknown option: $1" >&2
echo "use --include-dirty, --no-sandbox, --keep-tmp and --keep-env <ENV>" >&2
exit 1
;;
esac
done
if [ $NO_SANDBOX = false ]; then
if [ "$NO_SANDBOX" = false ]; then
echo "Running with simple sandboxing"
NGCI_TMPDIR=$(mktemp -dt "nix-gitlab-ci.XXX")
if [ $KEEP_TMP = false ]; then
trap "rm -rf '$NGCI_TMPDIR'" EXIT
TMPDIR=$(mktemp -dt "nix-gitlab-ci.XXX")
if [ "$KEEP_TMP" = false ]; then
trap "rm -rf '$TMPDIR'" EXIT
else
echo "Temp dir will be preserved at: $NGCI_TMPDIR"
echo "Temp dir will be preserved at: $TMPDIR"
fi
# check if dirty
@ -51,15 +50,14 @@ if [ $NO_SANDBOX = false ]; then
git diff --staged > "$DIRTY_PATCH"
trap "rm -f '$DIRTY_PATCH'" EXIT
fi
git clone . $NGCI_TMPDIR
pushd $NGCI_TMPDIR >/dev/null
if [[ ! -z "$DIRTY_PATCH" && $INCLUDE_DIRTY = true ]]; then
git clone . $TMPDIR
pushd $TMPDIR >/dev/null
if [[ ! -z "$DIRTY_PATCH" && "$INCLUDE_DIRTY" = true ]]; then
echo "Copying dirty changes..."
git apply "$DIRTY_PATCH" 2>/dev/null || echo "Failed to copy dirty changes"
git add . # required so the files are staged again
fi
echo "Running job in $NGCI_TMPDIR"
echo "Running job in $TMPDIR"
env -i $(
if [[ -n "$KEEP_ENV" ]]; then
IFS=',' read -ra VARS <<< "$KEEP_ENV"