Skip to content
.gitlab-ci.yml 2.34 KiB
Newer Older
###############################################################################
publish-repository:
  # Builds the repository and pushes it to ftp site when a MR is accepted
  stage: deploy
  script:
    - DEBIAN_FRONTEND=noninteractive apt update
    - DEBIAN_FRONTEND=noninteractive apt install -y gcc git make python3 python3 python3-pip python3-pycurl python3-setuptools sshpass software-properties-common wget
Mark Beierl's avatar
Mark Beierl committed
    - git submodule init
    - git submodule update
Mark Beierl's avatar
Mark Beierl committed
    - git clone https://osm.etsi.org/gerrit/osm/osmclient.git
    - pip3 install -r osmclient/requirements.txt -r osmclient/requirements-dev.txt
Mark Beierl's avatar
Mark Beierl committed
    - pip3 install osmclient/
    - rm -rf osmclient/
    - ./generate-packages.sh
    - mkdir temp
    # - mv magma/* temp
    - mv *.tar.gz charm-packages/*.tar.gz temp
    - LC_ALL=C.UTF-8 LANG=C.UTF-8 osm -vvv repo-index --origin temp --destination vnf-catalog
    # - |
    #     sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P 29419 osmsupport@vnf-catalog.etsi.org << EOF
    #       put -r vnf-catalog/* Testing
    #     EOF
  rules:
    - if: '$CI_COMMIT_REF_PROTECTED == "true"'
      when: on_success

###############################################################################
build-local-repository:
  # Builds the repository locally but does not push if this is a new MR that
  # is still in development
  stage: build
  script:
    - DEBIAN_FRONTEND=noninteractive apt update
Mark Beierl's avatar
Mark Beierl committed
    - DEBIAN_FRONTEND=noninteractive apt install -y gcc git make python3 python3 python3-pip python3-pycurl python3-setuptools sshpass software-properties-common wget
Mark Beierl's avatar
Mark Beierl committed
    - git submodule init
    - git submodule update
Mark Beierl's avatar
Mark Beierl committed
    - git clone https://osm.etsi.org/gerrit/osm/osmclient.git
    - pip3 install -r osmclient/requirements.txt -r osmclient/requirements-dev.txt
Mark Beierl's avatar
Mark Beierl committed
    - pip3 install osmclient/
    - rm -rf osmclient/
    - ./generate-packages.sh
    - mkdir temp
    # - mv magma/* temp
    - mv *.tar.gz charm-packages/*.tar.gz temp
    - LC_ALL=C.UTF-8 LANG=C.UTF-8 osm -vvv repo-index --origin temp --destination vnf-catalog
    # - |
    #     sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P 29419 osmsupport@vnf-catalog.etsi.org << EOF
    #       put -r vnf-catalog/* Testing/Premerge
    #     EOF
  rules:
    - if: '$CI_COMMIT_REF_PROTECTED == "false"'
      when: on_success