[CI/CD] Changed order of the S3 bucket mount step in deb builds.

It seems that s3fs may fail if two clients try to mount the same
resource with the same token at the same time.
This commit is contained in:
Fabio Manganiello 2023-10-14 15:26:07 +02:00
parent 1649808efc
commit d4c790925b
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -466,6 +466,11 @@ steps:
- apt update
- apt install -y curl dpkg-dev gpg git python3 python3-pip s3fs
- echo "-- Mounting the S3 bucket"
- mkdir -p "$BUCKET_MNT"
- s3fs "$S3_BUCKET" "$BUCKET_MNT" -o url="$AWS_ENDPOINT_URL"
- export APT_ROOT="$BUCKET_MNT/apt"
- echo "--- Parsing metadata"
- git config --global --add safe.directory $PWD
- git pull --rebase origin master --tags
@ -495,11 +500,6 @@ steps:
EOF
- dpkg --build "$GIT_BUILD_DIR"
- echo "-- Mounting the S3 bucket"
- mkdir -p "$BUCKET_MNT"
- s3fs "$S3_BUCKET" "$BUCKET_MNT" -o url="$AWS_ENDPOINT_URL"
- export APT_ROOT="$BUCKET_MNT/apt"
- echo "--- Pushing package to the S3 bucket"
- mkdir -p "$APT_ROOT/pool/$DEB_VERSION/dev"
- cp "$GIT_DEB" "$APT_ROOT/pool/$DEB_VERSION/dev/"