+++ /dev/null
-#!/bin/bash
-
-set -e
-set -x
-
-./autogen.sh
-ROOT=/tmp/opflex-prefix
-./configure --prefix=$ROOT
-mkdir install-root
-DESTDIR=`pwd`/install-root make clean install
-pushd install-root
-tar -czf libuv.tgz *
-popd
+++ /dev/null
-#!/bin/bash
-# Build script for openvswitch
-
-set -e
-set -x
-
-ROOT=/tmp/opflex-prefix
-DESTDIR=install-root
-
-mkdir -p "$DESTDIR"
-
-./boot.sh
-./configure --prefix="$ROOT" --enable-shared
-make -j4
-DESTDIR=`pwd`/$DESTDIR make install
-find lib ofproto -name "*.h" -exec cp --parents -t "$DESTDIR/$ROOT/include/openvswitch/" {} \;
-
-pushd $DESTDIR
-tar -czf openvswitch.tgz *
-popd
+++ /dev/null
-#!/bin/bash
-# Build script for rapidjson
-
-set -e
-set -x
-
-ROOT=/tmp/opflex-prefix
-DESTDIR=install-root
-
-mkdir -p "$DESTDIR/$ROOT/lib/pkgconfig"
-mkdir -p "$DESTDIR/$ROOT/include"
-
-cp -R include/rapidjson "$DESTDIR/$ROOT/include"
-sed -e "s|@INCLUDE_INSTALL_DIR@|$ROOT/include|" \
- -e "s|@PROJECT_NAME@|RapidJSON|" \
- -e "s|@LIB_VERSION_STRING@|1.0.2|" RapidJSON.pc.in > \
- "$DESTDIR/$ROOT/lib/pkgconfig/RapidJSON.pc"
-
-pushd $DESTDIR
-tar -czf rapidjson.tgz *
+++ /dev/null
-#!/bin/bash
-# Build script for openvswitch
-
-set -e
-set -x
-
-ROOT=/tmp/opflex-prefix
-DESTDIR=install-root
-
-mkdir -p "$DESTDIR"
-
-./boot.sh
-./configure --prefix="$ROOT" --enable-shared
-make -j4
-DESTDIR=`pwd`/$DESTDIR make install
-
-# OVS headers get installed to weird and inconsistent locations. Try
-# to clean things up
-mkdir -p $DESTDIR/$ROOT/include/openvswitch/openvswitch
-mv $DESTDIR/$ROOT/include/openvswitch/*.h $DESTDIR/$ROOT/include/openvswitch/openvswitch
-mv $DESTDIR/$ROOT/include/openflow $DESTDIR/$ROOT/include/openvswitch
-cp -t "$DESTDIR/$ROOT/include/openvswitch/" include/*.h
-find lib -name "*.h" -exec cp --parents -t "$DESTDIR/$ROOT/include/openvswitch/" {} \;
-
-pushd $DESTDIR
-tar -czf openvswitch.tgz *
-popd
-
stream:
- oxygen:
branch: 'master'
- jdk: 'openjdk8'
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
- nitrogen:
branch: 'stable/nitrogen'
- jdk: openjdk8
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
- carbon:
branch: 'stable/carbon'
- jdk: openjdk8
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
- boron:
branch: 'stable/boron'
- jdk: openjdk8
+ libuv-version: '1.7.5'
+ rapidjson-version: '1.0.1'
+ openvswitch-version: 'noiro'
project: 'opflex'
archive-artifacts: '**/*.tar.gz'
-
-- builder:
- name: opflex-build
- builders:
- - maven-target:
- maven-version: 'mvn33'
- pom: genie/pom.xml
- goals: compile
- - copyartifact:
- project: opflex-libuv_tgz-{stream}
- flatten: true
- - copyartifact:
- project: opflex-rapidjson_tgz-{stream}
- flatten: true
- - copyartifact:
- project: opflex-openvswitch_tgz-{stream}
- flatten: true
- - shell: !include-raw-escape: opflex-build.sh
+ jdk: 'openjdk8'
- job-template:
name: 'opflex-verify-{stream}'
branch: '{branch}'
refspec: 'refs/heads/{branch}'
artifacts: '{archive-artifacts}'
+ - string:
+ name: LIBUV_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{libuv-version}'
+ description: 'libuv version'
+ - string:
+ name: RAPIDJSON_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{rapidjson-version}'
+ description: 'rapidjson version'
+ - string:
+ name: OPENVSWITCH_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{openvswitch-version}'
+ description: 'openvswitch-version'
scm:
- gerrit-trigger-scm:
branch: '{branch}'
refspec: 'refs/heads/{branch}'
artifacts: ''
+ - string:
+ name: LIBUV_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{libuv-version}'
+ description: 'libuv version'
+ - string:
+ name: RAPIDJSON_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{rapidjson-version}'
+ description: 'rapidjson version'
+ - string:
+ name: OPENVSWITCH_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{openvswitch-version}'
+ description: 'openvswitch version'
scm:
- gerrit-trigger-scm:
- project:
name: opflex-dependencies
jobs:
- - 'opflex-libuv_tgz-{stream}'
- - 'opflex-rapidjson_tgz-{stream}'
- - 'opflex-openvswitch_tgz-{stream}'
+ - 'opflex-libuv-{stream}'
+ - 'opflex-rapidjson-{stream}'
+ - 'opflex-openvswitch-{stream}'
+ # todo: remove 'ovs-scm' after boron EOL
stream:
- oxygen:
branch: 'master'
- libuv-build: v1
- libuv-scm: v2
- rapidjson-build: v1
- rapidjson-scm: v2
- openvswitch-build: v2
- openvswitch-scm: v2
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
+ ovs-scm: v2
- nitrogen:
branch: 'stable/nitrogen'
- libuv-build: v1
- libuv-scm: v2
- rapidjson-build: v1
- rapidjson-scm: v2
- openvswitch-build: v2
- openvswitch-scm: v2
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
+ ovs-scm: v2
- carbon:
branch: 'stable/carbon'
- libuv-build: v1
- libuv-scm: v2
- rapidjson-build: v1
- rapidjson-scm: v2
- openvswitch-build: v2
- openvswitch-scm: v2
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
+ ovs-scm: v2
- boron:
branch: 'stable/boron'
- libuv-build: v1
- libuv-scm: v1
- rapidjson-build: v1
- rapidjson-scm: v1
- openvswitch-build: v1
- openvswitch-scm: v1
+ libuv-version: '1.7.5'
+ rapidjson-version: '1.0.1'
+ openvswitch-version: 'noiro'
+ ovs-scm: v1
project: 'opflex'
-- scm:
- name: 'git-opflex-libuv-v1'
- scm:
- - git:
- url: https://github.com/libuv/libuv.git
- branches:
- - 'refs/tags/v1.7.5'
- wipe-workspace: true
-
-- scm:
- name: 'git-opflex-libuv-v2'
- scm:
- - git:
- url: https://github.com/libuv/libuv.git
- branches:
- - 'refs/tags/v1.8.0'
- wipe-workspace: true
-
-- scm:
- name: 'git-opflex-rapidjson-v1'
- scm:
- - git:
- url: https://github.com/miloyip/rapidjson.git
- branches:
- - 'refs/tags/v1.0.1'
- wipe-workspace: true
-
-- scm:
- name: 'git-opflex-rapidjson-v2'
- scm:
- - git:
- url: https://github.com/miloyip/rapidjson.git
- branches:
- - 'refs/tags/v1.0.2'
- wipe-workspace: true
-
-- scm:
- name: 'git-opflex-ovs-v1'
- scm:
- - git:
- url: https://github.com/noironetworks/ovs.git
- branches:
- - 'origin/noiro'
- wipe-workspace: true
-
-- scm:
- name: 'git-opflex-ovs-v2'
- scm:
- - git:
- url: https://github.com/openvswitch/ovs.git
- branches:
- - 'refs/tags/v2.6.0'
- wipe-workspace: true
-
-- builder:
- name: 'builder-opflex-libuv-v1'
- builders:
- - shell: !include-raw-escape: deps-inc-v1/libuv_tgz-build.sh
+ mvn-opts: ''
+ mvn-params: ''
+ mvn-version: mvn33
+
+ # common parameters required for 'lf-infra-deploy-maven-file' builder
+ repo-id: 'thirdparty'
+ upload-files-dir: '$WORKSPACE/upload_files'
- job-template:
- name: 'opflex-libuv_tgz-{stream}'
+ name: 'opflex-libuv-{stream}'
project-type: freestyle
node: centos7-java-builder-2c-8g
concurrent: true
+ group-id: 'libuv'
+
properties:
- opendaylight-infra-properties:
build-days-to-keep: '{build-days-to-keep}'
+ parameters:
+ - opendaylight-infra-parameters:
+ os-cloud: '{os-cloud}'
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+ - lf-infra-maven-parameters:
+ mvn-opts: '{mvn-opts}'
+ mvn-params: '{mvn-params}'
+ mvn-version: '{mvn-version}'
+ staging-profile-id: ''
+ - string:
+ name: LIBUV_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{libuv-version}'
+ description: 'libuv version'
+
scm:
- - git-opflex-libuv-{libuv-scm}
+ - git-opflex-libuv
wrappers:
- opendaylight-infra-wrappers:
build-timeout: '{build-timeout}'
builders:
- - builder-opflex-libuv-{libuv-build}
+ - opflex-build-libuv
+ - lf-infra-deploy-maven-file:
+ global-settings-file: 'global-settings'
+ settings-file: 'opflex-settings'
+ mvn-version: '{mvn-version}'
+ repo-id: '{repo-id}'
+ group-id: '{group-id}'
+ upload-files-dir: '{upload-files-dir}'
+ maven-repo-url: '$NEXUS_URL/content/repositories/thirdparty'
publishers:
- email-notification:
email-recipients: '{email-recipients}'
email-prefix: '[opflex]'
- - archive:
- artifacts: 'install-root/*.tgz'
-
-- builder:
- name: 'builder-opflex-rapidjson-v1'
- builders:
- - shell: !include-raw-escape: deps-inc-v1/rapidjson_tgz-build.sh
+ - lf-infra-publish
- job-template:
- name: 'opflex-rapidjson_tgz-{stream}'
+ name: 'opflex-rapidjson-{stream}'
project-type: freestyle
node: centos7-java-builder-2c-8g
concurrent: true
+ group-id: 'rapidjson'
+
properties:
- opendaylight-infra-properties:
build-days-to-keep: '{build-days-to-keep}'
+ parameters:
+ - opendaylight-infra-parameters:
+ os-cloud: '{os-cloud}'
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+ - lf-infra-maven-parameters:
+ mvn-opts: '{mvn-opts}'
+ mvn-params: '{mvn-params}'
+ mvn-version: '{mvn-version}'
+ staging-profile-id: ''
+ - string:
+ name: RAPIDJSON_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{rapidjson-version}'
+ description: 'rapidjson version'
+
scm:
- - git-opflex-rapidjson-{rapidjson-scm}
+ - git-opflex-rapidjson
wrappers:
- opendaylight-infra-wrappers:
build-timeout: '{build-timeout}'
builders:
- - builder-opflex-rapidjson-{rapidjson-build}
+ - opflex-build-rapidjson
+ - lf-infra-deploy-maven-file:
+ global-settings-file: 'global-settings'
+ settings-file: 'opflex-settings'
+ mvn-version: '{mvn-version}'
+ repo-id: '{repo-id}'
+ group-id: '{group-id}'
+ upload-files-dir: '{upload-files-dir}'
+ maven-repo-url: '$NEXUS_URL/content/repositories/thirdparty'
publishers:
- email-notification:
email-recipients: '{email-recipients}'
email-prefix: '[opflex]'
- - archive:
- artifacts: 'install-root/*.tgz'
-
-- builder:
- name: 'builder-opflex-openvswitch-v1'
- builders:
- - shell: !include-raw: deps-inc-v1/openvswitch_tgz-build.sh
-
-- builder:
- name: 'builder-opflex-openvswitch-v2'
- builders:
- - shell: !include-raw: deps-inc-v2/openvswitch_tgz-build.sh
+ - lf-infra-publish
- job-template:
- name: 'opflex-openvswitch_tgz-{stream}'
+ name: 'opflex-openvswitch-{stream}'
project-type: freestyle
node: centos7-java-builder-2c-8g
concurrent: true
+ group-id: 'openvswitch'
+
properties:
- opendaylight-infra-properties:
build-days-to-keep: '{build-days-to-keep}'
+ parameters:
+ - opendaylight-infra-parameters:
+ os-cloud: '{os-cloud}'
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+ - lf-infra-maven-parameters:
+ mvn-opts: '{mvn-opts}'
+ mvn-params: '{mvn-params}'
+ mvn-version: '{mvn-version}'
+ staging-profile-id: ''
+ - string:
+ name: OPENVSWITCH_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{openvswitch-version}'
+ description: 'openvswitch-version'
+
scm:
- - git-opflex-ovs-{openvswitch-scm}
+ - git-opflex-ovs-{ovs-scm}
wrappers:
- opendaylight-infra-wrappers:
build-timeout: '{build-timeout}'
builders:
- - builder-opflex-openvswitch-{openvswitch-build}
+ - opflex-build-openvswitch
+ - lf-infra-deploy-maven-file:
+ global-settings-file: 'global-settings'
+ settings-file: 'opflex-settings'
+ mvn-version: '{mvn-version}'
+ repo-id: '{repo-id}'
+ group-id: '{group-id}'
+ upload-files-dir: '{upload-files-dir}'
+ maven-repo-url: '$NEXUS_URL/content/repositories/thirdparty'
publishers:
- email-notification:
email-recipients: '{email-recipients}'
email-prefix: '[opflex]'
- - archive:
- artifacts: 'install-root/*.tgz'
+ - lf-infra-publish
--- /dev/null
+---
+# OpFlex macros
+
+- builder:
+ name: opflex-build
+ builders:
+ - maven-target:
+ maven-version: 'mvn33'
+ pom: genie/pom.xml
+ goals: compile
+ - shell: !include-raw-escape: scripts/opflex-build.sh
+
+- builder:
+ name: 'opflex-build-libuv'
+ builders:
+ - shell: !include-raw-escape: scripts/libuv-build.sh
+
+- builder:
+ name: 'opflex-build-openvswitch'
+ builders:
+ - shell: !include-raw: scripts/openvswitch-build.sh
+
+- builder:
+ name: 'opflex-build-rapidjson'
+ builders:
+ - shell: !include-raw-escape: scripts/rapidjson-build.sh
+
+- builder:
+ name: opflex-deploy-maven-file
+ # Todo: Remove this builder when the generic version of the builder is
+ # available in global-jjb. Change no: 5753
+ # Deploy artifacts to a repository.
+ #
+ # The builder requires passing the following parameters
+ # REPO_ID: Repository ID
+ # GROUP_ID: Group ID of the repository
+ # UPLOAD_FILES_PATH: Path to directory containing one or more files
+ builders:
+ - lf-maven-install:
+ mvn-version: '{mvn-version}'
+ - lf-provide-maven-settings:
+ global-settings-file: '{global-settings-file}'
+ settings-file: '{settings-file}'
+ - inject:
+ properties-content: |
+ MAVEN_REPO_URL=file://$WORKSPACE/m2repo
+ REPO_ID={repo-id}
+ GROUP_ID={group-id}
+ UPLOAD_FILES_PATH={upload-files-dir}
+ - shell: !include-raw-escape:
+ - ../global-jjb/shell/lftools-install.sh
+ - ../global-jjb/shell/common-variables.sh
+ - scripts/deploy-opflex.sh
+
+- builder:
+ name: opflex-maven-stage
+ # Todo: Migrate to the generic version of the builders available in
+ # global-jjb. Change no: 5753
+ # Stage files to Nexus repository.
+ #
+ # The builder requires passing the following parameters
+ # REPO_ID : Repository ID
+ # GROUP_ID : Group ID of the repository
+ # UPLOAD_FILES_PATH : Path to directory containing one or more files
+ # STAGING_PROFILE_ID : Staging profile id created on Nexus
+ builders:
+ - lf-provide-maven-settings:
+ global-settings-file: '{global-settings-file}'
+ settings-file: '{settings-file}'
+ - lf-infra-create-netrc:
+ server-id: opendaylight-staging
+ - inject:
+ properties-content: |
+ STAGING_PROFILE_ID={staging-profile-id}
+ - shell: !include-raw-escape:
+ - ../global-jjb/shell/lftools-install.sh
+ - ../global-jjb/shell/maven-stage.sh
+
+- scm:
+ name: 'git-opflex-libuv'
+ scm:
+ - git:
+ url: https://github.com/libuv/libuv.git
+ branches:
+ - 'refs/tags/v$LIBUV_VERSION'
+ wipe-workspace: true
+
+- scm:
+ name: 'git-opflex-ovs-v2'
+ scm:
+ - git:
+ url: https://github.com/openvswitch/ovs.git
+ branches:
+ - 'refs/tags/v$OPENVSWITCH_VERSION'
+ wipe-workspace: true
+
+# todo: remove 'git-opflex-ovs-v1' after boron EOL
+- scm:
+ name: 'git-opflex-ovs-v1'
+ scm:
+ - git:
+ url: https://github.com/noironetworks/ovs.git
+ branches:
+ - 'origin/noiro'
+ wipe-workspace: true
+
+- scm:
+ name: 'git-opflex-rapidjson'
+ scm:
+ - git:
+ url: https://github.com/miloyip/rapidjson.git
+ branches:
+ - 'refs/tags/v$RAPIDJSON_VERSION'
+ wipe-workspace: true
stream:
- oxygen:
branch: 'master'
- jdk: 'openjdk8'
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
- nitrogen:
branch: 'stable/nitrogen'
- jdk: openjdk8
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
- carbon:
branch: 'stable/carbon'
- jdk: openjdk8
+ libuv-version: '1.8.0'
+ rapidjson-version: '1.0.2'
+ openvswitch-version: '2.6.0'
- boron:
branch: 'stable/boron'
- jdk: openjdk8
+ libuv-version: '1.7.5'
+ rapidjson-version: '1.0.1'
+ openvswitch-version: 'origin/noiro'
project: 'opflex'
project-name: 'opflex'
+ jdk: 'openjdk8'
+
branch: master
global-settings-file: global-settings
settings-file: opflex-settings
# Used by the release job
staging-profile-id: 906b0d53d714e
-
-- builder:
- name: opflex-deploy-maven-file
- # Todo: Remove this builder when the generic version of the builder is
- # available in global-jjb. Change no: 5753
- # Deploy artifacts to a repository.
- #
- # The builder requires passing the following parameters
- # REPO_ID: Repository ID
- # GROUP_ID: Group ID of the repository
- # UPLOAD_FILES_PATH: Path to directory containing one or more files
- builders:
- - lf-maven-install:
- mvn-version: '{mvn-version}'
- - lf-provide-maven-settings:
- global-settings-file: '{global-settings-file}'
- settings-file: '{settings-file}'
- - inject:
- properties-content: |
- MAVEN_REPO_URL=file://$WORKSPACE/m2repo
- REPO_ID={repo-id}
- GROUP_ID={group-id}
- UPLOAD_FILES_PATH={upload-files-dir}
- - shell: !include-raw-escape:
- - ../global-jjb/shell/lftools-install.sh
- - ../global-jjb/shell/common-variables.sh
- - deploy-opflex.sh
-
-- builder:
- name: opflex-maven-stage
- # Todo: Migrate to the generic version of the builders available in
- # global-jjb. Change no: 5753
- # Stage files to Nexus repository.
- #
- # The builder requires passing the following parameters
- # REPO_ID : Repository ID
- # GROUP_ID : Group ID of the repository
- # UPLOAD_FILES_PATH : Path to directory containing one or more files
- # STAGING_PROFILE_ID : Staging profile id created on Nexus
- builders:
- - lf-provide-maven-settings:
- global-settings-file: '{global-settings-file}'
- settings-file: '{settings-file}'
- - lf-infra-create-netrc:
- server-id: opendaylight-staging
- - inject:
- properties-content: |
- STAGING_PROFILE_ID={staging-profile-id}
- - shell: !include-raw-escape:
- - ../global-jjb/shell/lftools-install.sh
- - ../global-jjb/shell/maven-stage.sh
-
- job-template:
name: 'opflex-release-{stream}'
mvn-params: '{mvn-params}'
mvn-version: '{mvn-version}'
staging-profile-id: '{staging-profile-id}'
+ - string:
+ name: LIBUV_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{libuv-version}'
+ description: 'libuv version to pull from thirdparty repository'
+ - string:
+ name: RAPIDJSON_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{rapidjson-version}'
+ description: 'rapidjson version to pull from thirdparty repository'
+ - string:
+ name: OPENVSWITCH_VERSION
+ # yamllint disable-line rule:line-length
+ default: '{openvswitch-version}'
+ description: 'openvswitch version to pull from thirdparty repository'
scm:
- gerrit-trigger-scm:
# $REPO_ID : Provided by a job parameter.
# $GROUP_ID : Provided by a job parameter.
# $UPLOAD_FILES_PATH : Provided by a job parameter.
-echo "---> deploy-opflex.sh"
+echo "---> scripts/deploy-opflex.sh"
# DO NOT enable -u because $MAVEN_PARAMS and $MAVEN_OPTIONS could be unbound.
# Ensure we fail the job if any steps fail.
--- /dev/null
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+echo "---> scripts/libuv-build.sh"
+
+set -e
+set -x
+
+./autogen.sh
+ROOT=/tmp/opflex-prefix
+./configure --prefix=$ROOT
+mkdir install-root
+DESTDIR=`pwd`/install-root make clean install
+pushd install-root
+tar -cvzf "libuv-$LIBUV_VERSION.tar.gz" *
+# Move tarball to dir of files that will be uploaded to Nexus
+UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
+mkdir -p "$UPLOAD_FILES_PATH"
+mv *.tar.gz "$_"
+popd
--- /dev/null
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+# Build script for openvswitch
+
+set -e
+set -x
+
+echo "---> scripts/openvswitch-build.sh"
+
+ROOT=/tmp/opflex-prefix
+DESTDIR=install-root
+
+mkdir -p "$DESTDIR"
+
+./boot.sh
+./configure --prefix="$ROOT" --enable-shared
+make -j4
+DESTDIR=`pwd`/$DESTDIR make install
+
+if [[ $OPENVSWITCH_VERSION =~ 2.6.0 ]]; then
+ mkdir -p $DESTDIR/$ROOT/include/openvswitch/openvswitch
+ mv $DESTDIR/$ROOT/include/openvswitch/*.h $DESTDIR/$ROOT/include/openvswitch/openvswitch
+ mv $DESTDIR/$ROOT/include/openflow $DESTDIR/$ROOT/include/openvswitch
+ cp -t "$DESTDIR/$ROOT/include/openvswitch/" include/*.h
+ find lib -name "*.h" -exec cp --parents -t "$DESTDIR/$ROOT/include/openvswitch/" {} \;
+elif [[ $OPENVSWITCH_VERSION =~ noiro ]]; then
+ find lib ofproto -name "*.h" -exec cp --parents -t "$DESTDIR/$ROOT/include/openvswitch/" {} \;
+fi
+
+pushd $DESTDIR
+tar -cvzf "openvswitch-$OPENVSWITCH_VERSION.tar.gz" *
+# Move tarball to dir of files that will be uploaded to Nexus
+UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
+mkdir -p "$UPLOAD_FILES_PATH"
+mv *.tar.gz "$_"
+popd
#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+echo "---> scripts/opflex-build.sh"
+
# Build script for opflex
set -e
mkdir -p "$ROOT"
trap cleanup EXIT
-tar -xz -C "$ROOT" --strip-components=2 -f libuv.tgz
-tar -xz -C "$ROOT" --strip-components=2 -f rapidjson.tgz
-tar -xz -C "$ROOT" --strip-components=2 -f openvswitch.tgz
+# Download the artifacts from nexus thirdparty
+wget -nv ${NEXUS_URL}/service/local/repositories/thirdparty/content/openvswitch/openvswitch/${OPENVSWITCH_VERSION}/openvswitch-${OPENVSWITCH_VERSION}.tar.gz
+wget -nv ${NEXUS_URL}/service/local/repositories/thirdparty/content/rapidjson/rapidjson/${RAPIDJSON_VERSION}/rapidjson-${RAPIDJSON_VERSION}.tar.gz
+wget -nv ${NEXUS_URL}/service/local/repositories/thirdparty/content/libuv/libuv/${LIBUV_VERSION}/libuv-${LIBUV_VERSION}.tar.gz
+
+tar -xz -C "$ROOT" --strip-components=2 -f libuv-${LIBUV_VERSION}.tar.gz
+tar -xz -C "$ROOT" --strip-components=2 -f rapidjson-${RAPIDJSON_VERSION}.tar.gz
+tar -xz -C "$ROOT" --strip-components=2 -f openvswitch-${OPENVSWITCH_VERSION}.tar.gz
export PATH="$ROOT/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$ROOT/lib"
--- /dev/null
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+echo "---> scripts/rapidjson-build.sh"
+
+# Build script for rapidjson
+
+set -e
+set -x
+
+ROOT=/tmp/opflex-prefix
+DESTDIR=install-root
+
+mkdir -p "$DESTDIR/$ROOT/lib/pkgconfig"
+mkdir -p "$DESTDIR/$ROOT/include"
+
+cp -R include/rapidjson "$DESTDIR/$ROOT/include"
+sed -e "s|@INCLUDE_INSTALL_DIR@|$ROOT/include|" \
+ -e "s|@PROJECT_NAME@|RapidJSON|" \
+ -e "s|@LIB_VERSION_STRING@|1.0.2|" RapidJSON.pc.in > \
+ "$DESTDIR/$ROOT/lib/pkgconfig/RapidJSON.pc"
+
+pushd $DESTDIR
+tar -cvzf "rapidjson-$RAPIDJSON_VERSION.tar.gz" *
+# Move tarball to dir of files that will be uploaded to Nexus
+UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
+mkdir -p "$UPLOAD_FILES_PATH"
+mv *.tar.gz "$_"
+popd