| workflow_payload |
name: Verify private memory restore mounts and abn name: Verify private memory restore mounts and abnormal cleanup with fixtures
"on":
workflow_dispatch:
jobs:
validate:
name: validate
runs-on: ubuntu-latest
if: github.repository == 'luoanwu/enterprise-platform'
steps:
- name: Verify fixed private fixture filesystems without changing production
run: |
set -eu
python3 <<'PY'
import ast,os,pathlib,re,subprocess
run=os.environ['GITHUB_RUN_ID'];sha=os.environ['GITHUB_SHA']
if not run.isdigit() or not re.fullmatch('[0-9a-f]{40}',sha):raise RuntimeError('FIXED_JOB_IDENTITY_REQUIRED')
work=pathlib.Path('/var/lib/eios-r1-maintenance')/('memory-fs-probe-'+run);work.mkdir(mode=0o700)
for name in ['probe-memory-restore-filesystems.py','memory-restore-mounts.py','memory-restore-layout.py','test-memory-restore-mounts.py','test-memory-restore-layout.py','window-support.py','run-memory-filesystem-probe.py']:
r=subprocess.run(['git','-c','safe.directory=/home/git/repositories/luoanwu/enterprise-platform.git','-c','core.hooksPath=/dev/null','-C','/home/git/repositories/luoanwu/enterprise-platform.git','show',sha+':ops/gitea-r1/'+name],capture_output=True,timeout=30)
if r.returncode:raise RuntimeError('FIXED_PRIVATE_FILESYSTEM_PROBE_SOURCE_REQUIRED')
ast.parse(r.stdout);(work/name).write_bytes(r.stdout)
for name in ['test-memory-restore-layout.py','test-memory-restore-mounts.py']:subprocess.run(['python3','-B',str(work/name)],check=True,timeout=30)
subprocess.run(['python3','-B',str(work/'run-memory-filesystem-probe.py')],check=True,timeout=300)
PY
shell: bash
timeout-minutes: "8"
permissions:
contents: read
... |