ci(release): apt retries on IPv4; never skip the publish job
All checks were successful
ci / test (pull_request) Successful in 3m39s
All checks were successful
ci / test (pull_request) Successful in 3m39s
Concurrent dind rust containers looped on apt InRelease; abort and retry with ForceIPv4. Publish always runs after version so cleanup is not blocked by Forgejo act "'runs-on' key not defined" on a skipped job. Do not bake a custom rust image on this card.
This commit is contained in:
parent
3e72f40e0e
commit
eaea3d49f7
1 changed files with 22 additions and 5 deletions
|
|
@ -38,6 +38,8 @@ concurrency:
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: never
|
CARGO_TERM_COLOR: never
|
||||||
RUST_IMAGE: rust:1.91-bookworm
|
RUST_IMAGE: rust:1.91-bookworm
|
||||||
|
# Not baking pkg-config/libssl-dev into a custom image on this card —
|
||||||
|
# dind PVC would make that the durable fix for the apt loop. Filed separately.
|
||||||
CARGO_REGISTRY_VOLUME: onionwire-cargo-registry
|
CARGO_REGISTRY_VOLUME: onionwire-cargo-registry
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -173,8 +175,8 @@ jobs:
|
||||||
-w /src \
|
-w /src \
|
||||||
"$RUST_IMAGE" \
|
"$RUST_IMAGE" \
|
||||||
sh -euxc 'mkdir -p /src && tar xzf - -C /src && cd /src \
|
sh -euxc 'mkdir -p /src && tar xzf - -C /src && cd /src \
|
||||||
&& apt-get update \
|
&& apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true update \
|
||||||
&& apt-get install -y --no-install-recommends pkg-config libssl-dev \
|
&& apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true install -y --no-install-recommends pkg-config libssl-dev \
|
||||||
&& cargo build --release --locked \
|
&& cargo build --release --locked \
|
||||||
&& strip /target/release/onionwire \
|
&& strip /target/release/onionwire \
|
||||||
&& ls -l /target/release/onionwire'
|
&& ls -l /target/release/onionwire'
|
||||||
|
|
@ -256,8 +258,8 @@ jobs:
|
||||||
-w /src \
|
-w /src \
|
||||||
"$RUST_IMAGE" \
|
"$RUST_IMAGE" \
|
||||||
sh -euxc 'mkdir -p /src && tar xzf - -C /src && cd /src \
|
sh -euxc 'mkdir -p /src && tar xzf - -C /src && cd /src \
|
||||||
&& apt-get update \
|
&& apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true update \
|
||||||
&& apt-get install -y --no-install-recommends pkg-config libssl-dev \
|
&& apt-get -o Acquire::Retries=5 -o Acquire::http::Timeout=20 -o Acquire::https::Timeout=20 -o Acquire::ForceIPv4=true install -y --no-install-recommends pkg-config libssl-dev \
|
||||||
&& cargo build --release --locked \
|
&& cargo build --release --locked \
|
||||||
&& strip /target/release/onionwire \
|
&& strip /target/release/onionwire \
|
||||||
&& ls -l /target/release/onionwire'
|
&& ls -l /target/release/onionwire'
|
||||||
|
|
@ -292,21 +294,36 @@ jobs:
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: [version, aarch64, x86_64]
|
needs: [version, aarch64, x86_64]
|
||||||
if: needs.version.outputs.dry_run != 'true'
|
# Always run after version so cleanup can need this job without Forgejo
|
||||||
|
# act dying on "'runs-on' key not defined" for a skipped publish.
|
||||||
|
if: always() && needs.version.result == 'success'
|
||||||
runs-on: docker-amd64
|
runs-on: docker-amd64
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
|
- name: Skip publish on dry_run
|
||||||
|
if: needs.version.outputs.dry_run == 'true'
|
||||||
|
run: echo "dry_run not publishing"
|
||||||
|
|
||||||
|
- name: Fail closed if a build failed
|
||||||
|
if: needs.version.outputs.dry_run != 'true' && (needs.aarch64.result != 'success' || needs.x86_64.result != 'success')
|
||||||
|
run: |
|
||||||
|
echo "aarch64=${{ needs.aarch64.result }} x86_64=${{ needs.x86_64.result }}" >&2
|
||||||
|
exit 1
|
||||||
|
|
||||||
- name: Checkout CI tooling
|
- name: Checkout CI tooling
|
||||||
|
if: needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: .ci-tools
|
path: .ci-tools
|
||||||
|
|
||||||
- name: Download both arch artifacts
|
- name: Download both arch artifacts
|
||||||
|
if: needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
|
||||||
uses: https://code.forgejo.org/actions/download-artifact@v3
|
uses: https://code.forgejo.org/actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: artifacts
|
path: artifacts
|
||||||
|
|
||||||
- name: Publish both binaries to one release
|
- name: Publish both binaries to one release
|
||||||
|
if: needs.version.outputs.dry_run != 'true' && needs.aarch64.result == 'success' && needs.x86_64.result == 'success'
|
||||||
env:
|
env:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
REPO_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
REPO_API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue