diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index e54791d..c0ef2a4 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -19,6 +19,12 @@ pipeline { } } } + post { + success { + dir('svc/dist') { + archiveArtifacts 'hudctrl-*' + } + } } stage('Build Frontend') { @@ -30,6 +36,11 @@ pipeline { } } post { + success { + dir('ui') { + archiveArtifacts 'hudctrl-ui.tar.gz' + } + } failure { dir('ui/npm_cache/_logs') { archiveArtifacts '*' diff --git a/ci/build-svc.sh b/ci/build-svc.sh index 83d575e..5f54156 100644 --- a/ci/build-svc.sh +++ b/ci/build-svc.sh @@ -1,7 +1,7 @@ #!/bin/sh -ex python -m venv .venv -.venv/bin/python -m pip install -U pip setuptools wheel -.venv/bin/python -m pip install poetry +.venv/bin/python -m pip install --no-cache-dir -U pip setuptools wheel +.venv/bin/python -m pip install --no-cache-dir poetry .venv/bin/poetry build diff --git a/ci/build-ui.sh b/ci/build-ui.sh index 4e2e0c1..efa857e 100644 --- a/ci/build-ui.sh +++ b/ci/build-ui.sh @@ -7,5 +7,8 @@ mkdir "${TEMP}" # Work around crazy performance issue in npm@7 / npm@8 mkdir node_modules -npm install +npm ci + npm run build +cd dist +find . -mindepth 1 -maxdepth 1 -printf '%P\0' | xargs -0 tar -czf ../hudctrl-ui.tar.gz