Commit 7a236c49 authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'staging' into 'main'

Staging

See merge request !15
parents 1e514c22 98c12959
Loading
Loading
Loading
Loading
Loading
+1 −0
Changes for README_pipy.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ The SDK supports both CAPIF roles: **Invoker** and **Provider**, and provides si

- [OpenCAPIF Release 1.0](https://ocf.etsi.org/documentation/v1.0.0-release/)
- [OpenCAPIF Release 2.0](https://ocf.etsi.org/documentation/v2.0.0-release/)
- [OpenCAPIF Release 3.0](https://ocf.etsi.org/documentation/v3.0.0-release/)

## Network App Developers

+10 −10
Changes for ci_cd_test/Dockerfile: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
FROM labs.etsi.org:5050/ocf/capif/python:3-slim-bullseye

RUN apt update
# Update package index and install required tools
RUN apt update && apt install -y git nano && \
    rm -rf /var/lib/apt/lists/*

ARG BRANCH=main

RUN echo "Cloning branch: ${BRANCH}" && \
    git clone -b ${BRANCH} https://labs.etsi.org/rep/ocf/sdk.git

WORKDIR /sdk

# Copy project files into the container
COPY .. .

# Install Python dependencies
RUN python -m pip install --upgrade pip
RUN pip install -r installation/requirements.txt
RUN pip install .

# Define entrypoint: run provider first, then invoker
ENTRYPOINT sh -c '\
  set -e && \
  echo "🚀 Ejecutando provider..." && \
  echo "🚀 Starting provider execution..." && \
  cd ci_cd_test/testing_samples/testing_provider_sample && \
  python testing_provider.py && \
  echo "✅ Provider finalizado." && \
  echo "🚀 Ejecutando invoker..." && \
  echo "✅ Provider execution finished." && \
  echo "🚀 Starting invoker execution..." && \
  cd ../testing_invoker_sample && \
  python network_app_invoker.py && \
  echo "✅ Invoker finalizado."'
 No newline at end of file
  echo "✅ Invoker execution finished."'
 No newline at end of file
+1 −1
Changes for ci_cd_test/clean_test_sdk.sh: 1 added line, 1 removed line.
Original line number Diff line number Diff line
#!/bin/bash

# Nombre del contenedor e imagen
#  Name of container image
CONTAINER_NAME=capif-sdk-runner
IMAGE_NAME=opencapif_sdk

+8 −5
Changes for ci_cd_test/test_sdk.sh: 8 added lines, 5 removed lines.
Original line number Diff line number Diff line
#!/bin/bash

# Nombre del contenedor e imagen
# Name of container image
CONTAINER_NAME=capif-sdk-runner
IMAGE_NAME=opencapif_sdk
BRANCH_NAME=SDK15-create-dockerfile-image-with-sdk
BRANCH_NAME=${CI_COMMIT_REF_NAME}
NETWORK_NAME=capif-network

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"

echo "🛠️ Building image: $IMAGE_NAME from branch: $BRANCH_NAME with no cache..."
docker build --no-cache . -t $IMAGE_NAME -f ci_cd_test/Dockerfile --build-arg BRANCH=$BRANCH_NAME
docker build --no-cache "$PROJECT_ROOT" -t $IMAGE_NAME -f "$SCRIPT_DIR/Dockerfile" --build-arg BRANCH=$BRANCH_NAME

echo "🚀 Running container: $CONTAINER_NAME in network: $NETWORK_NAME..."
docker run \
  --rm \
  --name $CONTAINER_NAME \
  --network $NETWORK_NAME \
  $IMAGE_NAME

echo "End"
echo "✅ End of script"
 No newline at end of file

cicd/exclusions

0 → 100644
+4 −0
Changes for cicd/exclusions: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
doc/
.git/
network_app_samples/
ci_cd_test/
 No newline at end of file
Loading