Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Release v2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xlz-jbleclere committed Nov 30, 2020
1 parent 35c4ef0 commit 4222b07
Show file tree
Hide file tree
Showing 47 changed files with 3,413 additions and 975 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
* Mon Nov 30 2020 Accelize v2.5.1
- NEW: Support derived product feature (not yet activated at server side)
- NEW: Improve retry mechanism: make connection and request timeouts independent, increase timeout period, optimize resource, HTTP codes 495 and 526 are retryable
- NEW: Enhance API function behavior: "resume" function now start automatically a new session if the pending session has expired
- NEW: Enhance logging: Flush logger before API function returns, support of append/truncate mode, update spdlog library to v1.8.1
- NEW: Refactor automated CI jobs: run periodically health tests on the creation and the testing of packages
- NEW: Change prerelease directory for DEB and remove from documentation
- NEW: Enhance CI regression: more use cases, better code coverage, better reporting
- FIX: Metering corruption issue occurring with the pause/resume mechanism has been solved
- FIX: Better reporting of messages returned by xbutil
- FIX: Solve memory leak
- DOC: Update list of parameters, logo
- DOC: Correct file paths and names
- DOC: Add SDK and HDK migration sections
- DOC: Add uninstall section

* Wed Sep 09 2020 Accelize v2.5.0
- NEW: Add support of the asynchronous metering mechanism
- NEW: Include DRM Library settings in requests
Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cmake_minimum_required(VERSION 3.12)
# - Alpha : 1.0.0-alpha.1
# - Beta : 1.0.0-beta.1
# - Release candidate : 1.0.0-rc.1
set(ACCELIZEDRM_VERSION 2.5.0)
set(ACCELIZEDRM_VERSION 2.5.1)

## Define package release number (Number of time this version was packaged)
if (NOT CPACK_PACKAGE_RELEASE)
Expand Down Expand Up @@ -92,6 +92,8 @@ endif()
## Compiler and linker options
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_compile_options(-fvisibility=hidden)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
# Enable warnings
Expand Down Expand Up @@ -195,7 +197,7 @@ include_directories(internal_inc)
include_directories(include)
include_directories(spdlog/include)

## libaccelize_drm
## spdlog
set(TARGET_SOURCES
spdlog/src/fmt.cpp
spdlog/src/spdlog.cpp
Expand All @@ -209,9 +211,10 @@ set(TARGET_SOURCES
source/error.cpp
source/log.cpp
)

add_library(accelize_drm SHARED ${TARGET_SOURCES})
target_compile_options(accelize_drm PRIVATE -DSPDLOG_COMPILED_LIB)

## libaccelize_drm
set_target_properties(accelize_drm PROPERTIES VERSION ${ACCELIZEDRM_VERSION} SOVERSION ${ABI_VERSION})
target_link_libraries(accelize_drm ${CURL_LIBRARIES})
target_link_libraries(accelize_drm jsoncpp)
Expand Down
2 changes: 1 addition & 1 deletion deployment/acid
247 changes: 247 additions & 0 deletions deployment/azure-pipelines-health-create-pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
---
name: Health Test - Compile, test and package

trigger: none
schedules:
# Run tests on master branche weekly on Sundays, including packages build on all OS
- cron: "0 0 * * 0"
displayName: Weekly master build
branches:
include:
- master
always: true
# Run tests on dev branche weekly on Saturdays, including packages build on all OS
- cron: "0 0 * * 6"
displayName: Weekly dev build
branches:
include:
- dev
always: true
pr: none

resources:
repositories:
- repository: acid
type: github
name: Accelize/acid
endpoint: Accelize

pool:
vmImage: ubuntu-latest

variables:
# Import variable group
- group: drmLibrary

# Allow import of python files in "deployment" dir
- name: pythonPath
value: $(Build.SourcesDirectory)/deployment

# Common commands shortcut
- name: pipInstall
value: pip install --disable-pip-version-check
- name: aptInstall
value: sudo apt-get update &&
sudo apt-get install -y --no-install-recommends

stages:
- stage: compile_and_test
displayName: Compile sources and test on hardware
variables:
# Set Git branch conditional variables
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
meteringServer: prod
${{ if ne(variables['Build.SourceBranch'], 'refs/heads/master') }}:
meteringServer: dev

jobs:
- template: runTestOnEc2.yml
parameters:
instance_type: 'f1.4xlarge'
config_list:
- os_distrib: 'centos_7'
tox_mode: 'debug'
tox_coverage: false
- os_distrib: 'ubuntu_18_04'
tox_mode: 'debug'
tox_coverage: false
dependsOn: 'centos_7'

- stage: create_packages
displayName: Create packages
# Build packages only if tagged or scheduled
dependsOn: compile_and_test
condition: succeededOrFailed()
variables:
# File that store release number for each version
versionsJson: versions.json
versionsJsonS3: s3://accelize/versions.json

jobs:
- job: buildPackages
displayName: Build Packages for
strategy:
matrix:
# Supported OS matrix
CentOS 7:
osName: centos
osVersion: "7"
CentOS 8:
osName: centos
osVersion: "8"
Debian 10:
osName: debian
osVersion: "10"
Fedora 32:
osName: fedora
osVersion: "32"
Fedora 33:
osName: fedora
osVersion: "33"
Ubuntu LTS 16.04:
osName: ubuntu
osVersion: "16.04"
Ubuntu LTS 18.04:
osName: ubuntu
osVersion: "18.04"
Ubuntu LTS 20.04:
osName: ubuntu
osVersion: "20.04"
Ubuntu 20.10:
osName: ubuntu
osVersion: "20.10"

variables:
# Docker commands shortcuts
dockerBuild: sudo docker build -t run_image .
dockerRun: sudo -E docker run --rm
--env GPG_PASS_PHRASE
--env GPG_PRIVATE_KEY
--env GPG_PUBLIC_KEY
--env PACKAGES_RELEASE
-v $(Build.SourcesDirectory):/opt
-v $(Agent.TempDirectory):$(Agent.TempDirectory)
-w /opt run_image bash -c
steps:

# Initialize environment
- checkout: self
submodules: true

- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
addToPath: true
architecture: 'x64'
displayName: Get Python

# Get package release, and increment it if an already published
# version is re-build
- task: AWSCLI@1
displayName: Get published releases manifest
inputs:
awsCredentials: AWS-Repository
regionName: eu-west-1
awsCommand: s3
awsSubCommand: cp
awsArguments: $(versionsJsonS3) $(versionsJson) --no-progress

- task: PythonScript@0
displayName: Get package release
inputs:
scriptSource: inline
script: |
from acid import export
from acid_drm import get_next_package_release
export("release", get_next_package_release("versions.json"))
name: packagesRelease

# Build & sign packages
- task: PythonScript@0
displayName: Create "building" container Dockerfile
inputs:
scriptSource: inline
script: |
from acid import render_template
render_template(
src='$(Build.SourcesDirectory)/deployment/Dockerfile.j2',
dst='$(Build.SourcesDirectory)/Dockerfile',
osName='$(osName)', osVersion='$(osVersion)',
image='$(osName):$(osVersion)', buildLayer=True)
- script: $(dockerBuild)
displayName: Build "building" container image

- task: DownloadSecureFile@1
displayName: Get GPG public key
name: gpgPublicKey
inputs:
secureFile: gpgPublicKey

- task: DownloadSecureFile@1
displayName: Get GPG private key
name: gpgPrivateKey
inputs:
secureFile: gpgPrivateKey

- script: $(dockerRun) "tox --workdir /tmp -o
-e build-release,sign-release,export-release"
displayName: Build and sign packages
env:
PACKAGES_RELEASE: $(packagesRelease.release)
GPG_PRIVATE_KEY: $(gpgPrivateKey.secureFilePath)
GPG_PUBLIC_KEY: $(gpgPublicKey.secureFilePath)
GPG_PASS_PHRASE: $(gpgPassPhrase)

# Run packages integrity tests
- task: PythonScript@0
displayName: Create "testing" container Dockerfile
inputs:
scriptSource: inline
script: |
from acid import render_template
render_template(
src='$(Build.SourcesDirectory)/deployment/Dockerfile.j2',
dst='$(Build.SourcesDirectory)/Dockerfile',
osName='$(osName)', osVersion='$(osVersion)',
image='$(osName):$(osVersion)', buildLayer=False)
- script: $(dockerBuild)
displayName: Build "testing" container image

- script: $(dockerRun) "tox --workdir /tmp
-e package-install,c-install,cpp-install -p all
-- -m packages"
displayName: Run tests on package

# Run extra RHEL integrity tests for CentOS packages
- task: PythonScript@0
displayName: Create "RHEL testing" container Dockerfile
inputs:
scriptSource: inline
script: |
from acid import render_template
render_template(
src='$(Build.SourcesDirectory)/deployment/Dockerfile.j2',
dst='$(Build.SourcesDirectory)/Dockerfile',
osName='rhel', osVersion='$(osVersion)',
image='registry.access.redhat.com/ubi$(osVersion)',
rhelUsername='$(rhelUsername)',
rhelPassword='$(rhelPassword)',
buildLayer=False)
condition: eq(variables['osName'], 'centos')

- script: $(dockerBuild)
displayName: Build "RHEL testing" container image
condition: eq(variables['osName'], 'centos')

- script: $(dockerRun) "tox --workdir /tmp
-e package-install,c-install,cpp-install -p all
-- -m packages"
displayName: Run RHEL tests on packages
condition: eq(variables['osName'], 'centos')

# Export packages as artifacts
- publish: $(Build.SourcesDirectory)/packages
artifact: Packages $(osName) $(osVersion)
displayName: Publish packages as artifacts
38 changes: 38 additions & 0 deletions deployment/azure-pipelines-health-test-pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: DRM Library - Health Test - Install and test packages

trigger: none
schedules:
# Run tests from Production package daily
- cron: "0 0 * * *"
displayName: Daily midnight test of Production packages
branches:
include:
- master
always: true
pr: none

resources:
repositories:
- repository: acid
type: github
name: Accelize/acid
endpoint: Accelize

pool:
vmImage: ubuntu-latest

variables:
# Import variable group
- group: drmLibrary

jobs:
- template: runTestFromPkgOnEc2.yml
parameters:
instance_type: 'f1.4xlarge'
config_list:
- os_distrib: 'centos_7'
tox_extra_option: '-m minimum'
- os_distrib: 'ubuntu_18_04'
tox_extra_option: '-m minimum'
dependsOn: 'centos_7'
Loading

0 comments on commit 4222b07

Please sign in to comment.