Loading ci_cd_test/Dockerfile +6 −9 Original line number Diff line number Diff line Loading @@ -4,24 +4,21 @@ RUN apt update 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 .. . RUN python -m pip install --upgrade pip RUN pip install -r installation/requirements.txt RUN pip install . ENTRYPOINT sh -c '\ set -e && \ echo "🚀 Ejecutando provider..." && \ echo "Executing provider..." && \ cd ci_cd_test/testing_samples/testing_provider_sample && \ python testing_provider.py && \ echo "✅ Provider finalizado." && \ echo "🚀 Ejecutando invoker..." && \ echo "✅ Provider finished." && \ echo "🚀 Executing invoker..." && \ cd ../testing_invoker_sample && \ python network_app_invoker.py && \ echo "✅ Invoker finalizado."' No newline at end of file echo "✅ Invoker finished."' No newline at end of file clean_test_sdk.sh→ci_cd_test/clean_test_sdk.sh +0 −0 File moved. View file test_sdk.sh→ci_cd_test/test_sdk.sh +6 −3 Original line number Diff line number Diff line Loading @@ -6,14 +6,17 @@ IMAGE_NAME=opencapif_sdk BRANCH_NAME=SDK15-create-dockerfile-image-with-sdk 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" Loading
ci_cd_test/Dockerfile +6 −9 Original line number Diff line number Diff line Loading @@ -4,24 +4,21 @@ RUN apt update 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 .. . RUN python -m pip install --upgrade pip RUN pip install -r installation/requirements.txt RUN pip install . ENTRYPOINT sh -c '\ set -e && \ echo "🚀 Ejecutando provider..." && \ echo "Executing provider..." && \ cd ci_cd_test/testing_samples/testing_provider_sample && \ python testing_provider.py && \ echo "✅ Provider finalizado." && \ echo "🚀 Ejecutando invoker..." && \ echo "✅ Provider finished." && \ echo "🚀 Executing invoker..." && \ cd ../testing_invoker_sample && \ python network_app_invoker.py && \ echo "✅ Invoker finalizado."' No newline at end of file echo "✅ Invoker finished."' No newline at end of file
test_sdk.sh→ci_cd_test/test_sdk.sh +6 −3 Original line number Diff line number Diff line Loading @@ -6,14 +6,17 @@ IMAGE_NAME=opencapif_sdk BRANCH_NAME=SDK15-create-dockerfile-image-with-sdk 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"