| Dario Faccin | 602a4a5 | 2023-08-08 10:47:11 +0200 | [diff] [blame] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 | # you may not use this file except in compliance with the License. |
| 3 | # You may obtain a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 10 | # implied. |
| 11 | # See the License for the specific language governing permissions and |
| 12 | # limitations under the License. |
| 13 | ######################################################################################## |
| 14 | name: monitoring |
| 15 | summary: An image for OSM MON |
| 16 | description: | |
| 17 | OSM Monitoring image. |
| 18 | version: master_beta_1 # version format: <upstream-version>_<base-version>_<version> |
| 19 | license: Apache-2.0 |
| 20 | base: ubuntu:22.04 |
| 21 | platforms: |
| 22 | amd64: |
| 23 | |
| 24 | parts: |
| 25 | non-root-user: |
| 26 | plugin: nil |
| 27 | overlay-script: | |
| 28 | chroot ${CRAFT_OVERLAY} |
| 29 | mkdir -p /app/osm_mon |
| 30 | groupadd -g 1001 appuser |
| 31 | useradd -u 1001 -g 1001 -d /app appuser |
| 32 | chown -R appuser:appuser /app |
| 33 | |
| 34 | common: |
| 35 | source: https://osm.etsi.org/gerrit/osm/common.git |
| 36 | source-branch: master |
| 37 | plugin: python |
| 38 | python-requirements: |
| 39 | - requirements.txt |
| 40 | stage-packages: |
| 41 | - python3.10-venv |
| 42 | build-environment: |
| 43 | - PYTHONDONTWRITEBYTECODE: "1" # This does not work as expected, there is a bug and still not fixed. |
| 44 | # Workaround for conflicts related with the bug of PYTHONDONTWRITEBYTECODE |
| 45 | override-build: | |
| 46 | craftctl default |
| 47 | find "$CRAFT_PART_INSTALL" -name '*.pyc' -exec rm {} \; |
| 48 | stage: |
| 49 | - -bin/activate |
| 50 | - -bin/activate.csh |
| 51 | - -bin/activate.fish |
| 52 | - -lib/python3.10/site-packages/pip-23.2.1.dist-info/RECORD |
| 53 | - -lib/python3.10/site-packages/wheel-0.41.1.dist-info/RECORD |
| 54 | - -lib/python3.10/site-packages/charset_normalizer-3.1.0.dist-info/RECORD |
| 55 | |
| 56 | n2vc: |
| 57 | source: https://osm.etsi.org/gerrit/osm/N2VC.git |
| 58 | source-branch: master |
| 59 | plugin: python |
| 60 | python-requirements: |
| 61 | - requirements.txt |
| 62 | stage-packages: |
| 63 | - python3.10-venv |
| 64 | build-environment: |
| 65 | - PYTHONDONTWRITEBYTECODE: "1" # This does not work as expected, there is a bug and still not fixed. |
| 66 | # Workaround for conflicts related with the bug of PYTHONDONTWRITEBYTECODE |
| 67 | override-build: | |
| 68 | craftctl default |
| 69 | find "$CRAFT_PART_INSTALL" -name '*.pyc' -exec rm {} \; |
| 70 | stage: |
| 71 | - -bin/activate |
| 72 | - -bin/activate.csh |
| 73 | - -bin/activate.fish |
| 74 | - -lib/python3.10/site-packages/pip-23.2.1.dist-info/RECORD |
| 75 | - -lib/python3.10/site-packages/wheel-0.41.1.dist-info/RECORD |
| 76 | - -lib/python3.10/site-packages/charset_normalizer-3.1.0.dist-info/RECORD |
| 77 | |
| 78 | mon-startup-script: |
| 79 | plugin: dump |
| 80 | source: https://osm.etsi.org/gerrit/osm/MON.git |
| 81 | source-branch: master |
| 82 | organize: |
| 83 | docker/scripts/start.sh: app/osm_mon/start.sh |
| 84 | stage: |
| 85 | - app/osm_mon/start.sh |
| 86 | |
| 87 | mon: |
| 88 | source: https://osm.etsi.org/gerrit/osm/MON.git |
| 89 | source-branch: master |
| 90 | plugin: python |
| 91 | python-requirements: |
| 92 | - requirements.txt |
| 93 | stage-packages: |
| 94 | - python3.10-venv |
| 95 | build-packages: |
| 96 | - ca-certificates |
| 97 | - openssh-client |