Adjust docker paths to entitlements-app

This commit is contained in:
Rick Bradley 2022-08-08 15:02:22 -05:00
Родитель 17c6493b3a
Коммит 374a2b7ae2
6 изменённых файлов: 13 добавлений и 13 удалений

Просмотреть файл

@ -6,7 +6,7 @@ Your `entitlements-app` config `config/entitlements.yaml` runs through ERB inter
<%- <%-
unless ENV['CI_MODE'] unless ENV['CI_MODE']
begin begin
require_relative "/data/entitlements/lib/entitlements-and-plugins" require_relative "/data/entitlements-app/lib/entitlements-and-plugins"
rescue Exception rescue Exception
begin begin
require_relative "lib/entitlements-and-plugins" require_relative "lib/entitlements-and-plugins"

Просмотреть файл

@ -3,4 +3,4 @@ set -e
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
docker build -t entitlements -f spec/acceptance/Dockerfile.entitlements . docker build -t entitlements -f spec/acceptance/Dockerfile.entitlements .
docker run -w "/data/entitlements" entitlements bash -c "script/test" docker run -w "/data/entitlements-app" entitlements bash -c "script/test"

Просмотреть файл

@ -3,5 +3,5 @@ set -e
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
docker build -t entitlements -f spec/acceptance/Dockerfile.entitlements . docker build -t entitlements -f spec/acceptance/Dockerfile.entitlements .
docker run -w "/data/entitlements/" entitlements \ docker run -w "/data/entitlements-app/" entitlements \
bash -c "script/bootstrap && bin/rubocop "$@" lib/ spec/" bash -c "script/bootstrap && bin/rubocop "$@" lib/ spec/"

Просмотреть файл

@ -3,7 +3,7 @@ LABEL maintainer="GitHub Security Ops <opensource+entitlements-app@github.com>"
ENV HOME /root ENV HOME /root
ENV RELEASE=buster ENV RELEASE=buster
ENV container docker ENV container docker
WORKDIR /data/entitlements WORKDIR /data/entitlements-app
# Install dependency packages for bootstrapping and running... # Install dependency packages for bootstrapping and running...
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
@ -15,11 +15,11 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
RUN gem install bundler RUN gem install bundler
# Bootstrap files and caching for speed # Bootstrap files and caching for speed
COPY "vendor/cache/" "/data/entitlements/vendor/cache/" COPY "vendor/cache/" "/data/entitlements-app/vendor/cache/"
COPY "script/" "/data/entitlements/script/" COPY "script/" "/data/entitlements-app/script/"
COPY [".rubocop.yml", ".ruby-version", "entitlements.gemspec", "Gemfile", "Gemfile.lock", "VERSION", "/data/entitlements/"] COPY [".rubocop.yml", ".ruby-version", "entitlements.gemspec", "Gemfile", "Gemfile.lock", "VERSION", "/data/entitlements-app/"]
# Source Files # Source Files
COPY "bin/" "/data/entitlements/bin/" COPY "bin/" "/data/entitlements-app/bin/"
COPY "lib/" "/data/entitlements/lib/" COPY "lib/" "/data/entitlements-app/lib/"
COPY "spec/" "/data/entitlements/spec/" COPY "spec/" "/data/entitlements-app/spec/"

Просмотреть файл

@ -15,7 +15,7 @@ services:
- entitlements.fake - entitlements.fake
volumes: volumes:
- "${DIR}/spec/acceptance:/acceptance:ro" - "${DIR}/spec/acceptance:/acceptance:ro"
- "${DIR}/vendor/container-gems:/data/entitlements/vendor/gems:rw" - "${DIR}/vendor/container-gems:/data/entitlements-app/vendor/gems:rw"
git-server: git-server:
entrypoint: /acceptance/git-server/run-server.sh entrypoint: /acceptance/git-server/run-server.sh
image: jkarlos/git-server-docker image: jkarlos/git-server-docker

Просмотреть файл

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
export DIR="/data/entitlements" export DIR="/data/entitlements-app"
export SERVER="ldap-server.fake" export SERVER="ldap-server.fake"
begin_fold() { begin_fold() {
@ -99,7 +99,7 @@ if [ "$SUCCESS" -eq 0 ]; then
fi fi
export PATH="/usr/share/rbenv/shims:$PATH" export PATH="/usr/share/rbenv/shims:$PATH"
cd "/data/entitlements" cd "/data/entitlements-app"
FAILED_TEST=0 FAILED_TEST=0
for test in spec/acceptance/tests/*_spec.rb; do for test in spec/acceptance/tests/*_spec.rb; do
test_name=$(basename "$test" | sed -s 's/_spec\.rb$//') test_name=$(basename "$test" | sed -s 's/_spec\.rb$//')