Skip to content

Commit 4718bb9

Browse files
committed
Add separate build and package scripts
1 parent aaa7766 commit 4718bb9

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

jenkins/build-indicator.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Jenkins build-and-package
4+
#
5+
6+
set -eo pipefail
7+
source ~/.bash_profile
8+
9+
# Vars
10+
local_indicator=$1
11+
12+
#
13+
# Build
14+
#
15+
16+
cd "${WORKSPACE}/${local_indicator}" || exit
17+
18+
# Set up venv
19+
python -m venv env
20+
source env/bin/activate
21+
pip install pip==23.0.1 --retries 10 --timeout 20
22+
pip install numpy --retries 10 --timeout 20
23+
pip install ../_delphi_utils_python/. --retries 10 --timeout 20
24+
[ ! -f setup.py ] || pip install . --retries 10 --timeout 20

jenkins/package-indicator.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Jenkins build-and-package
4+
#
5+
6+
set -eo pipefail
7+
source ~/.bash_profile
8+
9+
# Vars
10+
local_indicator=$1
11+
branch=$2
12+
13+
#
14+
# Package
15+
#
16+
17+
cd "${WORKSPACE}" || exit
18+
19+
# Create .tar.gz for deployment
20+
tar -czvf "${JENKINS_HOME}/artifacts/${branch}_${local_indicator}.tar.gz" "${local_indicator}"

0 commit comments

Comments
 (0)