Commit 88b7e364 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF19-local-installation-of-capif-downloading-script' into 'staging'

Ocf19 local installation of capif downloading script

See merge request !18
parents 33ae3d84 614d40c7
Loading
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -23,6 +23,23 @@ This repository has the python-flask Mockup servers created with openapi-generat

Please refer to [OCF Documentation] for more detailed information.


# Install and Run 
### (to be added in Getting Started section of Documentation)
```
mkdir OpenCAPIF

cd OpenCAPIF

# The link must be changed when finally merged with the default branch and be permanent
wget https://labs.etsi.org/rep/ocf/capif/-/raw/OCF19-local-installation-of-capif-downloading-script/deploy.sh

chmod +x deploy.sh

# ./deploy.sh [branch to fetch] [true or false (default) to install monitoring stack or not]
./deploy.sh staging
```

## How to run CAPIF services in this Repository
Capif services are developed under /service/ folder.

deploy.sh

0 → 100644
+32 −0
Original line number Diff line number Diff line
#!/bin/sh

dirlocation=`pwd`/.
# If no argument is provided, use "main" as the default value
default_branch="main"
default_mon="false"
branch="${1:-$default_branch}"
monitoring="${2:-default_mon}"

echo "Selected branch: $branch"
echo "We're working with $dirlocation"
cd $dirlocation


updaterepo(){
        cd $dirlocation
        echo "Build " $1
        if [ ! -d $1 ]; then
                git clone https://labs.etsi.org/rep/ocf/$1.git
        fi

        cd $1/
        git checkout $branch
        git pull
}

updaterepo capif

cd $dirlocation
cd capif/services

./run.sh -m $monitoring
 No newline at end of file