pax_global_header 0000666 0000000 0000000 00000000064 14127331252 0014512 g ustar 00root root 0000000 0000000 52 comment=6952833b7a88e88571bac7dae00d91143ea7996a
test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/ 0000775 0000000 0000000 00000000000 14127331252 0020030 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/.codeclimate.yml 0000664 0000000 0000000 00000000066 14127331252 0023104 0 ustar 00root root 0000000 0000000 version: "2"
plugins:
sonar-java:
enabled: true
test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/.gitlab-ci.yml 0000664 0000000 0000000 00000007731 14127331252 0022474 0 ustar 00root root 0000000 0000000 image:
name: acscommunity/acs
entrypoint: [""]
sonarqube-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner
allow_failure: true
only:
- master # or the name of your main branch
#code_quality:
# services: # Shut off Docker-in-Docker
# tags:
# - cq-astri # Set this job to only run on our new specialized runner
#variables:
#CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.18"
# artifacts:
# paths: [gl-code-quality-report.json]
#code_quality_html:
# extends: code_quality
# variables:
# REPORT_FORMAT: html
# artifacts:
# paths: [gl-code-quality-report.html]
#secondpipe:
# trigger:
# include: secondpipe/.pipe.yml
#include:
# template: Jobs/Code-Quality.gitlab-ci.yml
#code_quality:
# variables:
# CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.18"
# artifacts:
# paths: [gl-code-quality-report.json]
#code_quality_html:
# extends: code_quality
# variables:
# REPORT_FORMAT: html
# artifacts:
# paths: [gl-code-quality-report.html]
#before_script:
##
## Install ssh-agent if not already installed, it is required by Docker.
## (change apt-get to yum if you use an RPM-based image)
##
#- 'command -v ssh-agent >/dev/null || ( yum install openssh-client -y )'
##
## Run ssh-agent (inside the build environment)
##
#- eval $(ssh-agent -s)
##
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
## We're using tr to fix line endings which makes ed25519 keys work
## without extra base64 encoding.
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
##
#- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
##
## Create the SSH directory and give it the right permissions
##
#- mkdir -p ~/.ssh
#- chmod 700 ~/.ssh
#- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
#- chmod 644 ~/.ssh/known_hosts
#- cat ~/.ssh/known_hosts
##
## Optionally, if you will be using any Git commands, set the user name and
## and email.
##
# - git config --global user.email "user@example.com"
# - git config --global user.name "User name"
#- ssh-add -l
#- git clone https://gitlab+deploy-token-4:xbVhzmdfzYd4eRuwH3G4@www.ict.inaf.it/gitlab/nicolo.parmiggiani/test_ci3.git
# - ls -la test_ci3
job:on-schedule:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
stage: build
script:
- echo "Hello, Scheduled job"
build-job:
rules:
- if: $CI_PIPELINE_SOURCE == "push"
stage: build
script:
- echo "Hello, $GITLAB_USER_LOGIN!"
test-job:
rules:
- if: $CI_PIPELINE_SOURCE == "push"
stage: test
script:
- echo "test 1"
#test-job1:
# stage: test
# script:
# - echo "This job tests something"
# - source /alma/ACS-2020AUG/ACSSW/config/.acs/.bash_profile.acs
# - acsStart
#test-job2:
# stage: test
# script:
# - echo "This job tests something, but takes more time than test-job1."
# - echo "After the echo commands complete, it runs the sleep command for 20 seconds"
# - echo "which simulates a test that runs 20 seconds longer than test-job1"
# - git clone https://www.ict.inaf.it/gitlab/astri/scada/tcs.git
#test-job3:
# stage: test
# script:
# - echo "This job tests something, but takes more time than test-job1."
# - echo "After the echo commands complete, it runs the sleep command for 20 seconds"
# - echo "which simulates a test that runs 20 seconds longer than test-job1"
# - git clone git@git.ia2.inaf.it:nicolo.parmiggiani/test_ci_2.git
# - ls -la
#deploy-prod:
# stage: deploy
# script:
# - echo "This job deploys something from the $CI_COMMIT_BRANCH branch."
test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/ 0000775 0000000 0000000 00000000000 14127331252 0023103 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/ 0000775 0000000 0000000 00000000000 14127331252 0023473 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/MACI/ 0000775 0000000 0000000 00000000000 14127331252 0024204 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/MACI/Components/ 0000775 0000000 0000000 00000000000 14127331252 0026331 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/MACI/Components/Components.xml 0000664 0000000 0000000 00000003234 14127331252 0031202 0 ustar 00root root 0000000 0000000
test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/MACI/Managers/ 0000775 0000000 0000000 00000000000 14127331252 0025741 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/MACI/Managers/Manager/ 0000775 0000000 0000000 00000000000 14127331252 0027313 5 ustar 00root root 0000000 0000000 Manager.xml 0000664 0000000 0000000 00000002341 14127331252 0031330 0 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/MACI/Managers/Manager
test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/alma/ 0000775 0000000 0000000 00000000000 14127331252 0024405 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/alma/simulated/ 0000775 0000000 0000000 00000000000 14127331252 0026374 5 ustar 00root root 0000000 0000000 SIM_ARRAYDATAHANDLER/ 0000775 0000000 0000000 00000000000 14127331252 0031333 5 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/alma/simulated SIM_ARRAYDATAHANDLER.xml 0000664 0000000 0000000 00000002727 14127331252 0035103 0 ustar 00root root 0000000 0000000 test_ci-6952833b7a88e88571bac7dae00d91143ea7996a/sag_supervisor/CDB/alma/simulated/SIM_ARRAYDATAHANDLER
from time import sleep
from Acspy.Nc.Supplier import Supplier
from Acspy.Nc.Consumer import Consumer
import SAG_CUSTOM_TYPES_MODULE
import SAG_CUSTOM_TYPES_MODULE__POA
logger=parameters[0].getLogger()
logger.logInfo("SIM_ARRAYDATAHANDLER component initialization")
setGlobalData("logger", logger)
sup = Supplier(SAG_CUSTOM_TYPES_MODULE.CHANNELNAME_ADH)
setGlobalData("sup", sup)
def adh_event_handler(event):
logger = getGlobalData("logger")
logger.logInfo("[SIM_ARRAYDATAHANDLER] New message received: " + str(event))
con = Consumer(SAG_CUSTOM_TYPES_MODULE.CHANNELNAME_ADH)
con.addSubscription(SAG_CUSTOM_TYPES_MODULE.SAGChannelEvent_TO_ADH, adh_event_handler)
con.consumerReady()
setGlobalData("con", con)
print('SIM_ARRAYDATAHANDLER component cleaning up')
getGlobalData("sup").disconnect()
<_corbaMethod Name="simulateDataSend" Timeout="0">
logger = getGlobalData("logger")
logger.logInfo("[SIM_ARRAYDATAHANDLER] simulateDataSend() called!")
sup = getGlobalData("sup")
for i in range(10):
event = SAG_CUSTOM_TYPES_MODULE.ChannelEvent_FROM_ADH("param1_mon", 888)
logger.logInfo('SIM_ARRAYDATAHANDLER publishing event..')
sup.publishEvent(simple_data=event)
sleep(1)
return True