[docs] Limit git submodule recurse to depth 1
[releng.git] / jjb / openci / create-cde.sh
1 #!/bin/bash
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 ##############################################################################
10 set -o errexit
11 set -o nounset
12 set -o pipefail
13
14 # This script creates CompositionDefinedEvent
15 # The JMS Messaging Plugin doesn't handle the newlines well so the eventBody is
16 # constructed on a single line. This is something that needs to be fixed properly
17
18 cat << EOF > $WORKSPACE/event.properties
19 type=$PUBLISH_EVENT_TYPE
20 origin=$PUBLISH_EVENT_ORIGIN
21 scenario=$DEPLOY_SCENARIO
22 eventBody="{ 'type': '$PUBLISH_EVENT_TYPE', 'id': '$(uuidgen)', 'time': '$(date -u +%Y-%m-%d_%H:%M:%SUTC)', 'origin': '$PUBLISH_EVENT_ORIGIN', 'buildUrl': '$BUILD_URL', 'branch': 'master', 'compositionName': '$DEPLOY_SCENARIO', 'compositionMetadataUrl': '$SCENARIO_METADATA_LOCATION' }"
23 EOF
24 echo "Constructed $PUBLISH_EVENT_TYPE"
25 echo "--------------------------------------------"
26 cat $WORKSPACE/event.properties
27 echo "--------------------------------------------"