2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018 Ericsson AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
16 # This script creates CompositionDefinedEvent
18 git clone https://gitlab.openci.io/openci/prototypes.git
19 cd prototypes/federated-cicd
20 virtualenv openci_publish
23 python setup.py install
26 cat <<EOF > ./json_body.txt
28 "type": "$PUBLISH_EVENT_TYPE",
30 "time": "$(date -u +%Y-%m-%d_%H:%M:%SUTC)",
31 "buildUrl": "$BUILD_URL",
33 "origin": "$PUBLISH_EVENT_ORIGIN",
34 "scenario": "$DEPLOY_SCENARIO",
35 "compositionName": "$DEPLOY_SCENARIO",
36 "compositionMetadataUrl": "$SCENARIO_METADATA_LOCATION"
40 echo "Constructed $PUBLISH_EVENT_TYPE"
41 echo "--------------------------------------------"
43 echo "--------------------------------------------"
45 python openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt