diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb04c05a8da9cad4fb90420595221e73b2dc6070..3a02bee73bb2785009e8d4dade4afd3128dab0b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,18 +8,23 @@ variables: RSYNC_SERVER: "vnf-catalog.etsi.org::rsyncosm/" RSYNC_USER: "osmsupport" ONDEMAND_DESTINATION_FOLDER: "Stable" + OSM_IM_VERSION: "master" ############################################################################### # Anchor definition with common commands ############################################################################### .default-script: &default_script - - apt update && apt install -y gcc git make python3 python3 python3-pip python3-pycurl python3-setuptools software-properties-common wget + - apt-get update && apt-get install -y gcc git make python3 python3 python3-pip python3-pycurl python3-setuptools software-properties-common wget curl libmagic1 - git submodule init - git submodule update - - git clone https://osm.etsi.org/gerrit/osm/osmclient.git - - pip3 install --user -r osmclient/requirements.txt -r osmclient/requirements-dev.txt - - pip3 install --user osmclient/ - - rm -rf osmclient/ + - git clone --filter=blob:none --tags https://osm.etsi.org/gerrit/osm/IM.git /tmp/osm-im + - git -C /tmp/osm-im fetch origin + - git -C /tmp/osm-im checkout ${OSM_IM_VERSION} + - pip install --no-cache-dir -r /tmp/osm-im/requirements.txt && \ + - pip install /tmp/osm-im + - export PATH=$HOME/.local/bin:${PATH} + - pip install -r "https://osm.etsi.org/gitweb/?p=osm/osmclient.git;a=blob_plain;f=requirements.txt;hb=master" + - pip install git+https://osm.etsi.org/gerrit/osm/osmclient.git@master#egg=osmclient - ./generate-packages.sh - mkdir temp # - mv magma/* temp @@ -50,7 +55,7 @@ publish-testing-repository: dependencies: - build-local-repository # Reuses artifacts generated in build los artefactos generados en build script: - - apt update && apt install -y sshpass + - apt-get update && apt-get install -y rsync - | set -e echo "Uploading catalog to Rsync server / Testing ..." @@ -71,7 +76,7 @@ publish-ondemand-repository: dependencies: - build-local-repository script: - - apt update && apt install -y sshpass + - apt-get update && apt-get install -y rsync - | set -e DESTINATION_FOLDER="${ONDEMAND_DESTINATION_FOLDER:-Stable}" @@ -82,4 +87,4 @@ publish-ondemand-repository: allow_failure: true environment: name: production - url: "https://osm.etsi.org/vnf-catalog/$DESTINATION_FOLDER" + url: "https://osm.etsi.org/vnf-catalog/${ONDEMAND_DESTINATION_FOLDER:-Stable}"