From 7696fed0ce0979e82f33f725f214da9d1304b195 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Wed, 6 Oct 2021 06:15:23 +0000
Subject: [PATCH] L2SS-287: Automate package artificats for CI

---
 .gitignore     |  2 ++
 .gitlab-ci.yml | 16 +++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 7f249738c..af7bbfbee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,5 @@
 **/.project
 **/.pydevproject
 **/.settings/org.eclipse.core.resources.prefs
+**/dist
+**/.ipynb_checkpoints
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ca3a617c1..09b1b4ba9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,7 +5,7 @@ variables:
   PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
   # The PBR dependency requires a set version, not actually used
   # Instead `util/lofar_git.py:get_version()` is used.
-  PBR_VERSION: "0.1"
+  # PBR_VERSION: "0.1"
 cache:
   paths:
     - .cache/pip
@@ -15,6 +15,7 @@ stages:
   - static-analysis
   - unit-tests
   - integration-tests
+  - packaging
 newline_at_eof:
       stage: linting
       before_script:
@@ -73,3 +74,16 @@ integration_test:
     - export HOSTNAME=$(cat /run/systemd/netif/leases/2 | grep ^ADDRESS= | awk -F'=' '{print $2}')
     - echo $HOSTNAME
     - sudo $CI_PROJECT_DIR/sbin/run_integration_test.sh
+wheel_packaging:
+  stage: packaging
+  artifacts:
+    paths:
+      - devices/dist/*.whl
+  before_script:
+    - sudo apt-get update
+    - sudo apt-get install -y git
+    - pip3 install -r devices/test-requirements.txt
+    - pip3 install -r docker-compose/itango/lofar-requirements.txt
+  script:
+    - cd devices
+    - python setup.py bdist_wheel
-- 
GitLab