diff options
Diffstat (limited to 'jjb/opnfv')
-rw-r--r-- | jjb/opnfv/opnfv-docker.sh | 23 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-docs.yml | 6 | ||||
-rw-r--r-- | jjb/opnfv/opnfv-utils.yml | 40 | ||||
-rw-r--r-- | jjb/opnfv/slave-params.yml | 10 |
4 files changed, 49 insertions, 30 deletions
diff --git a/jjb/opnfv/opnfv-docker.sh b/jjb/opnfv/opnfv-docker.sh index c5edf7cc3..e637f7b32 100644 --- a/jjb/opnfv/opnfv-docker.sh +++ b/jjb/opnfv/opnfv-docker.sh @@ -59,7 +59,7 @@ if [[ "$UPDATE_LATEST_STABLE" == "true" ]]; then echo "ERROR: The image $DOCKER_REPO_NAME with tag $STABLE_TAG does not exist." exit 1 fi - docker tag -f $DOCKER_REPO_NAME:$STABLE_TAG $DOCKER_REPO_NAME:latest_stable + docker tag $DOCKER_REPO_NAME:$STABLE_TAG $DOCKER_REPO_NAME:latest_stable echo "Pushing $DOCKER_REPO_NAME:latest_stable ..." docker push $DOCKER_REPO_NAME:latest_stable exit 0 @@ -67,22 +67,9 @@ fi # cd to directory where Dockerfile is located -if [[ "$DOCKER_REPO_NAME" == "opnfv/bottlenecks" ]]; then - cd $WORKSPACE/ci/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/cperf" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/dovetail" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/functest" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/qtip" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/storperf" ]]; then - cd $WORKSPACE/docker -elif [[ "$DOCKER_REPO_NAME" == "opnfv/yardstick" ]]; then - cd $WORKSPACE/tests/ci/docker/yardstick-ci -else - echo "ERROR: DOCKER_REPO_NAME parameter not valid: $DOCKER_REPO_NAME" +cd $WORKSPACE/docker +if [ ! -f ./Dockerfile ]; then + echo "ERROR: Dockerfile not found." exit 1 fi @@ -119,7 +106,7 @@ else fi echo "Creating tag '$DOCKER_TAG'..." -docker tag -f $DOCKER_REPO_NAME:$DOCKER_BRANCH_TAG $DOCKER_REPO_NAME:$DOCKER_TAG +docker tag $DOCKER_REPO_NAME:$DOCKER_BRANCH_TAG $DOCKER_REPO_NAME:$DOCKER_TAG # list the images echo "Available images are:" diff --git a/jjb/opnfv/opnfv-docs.yml b/jjb/opnfv/opnfv-docs.yml index 743657334..0ac8aa7e0 100644 --- a/jjb/opnfv/opnfv-docs.yml +++ b/jjb/opnfv/opnfv-docs.yml @@ -14,11 +14,13 @@ stream: - master: branch: '{stream}' + doc-version: '' gs-pathname: '' disabled: false - colorado: branch: 'stable/{stream}' - gs-pathname: '/{stream}' + doc-version: '2.0' + gs-pathname: '/{stream}/{doc-version}' disabled: false ######################## @@ -82,7 +84,7 @@ - string: name: GS_URL default: '$GS_BASE{gs-pathname}' - description: "Directory where the build artifact will be located upon the completion of the build." + description: "Directory where the build artifact will be located upon the completion of the build." scm: - gerrit-trigger-scm: diff --git a/jjb/opnfv/opnfv-utils.yml b/jjb/opnfv/opnfv-utils.yml new file mode 100644 index 000000000..94a99d451 --- /dev/null +++ b/jjb/opnfv/opnfv-utils.yml @@ -0,0 +1,40 @@ +- project: + + name: opnfv-utils + + jobs: + - 'prune-docker-images' +######################## +# job templates +######################## +- job-template: + name: 'prune-docker-images' + + disabled: false + + concurrent: true + + parameters: + - node: + name: SLAVE_NAME + description: Slaves to prune docker images + default-slaves: + - arm-build1 + - arm-build2 + - ericsson-build4 + - ericsson-build5 + - lf-build2 + allowed-multiselect: true + ignore-offline-nodes: true + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - shell: | + #!/bin/bash + + (docker ps -q; docker ps -aq) | sort | uniq -u | xargs --no-run-if-empty docker rm + docker images -f dangling=true -q | xargs --no-run-if-empty docker rmi + + triggers: + - timed: '@midnight' diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml index ff24e9e6d..6cbaba4a5 100644 --- a/jjb/opnfv/slave-params.yml +++ b/jjb/opnfv/slave-params.yml @@ -239,16 +239,6 @@ name: GIT_BASE default: https://gerrit.opnfv.org/gerrit/$PROJECT description: 'Git URL to use on this Jenkins Slave' -- parameter: - name: 'infra-virtual-trusty-defaults' - parameters: - - label: - name: SLAVE_LABEL - default: 'infra-virtual-trusty' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: 'Git URL to use on this Jenkins Slave' ##################################################### # Parameters for build slaves ##################################################### |