🔧 为 runner preset 显式设置系统 hostname
Ubuntu System Information / show-system-info (push) Successful in 0s
Details
Ubuntu System Information / show-system-info (push) Successful in 0s
Details
This commit is contained in:
parent
61e512c2ae
commit
173526be79
|
|
@ -2,6 +2,7 @@ services:
|
||||||
gitea-runner:
|
gitea-runner:
|
||||||
build: .
|
build: .
|
||||||
container_name: gitea-runner-buildx-archlinux
|
container_name: gitea-runner-buildx-archlinux
|
||||||
|
hostname: arch
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: "host" # 使用宿主机网络
|
network_mode: "host" # 使用宿主机网络
|
||||||
privileged: true # Buildx 需要 privileged 模式
|
privileged: true # Buildx 需要 privileged 模式
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ services:
|
||||||
gitea-runner:
|
gitea-runner:
|
||||||
build: .
|
build: .
|
||||||
container_name: gitea-runner-buildx-ubuntu-22
|
container_name: gitea-runner-buildx-ubuntu-22
|
||||||
|
hostname: ubuntu
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: "host" # 使用宿主机网络
|
network_mode: "host" # 使用宿主机网络
|
||||||
privileged: true # Buildx 需要 privileged 模式
|
privileged: true # Buildx 需要 privileged 模式
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ services:
|
||||||
gitea-runner:
|
gitea-runner:
|
||||||
build: .
|
build: .
|
||||||
container_name: gitea-runner-standard-ubuntu-22
|
container_name: gitea-runner-standard-ubuntu-22
|
||||||
|
hostname: ubuntu
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
network_mode: "host" # 使用宿主机网络
|
network_mode: "host" # 使用宿主机网络
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,12 @@ test_readme_is_navigation_focused() {
|
||||||
grep -q 'cp \.env\.example \.env' "${file}" || fail "README.md quick start should mention copying .env.example"
|
grep -q 'cp \.env\.example \.env' "${file}" || fail "README.md quick start should mention copying .env.example"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test_presets_define_expected_hostname() {
|
||||||
|
grep -q '^ hostname: ubuntu$' "${REPO_ROOT}/docker-runner/presets/standard-ubuntu-22/docker-compose.yml" || fail "standard preset should set hostname to ubuntu"
|
||||||
|
grep -q '^ hostname: ubuntu$' "${REPO_ROOT}/docker-runner/presets/buildx-ubuntu-22/docker-compose.yml" || fail "buildx ubuntu preset should set hostname to ubuntu"
|
||||||
|
grep -q '^ hostname: arch$' "${REPO_ROOT}/docker-runner/presets/buildx-archlinux/docker-compose.yml" || fail "buildx arch preset should set hostname to arch"
|
||||||
|
}
|
||||||
|
|
||||||
test_preset_env_examples_exist() {
|
test_preset_env_examples_exist() {
|
||||||
local file
|
local file
|
||||||
|
|
||||||
|
|
@ -101,6 +107,7 @@ test_workflow_docs_and_links_use_actual_paths
|
||||||
test_presets_do_not_mount_check_crlf_helper
|
test_presets_do_not_mount_check_crlf_helper
|
||||||
test_runner_data_is_gitignored
|
test_runner_data_is_gitignored
|
||||||
test_readme_is_navigation_focused
|
test_readme_is_navigation_focused
|
||||||
|
test_presets_define_expected_hostname
|
||||||
test_preset_env_examples_exist
|
test_preset_env_examples_exist
|
||||||
|
|
||||||
echo "template_defaults_test.sh: PASS"
|
echo "template_defaults_test.sh: PASS"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue