1 Commits

Author SHA1 Message Date
AkshayJagadish-ne
1c03d404c7 Added support for optional nightly build 2020-10-06 15:34:55 -04:00
12 changed files with 164 additions and 2543 deletions

View File

@@ -2,11 +2,7 @@ name: Java Maven CI - TIP WLAN Cloud Master
on:
push:
branches:
- master
- 'release/**'
tags:
- '*'
branches: [ master ]
schedule:
# runs nightly build at 5AM
@@ -14,6 +10,7 @@ on:
jobs:
build:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
@@ -41,46 +38,16 @@ jobs:
password: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Configure maven settings.xml
run: cp .github/workflows/maven_settings_template.xml /home/runner/.m2/settings.xml
- name: Update version in pom.xml
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's/refs\/tags\/[v]//')
mvn -B --file wlan-cloud-root/pom.xml versions:set -DnewVersion=$VERSION
mvn -B --file wlan-cloud-root/pom.xml install # put new parent version into Maven cache
mvn -B --file wlan-cloud-root/pom.xml versions:revert # need to revert so that child modules are able to find its parent
mvn -B --file all-modules-build/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-opensync-controller/opensync-gateway-static-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-opensync-controller/opensync-gateway-cloud-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/all-cloud-and-opensync-gw-in-one-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/all-cloud-in-one-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/portal-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/prov-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/ssc-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/spc-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/port-forwarding-gateway-docker/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-services/schema-generator/pom.xml versions:update-parent -DparentVersion=[$VERSION]
mvn -B --file wlan-cloud-root/pom.xml versions:set -DnewVersion=$VERSION
- name: Updating commit file
run: |
TIMESTAMP=$(date +'%Y-%m-%d')
echo $TIMESTAMP
MVN_VERSION=$(grep "<version>" wlan-cloud-root/pom.xml |head -2|tail -1|cut -d '>' -f2|cut -d '<' -f 1)
mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout -f wlan-cloud-root/pom.xml
MVN_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout -f wlan-cloud-root/pom.xml)
echo $MVN_VERSION
echo date=$TIMESTAMP > wlan-cloud-base/base-container/src/main/resources/commit.properties
echo commitId=$GITHUB_SHA >> wlan-cloud-base/base-container/src/main/resources/commit.properties
echo projectVersion=$MVN_VERSION>> wlan-cloud-base/base-container/src/main/resources/commit.properties
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-opensync-controller/opensync-gateway-static-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-opensync-controller/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-opensync-controller/opensync-gateway-cloud-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/all-cloud-and-opensync-gw-in-one-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/all-cloud-and-opensync-gw-in-one-docker/src/main/docker-with-mqtt/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/all-cloud-in-one-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/portal-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/prov-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/ssc-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/spc-docker/src/main/docker/app/.
cp wlan-cloud-base/base-container/src/main/resources/commit.properties wlan-cloud-services/port-forwarding-gateway-docker/src/main/docker/app/.
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
@@ -156,3 +123,153 @@ jobs:
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
Nightlybuild:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.GH_AUTOMATION_KEY }}
submodules: true
- name: Checking if the last commit was more than 24 hrs
id: check
run: |
TimePassed=$(echo -e `git show --format="%ar" $branch | head -n 1`)
echo $TimePassed
if [[ $TimePassed == *"hour"* ]] || [[ "$TimePassed" == *"minute"* ]] || [[ $TimePassed == *"second"* ]]; then
echo "Last commit was less than 24 hours"
buildRequired=true
fi
echo ::set-output name=key::$buildRequired
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.GH_AUTOMATION_KEY }}
submodules: true
- name: Set up JDK 1.14
if: steps.check.outputs.key == 'true'
uses: actions/setup-java@v1
with:
java-version: 14
- name: maven version
if: steps.check.outputs.key == 'true'
run:
mvn -v
- name: Cache Maven packages
if: steps.check.outputs.key == 'true'
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2
- name: Login to TIP Docker registry
if: steps.check.outputs.key == 'true'
uses: azure/docker-login@v1
with:
login-server: tip-tip-wlan-cloud-docker-repo.jfrog.io
username: build-pipeline
password: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Configure maven settings.xml
if: steps.check.outputs.key == 'true'
run: cp .github/workflows/maven_settings_template.xml /home/runner/.m2/settings.xml
- name: Updating commit file
if: steps.check.outputs.key == 'true'
run: |
TIMESTAMP=$(date +'%Y-%m-%d')
echo $TIMESTAMP
mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout -f wlan-cloud-root/pom.xml
MVN_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout -f wlan-cloud-root/pom.xml)
echo $MVN_VERSION
echo date=$TIMESTAMP > wlan-cloud-base/base-container/src/main/resources/commit.properties
echo commitId=$GITHUB_SHA >> wlan-cloud-base/base-container/src/main/resources/commit.properties
echo projectVersion=$MVN_VERSION>> wlan-cloud-base/base-container/src/main/resources/commit.properties
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build with Maven - test
if: steps.check.outputs.key == 'true'
run:
mvn -B --file all-modules-build/pom.xml verify # Ensure all artifacts build successfully before we attempt deploy in order to prevent partial deploys.
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build with Maven - deploy artifacts
if: steps.check.outputs.key == 'true'
run:
mvn -B --file all-modules-build/pom.xml -DskipTests deploy # Now that all builds have completed, we can deploy all the artifacts.
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the static OpenSync gateway
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-opensync-controller/opensync-gateway-static-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the cloud OpenSync gateway
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-opensync-controller/opensync-gateway-cloud-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the all-cloud-and-opensync-gw-in-one process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/all-cloud-and-opensync-gw-in-one-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the all-cloud-in-one process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/all-cloud-in-one-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker image for the Portal process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/portal-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the Provisioning process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/prov-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the Scalable Service Container process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/ssc-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the Stream Processor process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/spc-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Build and deploy the docker images for the Port Forwarding Gateway process
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/port-forwarding-gateway-docker/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}
- name: Generate and push the cloud-sdk-schema
if: steps.check.outputs.key == 'true'
run:
mvn -B --file wlan-cloud-services/schema-generator/pom.xml deploy
env:
MAVEN_REPO_USERNAME: build-pipeline
MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }}

