summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2024-01-12 22:31:10 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2024-01-12 22:31:10 +0100
commite0af39ff5937aa56c1e9c3af4b6589f4571316a9 (patch)
tree7c0fdd35524767234999d8b60ca371e75b55ac8c
parent4fe72d3acc00d372b2ab19239f24ddd2996366cf (diff)
Remove former docker build jobs
Change-Id: Ie8dbca74cfb68eaa3610a14b81cb1f53d95dc399 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--jjb/releng/opnfv-docker-custom.yaml111
-rw-r--r--jjb/releng/opnfv-docker.sh168
-rw-r--r--jjb/releng/opnfv-docker.yaml320
3 files changed, 0 insertions, 599 deletions
diff --git a/jjb/releng/opnfv-docker-custom.yaml b/jjb/releng/opnfv-docker-custom.yaml
deleted file mode 100644
index e564ab5ef..000000000
--- a/jjb/releng/opnfv-docker-custom.yaml
+++ /dev/null
@@ -1,111 +0,0 @@
----
-########################
-# Job configuration for opnfv-docker-custom
-########################
-- project:
-
- name: opnfv-docker-custom
-
- project: '{name}'
-
- jobs:
- - 'opnfv-docker-custom-verify-{stream}'
- - 'opnfv-docker-custom-merge-{stream}'
-
- stream:
- - master:
- branch: '{stream}'
- gs-pathname: ''
- disabled: false
- - danube:
- branch: 'stable/{stream}'
- gs-pathname: '/{stream}'
- disabled: false
-
-########################
-# job templates
-########################
-
-- job-template:
- name: 'opnfv-docker-custom-verify-{stream}'
-
- disabled: '{obj:disabled}'
-
- parameters:
- - project-parameter:
- project: $GERRIT_PROJECT
- branch: '{branch}'
-
- scm:
- - git-scm-gerrit
-
- triggers:
- - gerrit:
- server-name: 'gerrit.opnfv.org'
- trigger-on:
- - patchset-created-event:
- exclude-drafts: 'false'
- exclude-trivial-rebase: 'false'
- exclude-no-code-change: 'false'
- - draft-published-event
- - comment-added-contains-event:
- comment-contains-value: 'recheck'
- - comment-added-contains-event:
- comment-contains-value: 'reverify'
- projects:
- - project-compare-type: 'REG_EXP'
- project-pattern: 'disabled'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- file-paths:
- - compare-type: ANT
- pattern: 'docker/**'
-
- builders:
- - verify-docker
-
-- job-template:
- name: 'opnfv-docker-custom-merge-{stream}'
-
- disabled: '{obj:disabled}'
-
- parameters:
- - project-parameter:
- project: $GERRIT_PROJECT
- branch: '{branch}'
-
- scm:
- - git-scm
-
- triggers:
- - gerrit:
- server-name: 'gerrit.opnfv.org'
- trigger-on:
- - change-merged-event
- - comment-added-contains-event:
- comment-contains-value: 'remerge'
- projects:
- - project-compare-type: 'REG_EXP'
- project-pattern: 'disabled'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- file-paths:
- - compare-type: ANT
- pattern: 'docker/**'
-
- builders:
- - merge-docker
-
-- builder:
- name: verify-docker
- builders:
- - shell: |
- /bin/bash $WORKSPACE/verify-docker.sh
-
-- builder:
- name: merge-docker
- builders:
- - shell: |
- /bin/bash $WORKSPACE/merge-docker.sh
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh
deleted file mode 100644
index 50efaada3..000000000
--- a/jjb/releng/opnfv-docker.sh
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# Copyright (c) 2016 Ericsson AB and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -o errexit
-set -o nounset
-set -o pipefail
-
-
-echo "Using Docker $(docker --version) on $NODE_NAME"
-echo "Starting Docker build for $DOCKER_REPO_NAME ..."
-echo "--------------------------------------------------------"
-echo
-
-function remove_containers_images()
-{
- # Remove previous running containers if exist
- #
- # $ docker ps -a
- # CONTAINER ID IMAGE COMMAND ...
- # 6a796ed40b8e anuket/example-tasks:latest "/bin/bash" ...
- # 99fcb59f4787 anuket/example-tasks-base:latest "/bin/bash" ...
- # cc5eee16b995 anuket/example-tasks-k8s "/bin/bash" ...
- #
- # Cut image name by leading space and ending space or colon(tag)
- if [[ -n "$(docker ps -a | grep " $DOCKER_REPO_NAME[ :]")" ]]; then
- echo "Removing existing $DOCKER_REPO_NAME containers..."
- docker ps -a | grep " $DOCKER_REPO_NAME[ :]" | awk '{print $1}' | xargs docker rm -f
- t=60
- # Wait max 60 sec for containers to be removed
- while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep " $DOCKER_REPO_NAME[ :]")" ]]; do
- sleep 1
- let t=t-1
- done
- fi
-
-
- # Remove existing images if exist
- #
- # $ docker images
- # REPOSITORY TAG IMAGE ID ...
- # anuket/example-tasks latest 6501569fd328 ...
- # anuket/example-tasks-base latest 8764fe29c434 ...
- # anuket/example-tasks-k8s latest 61094cac9e65 ...
- #
- # Cut image name by start of line and ending space
- if [[ -n "$(docker images | grep "^$DOCKER_REPO_NAME ")" ]]; then
- echo "Docker images to remove:"
- docker images | head -1 && docker images | grep "^$DOCKER_REPO_NAME "
- image_ids=($(docker images | grep "^$DOCKER_REPO_NAME " | awk '{print $3}'))
- for id in "${image_ids[@]}"; do
- if [[ -n "$(docker images|grep "^$DOCKER_REPO_NAME "|grep $id)" ]]; then
- echo "Removing docker image $DOCKER_REPO_NAME:$id..."
- docker rmi -f $id
- fi
- done
- fi
-}
-
-
-count=30 # docker build jobs might take up to ~30 min
-while [[ -n `ps -ef| grep 'docker build' | grep $DOCKER_REPO_NAME | grep -v grep` ]]; do
- echo "Build or cleanup of $DOCKER_REPO_NAME in progress. Waiting..."
- sleep 60
- count=$(( $count - 1 ))
- if [ $count -eq 0 ]; then
- echo "Timeout. Aborting..."
- exit 1
- fi
-done
-
-# Remove the existing containers and images before building
-remove_containers_images
-
-DOCKER_PATH=$WORKSPACE/$DOCKER_DIR
-
-cd $DOCKER_PATH || exit 1
-HOST_ARCH="$(uname -m)"
-#If there is a patch for other arch then x86, apply the patch and
-#replace Dockerfile file
-dockerfile_patch="Dockerfile.${HOST_ARCH}.patch"
-if [[ -f "${dockerfile_patch}" ]]; then
- patch -f Dockerfile -p1 < "${dockerfile_patch}"
-fi
-
-# Get tag version
-echo "Current branch: $BRANCH"
-
-BUILD_BRANCH=$BRANCH
-
-GERRIT_REFNAME=${GERRIT_REFNAME:-''}
-RELEASE_VERSION=${GERRIT_REFNAME/refs\/tags\/}
-
-# If we're being triggered by a comment-added job, then extract the tag
-# from the comment and use that as the release version.
-# Expected comment format: retag anuket-x.y.z
-if [[ "${GERRIT_EVENT_TYPE:-}" == "comment-added" ]]; then
- RELEASE_VERSION=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'retag' | awk '{print $2}')
-fi
-
-if [[ "$BRANCH" == "master" ]]; then
- DOCKER_TAG="latest"
-fi
-
-if [[ "$BRANCH" =~ "stable" ]]; then
- DOCKER_TAG="stable"
-fi
-
-if [[ -n "${RELEASE_VERSION-}" ]]; then
- DOCKER_TAG=${RELEASE_VERSION}
- if git checkout ${RELEASE_VERSION}; then
- echo "Successfully checked out the git tag ${RELEASE_VERSION}"
- else
- echo "The tag ${RELEASE_VERSION} doesn't exist in the repository. Existing tags are:"
- git tag
- exit 1
- fi
-fi
-
-if [[ -n "${COMMIT_ID-}" && -n "${RELEASE_VERSION-}" ]]; then
- DOCKER_TAG=$RELEASE_VERSION
- BUILD_BRANCH=$COMMIT_ID
-fi
-
-ARCH_BUILD_ARG=""
-ARCH_TAG=${ARCH_TAG:-}
-if [[ -n "${ARCH_TAG}" ]]; then
- DOCKER_TAG=${ARCH_TAG}-${DOCKER_TAG}
- ARCH_BUILD_ARG="--build-arg ARCH=${ARCH_TAG}"
-fi
-
-EXTRA_BUILD_ARGS=${EXTRA_BUILD_ARGS:-}
-if [ -n "${EXTRA_BUILD_ARGS}" ]; then
- EXTRA_BUILD_ARGS=" "$(echo ${EXTRA_BUILD_ARGS})
- EXTRA_BUILD_ARGS=${EXTRA_BUILD_ARGS// / --build-arg }
-fi
-
-# Start the build
-echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG"
-echo "--------------------------------------------------------"
-echo
-cmd="docker build --pull=true --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH
- $ARCH_BUILD_ARG $EXTRA_BUILD_ARGS
- -f $DOCKERFILE $DOCKER_PATH"
-
-echo ${cmd}
-${cmd}
-
-
-# list the images
-echo "Available images are:"
-docker images
-
-# Push image to Dockerhub
-if [[ "$PUSH_IMAGE" == "true" ]]; then
- echo "Pushing $DOCKER_REPO_NAME:$DOCKER_TAG to the docker registry..."
- echo "--------------------------------------------------------"
- echo
- docker push $DOCKER_REPO_NAME:$DOCKER_TAG
-fi
-
-# Remove the existing containers and images after building
-remove_containers_images
diff --git a/jjb/releng/opnfv-docker.yaml b/jjb/releng/opnfv-docker.yaml
deleted file mode 100644
index d66561228..000000000
--- a/jjb/releng/opnfv-docker.yaml
+++ /dev/null
@@ -1,320 +0,0 @@
----
-##############################################
-# job configuration for docker build and push
-##############################################
-
-- project:
-
- name: opnfv-docker
-
- master: &master
- stream: master
- branch: '{stream}'
- disabled: false
- nile: &nile
- stream: nile
- branch: 'stable/{stream}'
- disabled: false
- laas-receivers: &laas_receivers
- receivers: >
- pberberian@iol.unh.edu
- sbergeron@iol.unh.edu
- samplevnf-receivers: &samplevnf-receivers
- receivers: >
- luc.provoost@intel.com
- yury.kylulin@intel.com
- vineperf-receivers: &vineperf-receivers
- receivers: >
- sridhar.rao@spirent.com
- cirv-receivers: &cirv-receivers
- receivers: >
- sridhar.rao@spirent.com
- parthyadav3105@gmail.com
- other-receivers: &other-receivers
- receivers: ''
-
- dockerfile: "Dockerfile"
- dockerdir: "docker"
- arch_tag: ""
- extra_build_args: ""
-
- # This is the dockerhub repo the image will be pushed to as
- # 'anuket/{dockerrepo}. See: DOCKER_REPO_NAME parameter.
- # 'project' is the OPNFV repo we expect to contain the Dockerfile
- # yamllint disable rule:key-duplicates
- dockerrepo:
- - 'barometer-collectd':
- project: 'barometer'
- dockerdir: 'docker/barometer-collectd'
- <<: *master
- <<: *other-receivers
- - 'barometer-collectd-experimental':
- project: 'barometer'
- dockerdir: '.'
- dockerfile: 'docker/barometer-collectd-experimental/Dockerfile'
- <<: *master
- <<: *other-receivers
- - 'barometer-collectd-latest':
- project: 'barometer'
- dockerdir: '.'
- dockerfile: 'docker/barometer-collectd-latest/Dockerfile'
- <<: *master
- <<: *other-receivers
- - 'barometer-dma':
- project: 'barometer'
- dockerdir: 'docker/barometer-dma'
- <<: *master
- <<: *other-receivers
- - 'barometer-grafana':
- project: 'barometer'
- dockerdir: 'docker/barometer-grafana'
- <<: *master
- <<: *other-receivers
- - 'barometer-influxdb':
- project: 'barometer'
- dockerdir: 'docker/barometer-influxdb'
- <<: *master
- <<: *other-receivers
- - 'barometer-kafka':
- project: 'barometer'
- dockerdir: 'docker/barometer-kafka'
- <<: *master
- <<: *other-receivers
- - 'barometer-ves':
- project: 'barometer'
- dockerdir: 'docker/barometer-ves'
- <<: *master
- <<: *other-receivers
- - 'barometer-snmp':
- project: 'barometer'
- dockerdir: 'docker/barometer-snmp'
- <<: *master
- <<: *other-receivers
- - 'nfvbench':
- project: 'nfvbench'
- <<: *master
- <<: *other-receivers
- - 'laas-dashboard':
- project: 'laas'
- dockerdir: '.'
- dockerfile: 'web/Dockerfile'
- <<: *master
- <<: *laas_receivers
- - 'laas-celery':
- project: 'laas'
- dockerdir: '.'
- dockerfile: 'worker/Dockerfile'
- <<: *master
- <<: *laas_receivers
- - 'rapid':
- project: 'samplevnf'
- dockerdir: 'VNFs/DPPD-PROX/helper-scripts/rapid'
- <<: *master
- <<: *samplevnf-receivers
- - 'vineperf':
- project: 'vineperf'
- dockerdir: 'tools/docker/vineperf'
- <<: *master
- <<: *vineperf-receivers
- - 'vineperf-prox':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/trafficgen-pods/prox'
- <<: *master
- <<: *vineperf-receivers
- - 'vineperf-trex':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/trafficgen-pods/trex'
- <<: *master
- <<: *vineperf-receivers
- - 'vineperf-pktgen':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/trafficgen-pods/pktgen'
- <<: *master
- <<: *vineperf-receivers
- - 'vineperf-l2l3fwd':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd'
- <<: *master
- <<: *vineperf-receivers
- - 'vineperf-vpp':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/dpdk-forwarding-pods/vpp'
- <<: *master
- <<: *vineperf-receivers
- - 'sdvconfig':
- project: 'cirv-sdv'
- dockerdir: 'sdv/docker/sdvconfig'
- <<: *master
- <<: *cirv-receivers
- - 'sdvmodel':
- project: 'cirv-sdv'
- dockerdir: 'sdv/docker/sdvmodel'
- <<: *master
- <<: *cirv-receivers
- - 'sdvsecurity':
- project: 'cirv-sdv'
- dockerdir: 'sdv/docker/sdvsecurity'
- <<: *master
- <<: *cirv-receivers
- - 'sdvstate':
- project: 'cirv-sdv'
- dockerdir: 'sdv/docker/sdvstate'
- <<: *master
- <<: *cirv-receivers
- - 'sdvurls':
- project: 'cirv-sdv'
- dockerdir: 'sdv/docker/sdvurls'
- <<: *master
- <<: *cirv-receivers
-
- # projects with jobs for nile
- - 'barometer-collectd':
- project: 'barometer'
- dockerdir: 'docker/barometer-collectd'
- <<: *nile
- <<: *other-receivers
- - 'barometer-collectd-experimental':
- project: 'barometer'
- dockerdir: '.'
- dockerfile: 'docker/barometer-collectd-experimental/Dockerfile'
- <<: *nile
- <<: *other-receivers
- - 'barometer-collectd-latest':
- project: 'barometer'
- dockerdir: '.'
- dockerfile: 'docker/barometer-collectd-latest/Dockerfile'
- <<: *nile
- <<: *other-receivers
- - 'barometer-dma':
- project: 'barometer'
- dockerdir: 'docker/barometer-dma'
- <<: *nile
- <<: *other-receivers
- - 'barometer-grafana':
- project: 'barometer'
- dockerdir: 'docker/barometer-grafana'
- <<: *nile
- <<: *other-receivers
- - 'barometer-influxdb':
- project: 'barometer'
- dockerdir: 'docker/barometer-influxdb'
- <<: *nile
- <<: *other-receivers
- - 'barometer-kafka':
- project: 'barometer'
- dockerdir: 'docker/barometer-kafka'
- <<: *nile
- <<: *other-receivers
- - 'barometer-ves':
- project: 'barometer'
- dockerdir: 'docker/barometer-ves'
- <<: *nile
- <<: *other-receivers
- - 'barometer-snmp':
- project: 'barometer'
- dockerdir: 'docker/barometer-snmp'
- <<: *nile
- <<: *other-receivers
- - 'vineperf':
- project: 'vineperf'
- dockerdir: 'tools/docker/vineperf'
- <<: *nile
- <<: *vineperf-receivers
- - 'vineperf-prox':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/trafficgen-pods/prox'
- <<: *nile
- <<: *vineperf-receivers
- - 'vineperf-trex':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/trafficgen-pods/trex'
- <<: *nile
- <<: *vineperf-receivers
- - 'vineperf-pktgen':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/trafficgen-pods/pktgen'
- <<: *nile
- <<: *vineperf-receivers
- - 'vineperf-l2l3fwd':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/dpdk-forwarding-pods/l2l3fwd'
- <<: *nile
- <<: *vineperf-receivers
- - 'vineperf-vpp':
- project: 'vineperf'
- dockerdir: 'tools/docker/test-containers/dpdk-forwarding-pods/vpp'
- <<: *nile
- <<: *vineperf-receivers
-
- # yamllint enable rule:key-duplicates
- jobs:
- - "{dockerrepo}-docker-build-push-{stream}"
-
-########################
-# job templates
-########################
-- job-template:
- name: '{dockerrepo}-docker-build-push-{stream}'
-
- disabled: '{obj:disabled}'
-
- parameters: &parameters
- - project-parameter:
- project: '{project}'
- branch: '{branch}'
- - 'opnfv-build-ubuntu-defaults'
- - string:
- name: PUSH_IMAGE
- default: "true"
- description: "To enable/disable pushing the image to Dockerhub."
- - string:
- name: DOCKER_REPO_NAME
- default: "anuket/{dockerrepo}"
- description: "Dockerhub repo to be pushed to."
- - string:
- name: DOCKER_DIR
- default: "{dockerdir}"
- description: "Directory containing files needed by the Dockerfile"
- - string:
- name: COMMIT_ID
- default: ""
- description: "commit id to make a snapshot docker image"
- - string:
- name: GERRIT_REFNAME
- default: ""
- description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1"
- - string:
- name: DOCKERFILE
- default: "{dockerfile}"
- description: "Dockerfile to use for creating the image."
- - string:
- name: ARCH_TAG
- default: "{arch_tag}"
- description: "If set, this value will be added to the docker image tag as a prefix"
- - string:
- name: EXTRA_BUILD_ARGS
- default: "{extra_build_args}"
- description: "Whitespace separated key=value pairs. If set, these args will be used to build docker image"
-
- properties:
- - throttle:
- max-per-node: 1
- option: 'project'
-
- scm:
- - git-scm
-
- builders: &builders
- - shell:
- !include-raw-escape: ./opnfv-docker.sh
-
- triggers:
- - pollscm:
- cron: "*/30 * * * *"
- - gerrit-trigger-tag-created:
- project: '{project}'
-
- publishers:
- - email:
- recipients: '{receivers}'
- - email-jenkins-admins-on-failure