whelk-4b7639eb-a4bd

job failed

pipeline1 step · 1 stage · 2.9s · 1 failed stepfailed 1
stagesrun12.9s
starting new job...
rundir='/etc/byggsteg/job-clone//whelk/trunk failed47 lines · 2.9s
branch='trunk'
if ! command -v git >/dev/null 2>&1; then
  echo 'byggsteg: git is not on this deployment PATH, so the clone cannot be updated' >&2
  exit 1
fi
if ! cd "$dir"; then
  echo "byggsteg: cannot enter the clone $dir" >&2
  exit 1
fi
root=$(git rev-parse --show-toplevel 2>/dev/null)
if [ "$root" != "$(pwd -P)" ]; then
  echo "byggsteg: $dir is not a git checkout; remove it and the next run clones it again" >&2
  exit 1
fi
if ! origin=$(git remote get-url origin 2>/dev/null); then
  echo "byggsteg: $dir has no origin remote to fetch $branch from" >&2
  exit 1
fi
before=$(git rev-parse --short HEAD 2>/dev/null) || before=none
attempt=1
while :; do
  if GIT_TERMINAL_PROMPT=0 git fetch --quiet origin "+refs/heads/$branch:refs/remotes/origin/$branch"; then
    break
  fi
  if [ "$attempt" -ge 3 ]; then
    echo "byggsteg: could not fetch $branch from $origin after 3 attempts; is the branch still there, and is the remote reachable?" >&2
    exit 1
  fi
  echo "byggsteg: fetching $branch from $origin failed; retrying in $((attempt * 2))s" >&2
  sleep $((attempt * 2))
  attempt=$((attempt + 1))
done
if ! git checkout --quiet --force -B "$branch" FETCH_HEAD; then
  echo "byggsteg: fetched $branch from $origin but could not check it out" >&2
  exit 1
fi
after=$(git rev-parse --short HEAD)
if [ "$before" = "$after" ]; then
  echo "byggsteg: $branch was already at $after"
else
  echo "byggsteg: $branch moved from $before to $after"
fi


error: cannot lock ref 'refs/remotes/origin/trunk': is at 455bc4164c71389873c1d2071f421bc89c7c9d57 but expected 8fdd063f51a8f640237d24c8b91f1921bd5e350f
byggsteg: fetching trunk from https://github.com/jjba23/whelk.git failed; retrying in 2s
fatal: Unable to create '/etc/byggsteg/job-clone/whelk/trunk/.git/index.lock': File exists.

Another git process seems to be running in this repository, or the lock file may be stale
byggsteg: fetched trunk from https://github.com/jjba23/whelk.git but could not check it out
inspect the job's lambda expression
(lambda()
  `((task . ("maak-test"))
    (project . "whelk")
    (branch-name . "trunk")
    (clone-url . "https://github.com/jjba23/whelk.git")))