#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

set -ex

# Install barbican devstack integration
if [ -z "$DEVSTACK_LOCAL_CONFIG" ]; then
    export DEVSTACK_LOCAL_CONFIG="enable_plugin barbican https://git.openstack.org/openstack/barbican"
fi

$BASE/new/devstack-gate/devstack-vm-gate.sh

#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

set -ex

$BASE/new/devstack-gate/devstack-vm-gate.sh

Remove setting DEVSTACK_LOCAL_CONFIG in test_hook.sh
Remove setting DEVSTACK_LOCAL_CONFIG in test_hook.sh

In the old version of the gates, we already set DEVSTACK_LOCAL_CONFIG
https://github.com/openstack-infra/project-config/blob/47d2d8e9ec952a2f9d71fe7ab51e8bfd2c20ca64/jenkins/jobs/barbican.yaml#L21

In the new (experimental) version of the gates (see
I68810330dbee4033f8198f39aba5b75cd3357399), we use thew new recommended
local_conf instead of DEVSTACK_LOCAL_CONFIG (see
http://lists.openstack.org/pipermail/openstack-dev/2017-February/112872.html)

When we use local_conf in the new gates, DEVSTACK_LOCAL_CONFIG is not
needed and is not set. Thus, when test_hook.sh also sets
"enable_plugin barbican" in DEVSTACK_LOCAL_CONFIG, DevStack attempts to
use both DEVSTACK_LOCAL_CONFIG and local_conf, and a duplicate config
error is thrown during the stacking.

Change-Id: Idd94b900b238c865a4074ec7d1f9c1c16ef8d434