View File

@@ -4,8 +4,7 @@ Aggregation of repositories to simplify development environment.
Build instructions:
* make sure that java SDK 13+ is installed
* make sure maven is installed
* configure maven settings.xml with repository credentials:
copy [maven_settings_template.xml](https://github.com/Telecominfraproject/wlan-cloud-workspace/blob/master/.github/workflows/maven_settings_template.xml) into ~/.m2/settings.xml and replace ${env.MAVEN_REPO_USERNAME} / ${env.MAVEN_REPO_PASSWORD} with **tip-read**
* configure maven settings.xml with repository credentials
* $ git submodule update --init
* $ mvn -B --file all-modules-build/pom.xml clean install

View File

@@ -1,9 +1,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.telecominfraproject.wlan</groupId>
<artifactId>tip-wlan-cloud-root-pom</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../wlan-cloud-root</relativePath>
</parent>
@@ -20,7 +21,8 @@
</property>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<modules>
<module>../wlan-cloud-root</module>
<module>../wlan-cloud-base/base-build</module>
<module>../wlan-cloud-services/cloud-services-build</module>
<module>../wlan-cloud-opensync-controller/opensync-gateway-build</module>

View File

@@ -1,25 +0,0 @@
#!/bin/bash
if [ "x$1" == "x" ]
then
echo Usage: make_release.sh new_version
exit 1
fi
new_version=$1
PREVIOUS_VERSION=$(grep "<version>" ../wlan-cloud-root/pom.xml |head -2|tail -1|cut -d '>' -f2|cut -d '<' -f 1)
echo "Updating TIP pom.xml files from $PREVIOUS_VERSION to version $new_version "
# update versions on TIP modules using special all-modules-release
mvn --batch-mode release:update-versions -DdevelopmentVersion="$new_version" -DautoVersionSubmodules=true
# update version that are not automatically updated
sed -i '' "s/<tip-wlan-cloud.release.version>$PREVIOUS_VERSION<\/tip-wlan-cloud.release.version>/<tip-wlan-cloud.release.version>$new_version<\/tip-wlan-cloud.release.version>/g" ../wlan-cloud-root/pom.xml
#update protobuff dependency under opensync-ext-interface
sed -i '' "s/<version>$PREVIOUS_VERSION<\/version>/<version>$new_version<\/version>/g" ../wlan-cloud-opensync-controller/opensync-ext-interface/pom.xml
echo "Updated TIP pom.xml files to version $new_version"

View File

@@ -1,40 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.telecominfraproject.wlan</groupId>
<artifactId>tip-wlan-cloud-root-pom</artifactId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>../wlan-cloud-root</relativePath>
</parent>
<artifactId>tip-wlan-workspace-all-modules-release</artifactId>
<packaging>pom</packaging>
<description>Aggregation of all TIP modules - to release them in one shot.</description>
<profiles>
<profile>
<id>full-build</id>
<activation>
<property>
<name>full-build</name>
</property>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>../all-modules-build</module>
<module>../wlan-cloud-services/all-cloud-and-opensync-gw-in-one-docker</module>
<module>../wlan-cloud-services/all-cloud-in-one-docker</module>
<module>../wlan-cloud-services/all-cloud-in-one-docker-with-persistence</module>
<module>../wlan-cloud-services/port-forwarding-gateway-docker</module>
<module>../wlan-cloud-services/portal-docker</module>
<module>../wlan-cloud-services/prov-docker</module>
<module>../wlan-cloud-services/spc-docker</module>
<module>../wlan-cloud-services/ssc-docker</module>
<module>../wlan-cloud-opensync-controller/opensync-gateway-cloud-docker</module>
<module>../wlan-cloud-opensync-controller/opensync-gateway-static-docker</module>
</modules>
</profile>
</profiles>
</project>

View File

@@ -1,3 +0,0 @@
This collection comes with the required variables defined as it's environment. It is recommended that any variable alterations or settings are performed in the Variables section of the collection, and that no other environment is used simulataneously, as this can cause confusing errors.
Primary purpose of this collection is to facilitate creation of Hotspot profiles for application to an AP. Additional required configuration profiles are included.

File diff suppressed because one or more lines are too long