Skip to content

Commit

Permalink
The bats script for CI image is now placed in the docker folder
Browse files Browse the repository at this point in the history
The script was previously placed in scripts/ci which caused
a bit of a problem in 1-10-test branch where PRs were using
scripts/ci from the v1-10-test HEAD but they were missing
the ci script from the PR.

(cherry picked from commit 2a1be3c8408df708b675adbbc5edc734aa1dfc1c)
  • Loading branch information
potiuk committed Oct 3, 2020
1 parent 3025a0d commit 195f00d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
# Add those folders to the context so that they are available in the CI container
!scripts/in_container
!scripts/docker
!scripts/ci/dockerfiles/bats

# Add tests and kubernetes_tests to context.
!tests
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ RUN mkdir -p /opt/bats/lib/bats-file \
RUN echo "export PATH=/opt/bats/bin:${PATH}" >> /root/.bashrc

# Additional scripts for managing BATS addons
COPY scripts/ci/dockerfiles/bats/load.bash /opt/bats/lib/
COPY scripts/docker/load.bash /opt/bats/lib/
RUN chmod a+x /opt/bats/lib/load.bash


Expand Down
22 changes: 22 additions & 0 deletions scripts/docker/load.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
# shellcheck disable=SC1091
source "/opt/bats/lib/bats-support/load.bash"
# shellcheck disable=SC1091
source "/opt/bats/lib/bats-assert/load.bash"
# shellcheck disable=SC1091
source "/opt/bats/lib/bats-file/load.bash"

0 comments on commit 195f00d

Please sign in to comment.