I am new to juju,and i deployed two applications jenkins and git,

i am trying to add relation between the two charms,but i am not able to do. i was configured below file in hooks as blow.

$cat server-relation-joined
#!/bin/bash

set -eux
relation-set hostname=`unit-get private-address` public-address=`unit-get public-address`
root@myStation/git/hooks#


root@myStation/git/hooks# ls
config-changed  hooks.py  install  server-relation-joined  start  stop  upgrade-charm
root@myStation/git/hooks# vi server-relation-joined
root@myStation/git/hooks# cd ..
root@myStation/git# charm build
build: Composing into /root/charms/trusty/git
build: Please add a `repo` key to your layer.yaml, with a url from which your layer can be cloned.
build: Changed file owned by another layer: hooks/server-relation-joined
build: Unable to continue due to unexpected modifications (try --force)
root@myStation/git# cd ..
root@myStation# charm build
build: Composing into /root/charms/trusty
build: Destination charm directory: /root/charms/trusty/trusty/trusty
build: Please add a `repo` key to your layer.yaml, with a url from which your layer can be cloned.
build: The top level layer expects a valid layer.yaml file
build: Processing layer: trusty (from .)
build: At least one layer must provide metadata.yaml
root@myStation# ls

and from the jenkins side i was configured as below.

$ cat server-relation-changed
#!/bin/bash

set -eux

server_address=`relation-get hostname`

if [ -z "$server_address" ]; then
  juju-log "No data sent yet"
  exit 0
fi
$


root@myStation/git# vi metadata.yaml
root@myStation/git# charm  build
build: Composing into /root/charms/trusty/git
build: Please add a `repo` key to your layer.yaml, with a url from which your layer can be cloned.
build: The top level layer expects a valid layer.yaml file
build: Processing layer: git-server (from .)
proof: I: metadata name (git-server) must match directory name (git) exactly for local deployment.

is there anything i need to configure?

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.