Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F49508843
build.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
build.sh
View Options
#!/bin/sh
# -------------------------------------------------------------
# Build and promote nasqueron-reports Python package
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: BSD-2-Clause
# Source file: roles/reports/reports/files/build.sh
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
set
-e
# -------------------------------------------------------------
# Virtual environment
#
# :: Initialize
# :: Build
# :: Clean up
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
tmp_venv
=
$(
mktemp
-d
-t
reports-build
)
python3
-m
venv
"
$tmp_venv
"
# shellcheck source=/dev/null
.
"
$tmp_venv
/bin/activate"
pip
install
--upgrade
pip
cd
/opt/nasqueron-reports/tools/nasqueron-reports
pip
install
-r
requirements.txt
pip
install
setuptools
build
python3
-m
build
deactivate
rm
-rf
"
$tmp_venv
"
# -------------------------------------------------------------
# Promote build
#
# :: Search .whl
# :: Copy to /dist
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
latest_package
=
$(
find
dist
-name
'*.whl'
|
sort
|
tail
-n1
)
if
[
-z
"
$latest_package
"
]
;
then
echo
"No build artifact found in dist/"
>
&
2
exit
1
fi
mkdir
-p
/opt/nasqueron-reports/dist
cp
"
$latest_package
"
/opt/nasqueron-reports/dist/nasqueron_reports-0.0.0.dev0-py3-none-any.whl
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Mon, Sep 14, 16:27 (2 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3943144
Default Alt Text
build.sh (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment