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 ##############################################################################
14 # This script creates CompositionDefinedEvent
16 git clone https://gitlab.openci.io/openci/prototypes.git
17 cd prototypes/federated-cicd
18 virtualenv openci_publish
21 python setup.py install
24 cat <<EOF > ./json_body.txt
26 "type": "$PUBLISH_EVENT_TYPE",
28 "time": "$(date -u +%Y-%m-%d_%H:%M:%SUTC)",
29 "buildUrl": "$BUILD_URL",
31 "origin": "$PUBLISH_EVENT_ORIGIN",
32 "compositionName": "$DEPLOY_SCENARIO",
33 "compositionMetadataUrl": "$SCENARIO_METADATA_LOCATION"
37 # temporary: until we can embed credentials plugin
38 ACTIVEMQ_USER="openci"
39 ACTIVEMQ_PASSWORD="openciP@ssw0rd"
41 openci_publish -H 129.192.69.55 -U ${ACTIVEMQ_USER} -p ${ACTIVEMQ_PASSWORD} -n openci.prototype -B ./json_body.txt
43 echo "Constructed $PUBLISH_EVENT_TYPE"
44 echo "--------------------------------------------"
46 echo "--------------------------------------------"