import sys
import os
-try:
- __import__('imp').find_module('sphinx.ext.numfig')
- extensions = ['sphinx.ext.numfig']
-except ImportError:
- # 'pip install sphinx_numfig'
- extensions = ['sphinx_numfig']
+needs_sphinx = '1.3'
-# numfig:
-number_figures = True
-figure_caption_prefix = "Fig."
+numfig = True
source_suffix = '.rst'
master_doc = 'index'
project = u'Copper: Virtual Infrastructure Deployment Policies'
copyright = u'%s, OPNFV' % datetime.date.today().year
version = u'1.0.0'
-release = u'1.0.0'
\ No newline at end of file
+release = u'1.0.0'
failure-threshold: 'never'
unstable-threshold: 'FAILURE'
- trigger-builds:
- - project: 'yardstick-fuel-{stream}'
+ - project: 'yardstick-fuel-lf-{stream}'
block: true
block-thresholds:
build-step-failure-threshold: 'never'
cd $WORKSPACE
git clone https://gerrit.opnfv.org/gerrit/releng
-DOCKER_TAG=$($WORKSPACE/releng/utils/calculate_version.sh -t docker -n $DOCKER_IMAGE_NAME)
+DOCKER_TAG=$($WORKSPACE/releng/utils/calculate_version.sh -t docker \
+ -n $DOCKER_IMAGE_NAME)
ret_val=$?
if [ $ret_val -ne 0 ]; then
echo "Tag version to be build and pushed: $DOCKER_TAG"
fi
-# Remove previous running containers
-echo "Removing existing $DOCKER_IMAGE_NAME containers..."
+# Remove previous running containers if exist
if [[ ! -z $(docker ps -a | grep $DOCKER_IMAGE_NAME) ]]; then
- docker ps | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker stop &>/dev/null
- docker ps -a | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker rm &>/dev/null
+ echo "Removing existing $DOCKER_IMAGE_NAME containers..."
+ docker ps | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker stop
+ docker ps -a | grep $DOCKER_IMAGE_NAME | awk '{{print $1}}' | xargs docker rm
fi
-# Remove existing images
-echo "Removing existing $DOCKER_IMAGE_NAME images..."
+# list the images
+echo "Available images are:"
+docker images
+
+# Remove existing images if exist
if [[ ! -z $(docker images | grep $DOCKER_IMAGE_NAME) ]]; then
- docker images | grep $DOCKER_IMAGE_NAME | awk '{{print $3}}' | xargs docker rmi &>/dev/null
+ echo "Removing existing $DOCKER_IMAGE_NAME images..."
+ docker images | grep $DOCKER_IMAGE_NAME | awk '{{print $3}}' \
+ | xargs docker rmi -f
fi
# Start the build
echo "Building of $DOCKER_IMAGE_NAME:$DOCKER_TAG..."
-cd $WORKSPACE/functest/docker
+cd $WORKSPACE/docker
docker build -t $DOCKER_IMAGE_NAME:$DOCKER_TAG .
echo "Creating tag 'latest'..."
docker tag $DOCKER_IMAGE_NAME:$DOCKER_TAG $DOCKER_IMAGE_NAME:latest
echo "--------------------------------------------------------"
echo
# Push to the Dockerhub repository
- docker push -f $DOCKER_IMAGE_NAME:$DOCKER_TAG
+ docker push $DOCKER_IMAGE_NAME:$DOCKER_TAG
echo "Updating $DOCKER_IMAGE_NAME:latest to the docker registry..."
- docker push -f $DOCKER_IMAGE_NAME:latest
+ docker push $DOCKER_IMAGE_NAME:latest
fi
builders:
- shell: |
#! /bin/bash
- if [[ ! -f $HOME/opnfv-openrc.sh]]; then
+ if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
echo "Unable to access file $HOME/opnfv-openrc.sh"
exit 1
fi
builders:
- shell: |
#!/bin/bash
- if [[ ! -f $HOME/opnfv-openrc.sh]]; then
+ if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
echo "Unable to access file $HOME/opnfv-openrc.sh"
exit 1
fi
parameters:
- project-parameter:
project: '{project}'
+ - '{pod}-parameters'
+ - string:
+ name: POD_NAME
+ default: '{pod}'
+ description: "POD where the job runs"
- string:
name: INSTALLER_TYPE
default: '{installer_type}'
- shell:
!include-raw ../../utils/fetch_os_creds.sh
+########################
+# parameter macros
+########################
+- parameter:
+ name: 'ericsson-parameters'
+ parameters:
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
+
+- parameter:
+ name: 'lf-parameters'
+ parameters:
+ - string:
+ name: GIT_BASE
+ default: ssh://gerrit.opnfv.org:29418/$PROJECT
+ description: "URL for LF POD"
+
########################
# trigger macros
########################
- trigger:
- name: yardstick-trigger-ericsson
+ name: 'yardstick-trigger-ericsson'
triggers:
- timed: "@midnight"
+ - timed: '@midnight'
- trigger:
- name: yardstick-trigger-lf
+ name: 'yardstick-trigger-lf'
triggers:
- timed: "#@midnight"
+ - timed: '#@midnight'
done < <(find docs/ -name 'index.rst' -printf '%h\n' | sort -u )
for dir in "${{directories[@]}}"; do
+ _name="${{dir##*/}}"
+ _build="${{dir}}/build"
+ _output="docs/output/${{_name}}"
echo
- echo "#############################"
- echo "Building DOCS in ${{dir##*/}}"
- echo "#############################"
+ echo "#################${{_name//?/#}}"
+ echo "Building DOCS in ${{_name}}"
+ echo "#################${{_name//?/#}}"
echo
- if [[ ! -d docs/output/"${{dir##*/}}/" ]]; then
- mkdir -p docs/output/"${{dir##*/}}/"
- fi
+ mkdir -p "${{_output}}"
+
+ sphinx-build -b html -E -c docs/etc "${{dir}}" "${{_output}}"
- sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/"
+ sphinx-build -b latex -E -c docs/etc "${{dir}}" "${{_build}}"
+ make -C "${{_build}}" LATEXOPTS='--interaction=nonstopmode' all-pdf
+ mv "${{_build}}"/*.pdf "${{_output}}"
done