Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/install-worker-controller.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -Eeuo pipefail
set +x
export PYTHONDONTWRITEBYTECODE=1

repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
mode=
Expand Down
2 changes: 2 additions & 0 deletions scripts/test-install-worker-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ for dockerfile in "$repo_root/controller/Dockerfile" "$repo_root/runner/Dockerfi
grep -Fq "LABEL org.opencontainers.image.revision=\"\${CI_FLEET_COMMIT}\"" "$dockerfile" || fail "managed image lacks engine provenance label: $dockerfile"
done
grep -Fq ' user: "0:0"' "$repo_root/deploy/compose.yaml" || fail 'controller cannot read the required root-owned mode-0600 GitHub App PEM'
grep -Fq 'export PYTHONDONTWRITEBYTECODE=1' "$repo_root/scripts/install-worker-controller.sh" || fail 'managed validation may write Python bytecode into the immutable manager release'
grep -Fq "CI_FLEET_COMMIT: \${CI_FLEET_COMMIT:-unknown}" "$repo_root/deploy/compose.yaml" || fail 'runner build lacks engine provenance argument'
config_repo=$tmp/config-repo
git init -q "$config_repo"
Expand Down Expand Up @@ -318,6 +319,7 @@ mv "$host_config.missing" "$host_config"
second=$(expect_success "$installer" --install "${base_args[@]}" --ref "$ref_one")
grep -Fq 'NO_CHANGE' <<<"$second" || fail 'idempotent rerun changed the host'
expect_success "$installer" --check "${base_args[@]}" --ref "$ref_one" >/dev/null
[[ ! -d "$root/opt/ci-fleet/manager/releases/$engine_ref/templates/config-repository/scripts/__pycache__" ]] || fail 'manager validation wrote Python bytecode into the immutable release'
python3 - "$install_state" <<'PY'
import json
import sys
Expand Down