[docs] Limit git submodule recurse to depth 1
[releng.git] / jjb / openci / create-ane.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 ArtifactPublishedEvent
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 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', 'artifactLocation': '$ARTIFACT_LOCATION', 'confidenceLevel': { $CONFIDENCE_LEVEL } }"
22 EOF
23 echo "Constructed $PUBLISH_EVENT_TYPE"
24 echo "--------------------------------------------"
25 cat $WORKSPACE/event.properties
26 echo "--------------------------------------------"