this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed pipelines?

+144 -48
+56
.tangled/scripts/build-wasm.sh
··· 1 + #!/usr/bin/env bash 2 + set -euo pipefail 3 + 4 + WASM_CRATE="crates/opake-wasm" 5 + WASM_OUT="web/src/wasm/opake-wasm" 6 + S3_BUCKET="sans-self-net" 7 + WATCHED_PATHS="crates/opake-core crates/opake-wasm" 8 + 9 + # Cache key = hash of the actual source content, not the commit 10 + source_hash() { 11 + find $WATCHED_PATHS -type f -name '*.rs' -o -name 'Cargo.toml' | sort | xargs sha256sum | sha256sum | cut -d' ' -f1 12 + } 13 + 14 + CACHE_KEY="$(source_hash)" 15 + S3_PATH="ci-artifacts/opake/wasm/${CACHE_KEY}" 16 + 17 + rclone_s3() { 18 + rclone --s3-provider Other \ 19 + --s3-endpoint "${S3_ENDPOINT}" \ 20 + --s3-access-key-id "${S3_ACCESS_KEY}" \ 21 + --s3-secret-access-key "${S3_SECRET_KEY}" \ 22 + --s3-no-check-bucket \ 23 + "$@" 24 + } 25 + 26 + try_download_artifact() { 27 + echo "Cache key: ${CACHE_KEY}" 28 + echo "Checking for cached wasm artifact..." 29 + mkdir -p "$WASM_OUT" 30 + if rclone_s3 copy ":s3:${S3_BUCKET}/${S3_PATH}/" "$WASM_OUT/" 2>/dev/null; then 31 + if [ -f "${WASM_OUT}/opake_bg.wasm" ]; then 32 + echo "Cache hit — using cached wasm artifact" 33 + return 0 34 + fi 35 + fi 36 + echo "Cache miss" 37 + return 1 38 + } 39 + 40 + upload_artifact() { 41 + echo "Uploading wasm artifact (key: ${CACHE_KEY})..." 42 + rclone_s3 copy "$WASM_OUT/" ":s3:${S3_BUCKET}/${S3_PATH}/" 43 + echo "Uploaded" 44 + } 45 + 46 + build_wasm() { 47 + echo "Building wasm..." 48 + wasm-pack build "$WASM_CRATE" --target web --out-dir "../../${WASM_OUT}" --out-name opake 49 + } 50 + 51 + if try_download_artifact; then 52 + exit 0 53 + fi 54 + 55 + build_wasm 56 + upload_artifact
+22 -20
.tangled/workflows/deploy-staging.yml
··· 1 - image: gcr.io/kaniko-project/executor:debug 1 + image: zot.sans-self.org/infra/ci-opake:latest 2 2 engine: "kubernetes" 3 3 architecture: arm64 4 4 ··· 9 9 steps: 10 10 - name: "Setup registry auth" 11 11 command: | 12 - mkdir -p /kaniko/.docker 13 - printf '{"auths":{"zot.sans-self.org":{"username":"%s","password":"%s"}}}' \ 14 - "$ZOT_USERNAME" "$ZOT_PASSWORD" > /kaniko/.docker/config.json 12 + echo "Authenticating as: $ZOT_USERNAME" 13 + buildah login -u "$ZOT_USERNAME" -p "$ZOT_PASSWORD" zot.sans-self.org 15 14 16 15 - name: "Build and push appview" 17 16 command: | 18 - /kaniko/executor \ 19 - --dockerfile=Containerfile.appview \ 20 - --context=. \ 21 - --destination=zot.sans-self.org/opake/appview:staging \ 22 - --destination=zot.sans-self.org/opake/appview:staging-$TANGLED_COMMIT_SHA \ 23 - --cleanup 17 + buildah bud \ 18 + -f Containerfile.appview \ 19 + -t zot.sans-self.org/opake/appview:staging \ 20 + -t zot.sans-self.org/opake/appview:staging-$TANGLED_COMMIT_SHA \ 21 + appview 22 + buildah push zot.sans-self.org/opake/appview:staging 23 + buildah push zot.sans-self.org/opake/appview:staging-$TANGLED_COMMIT_SHA 24 24 25 25 - name: "Build and push web" 26 26 command: | 27 - /kaniko/executor \ 28 - --dockerfile=Containerfile.web \ 29 - --context=. \ 30 - --destination=zot.sans-self.org/opake/web:staging \ 31 - --destination=zot.sans-self.org/opake/web:staging-$TANGLED_COMMIT_SHA \ 32 - --build-arg=VITE_APPVIEW_URL=https://staging.opake.app \ 33 - --cleanup 27 + buildah bud \ 28 + -f Containerfile.web \ 29 + --build-arg VITE_APPVIEW_URL=https://appview.staging.opake.app \ 30 + --build-arg VITE_SITE_URL=https://staging.opake.app \ 31 + -t zot.sans-self.org/opake/web:staging \ 32 + -t zot.sans-self.org/opake/web:staging-$TANGLED_COMMIT_SHA \ 33 + . 34 + buildah push zot.sans-self.org/opake/web:staging 35 + buildah push zot.sans-self.org/opake/web:staging-$TANGLED_COMMIT_SHA 34 36 35 37 - name: "Rollout restart staging" 36 38 command: | 37 - wget -qO /tmp/kubectl "https://dl.k8s.io/release/v1.32.0/bin/linux/arm64/kubectl" 38 - chmod +x /tmp/kubectl 39 - /tmp/kubectl rollout restart deployment/opake-web deployment/opake-appview -n opake-staging 39 + curl -sLO "https://dl.k8s.io/release/v1.32.0/bin/linux/arm64/kubectl" 40 + chmod +x kubectl 41 + ./kubectl rollout restart deployment/opake-web deployment/opake-appview -n opake-staging
+25
.tangled/workflows/test-elixir.yml
··· 1 + image: hexpm/elixir:1.18.3-erlang-27.3-debian-bookworm-20250317-slim 2 + engine: "kubernetes" 3 + architecture: arm64 4 + 5 + when: 6 + - event: ["push", "pull_request"] 7 + branch: ["main"] 8 + 9 + steps: 10 + - name: "Install deps" 11 + command: | 12 + apt-get update -y && apt-get install -y --no-install-recommends build-essential git 13 + cd appview 14 + mix local.hex --force && mix local.rebar --force 15 + mix deps.get 16 + 17 + - name: "Compile (warnings as errors)" 18 + command: | 19 + cd appview 20 + MIX_ENV=test mix compile --warnings-as-errors 21 + 22 + - name: "Test" 23 + command: | 24 + cd appview 25 + MIX_ENV=test mix test
+22
.tangled/workflows/test-rust.yml
··· 1 + image: rust:1.88-slim-bookworm 2 + engine: "kubernetes" 3 + architecture: arm64 4 + 5 + when: 6 + - event: ["push", "pull_request"] 7 + branch: ["main"] 8 + 9 + steps: 10 + - name: "Install deps" 11 + command: | 12 + apt-get update -y && apt-get install -y --no-install-recommends pkg-config cmake gcc g++ 13 + rustup component add clippy rustfmt 14 + 15 + - name: "Check formatting" 16 + command: cargo fmt -- --check 17 + 18 + - name: "Clippy" 19 + command: cargo clippy --all-targets -- -D warnings 20 + 21 + - name: "Test" 22 + command: cargo test
+18
.tangled/workflows/test-web.yml
··· 1 + image: oven/bun:1-debian 2 + engine: "kubernetes" 3 + architecture: arm64 4 + 5 + when: 6 + - event: ["push", "pull_request"] 7 + branch: ["main"] 8 + 9 + steps: 10 + - name: "Install deps" 11 + command: | 12 + cd web 13 + bun install --frozen-lockfile 14 + 15 + - name: "Test" 16 + command: | 17 + cd web 18 + bun test
-25
.tangled/workflows/test.yml
··· 1 - when: 2 - - event: ["push", "pull_request"] 3 - branch: ["main"] 4 - 5 - engine: "nixery" 6 - 7 - dependencies: 8 - nixpkgs: 9 - - rustc 10 - - cargo 11 - - clippy 12 - - rustfmt 13 - - gcc 14 - - pkg-config 15 - - cmake 16 - 17 - steps: 18 - - name: "Check formatting" 19 - command: "cargo fmt -- --check" 20 - 21 - - name: "Clippy" 22 - command: "cargo clippy --all-targets -- -D warnings" 23 - 24 - - name: "Test" 25 - command: "cargo test"
+1 -3
Containerfile.web
··· 4 4 COPY web/package.json web/bun.lock ./ 5 5 RUN bun install --frozen-lockfile 6 6 7 - FROM rust:1.88-slim-bookworm AS wasm-builder 8 - 9 - RUN cargo install wasm-pack --locked 7 + FROM zot.sans-self.org/infra/rust-wasm:latest AS wasm-builder 10 8 11 9 WORKDIR /build 12 10 COPY Cargo.toml Cargo.lock ./