Merge remote-tracking branch 'origin/main' into ruby3

This commit is contained in:
Rick Bradley 2022-08-08 16:13:37 -05:00
Родитель e434cabb50 5b3f5d9cba
Коммит b8b6ad541a
15 изменённых файлов: 65 добавлений и 25 удалений

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

@ -1,7 +1,7 @@
PATH
remote: .
specs:
entitlements (0.1.6)
entitlements-app (0.1.7)
concurrent-ruby (= 1.1.9)
contracts (= 0.17.0)
faraday (>= 0.17.3, < 0.18)
@ -46,7 +46,7 @@ GEM
sawyer (~> 0.8.0, >= 0.5.3)
optimist (3.0.0)
parallel (1.22.1)
parser (3.1.2.0)
parser (3.1.2.1)
ast (~> 2.4.1)
public_suffix (4.0.7)
rack (2.2.4)
@ -78,7 +78,7 @@ GEM
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.19.1)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
rubocop-github (0.17.0)
rubocop
@ -113,12 +113,11 @@ GEM
hashdiff
PLATFORMS
ruby
x86_64-darwin-21
DEPENDENCIES
debug (> 1.0.0)
entitlements!
entitlements-app!
rake (= 13.0.6)
rspec (= 3.8.0)
rspec-core (= 3.8.0)

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

@ -1 +1 @@
0.1.6
0.1.7

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

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

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

@ -1,7 +1,7 @@
# frozen_string_literal: true
Gem::Specification.new do |s|
s.name = "entitlements"
s.name = "entitlements-app"
s.version = File.read("VERSION").chomp
s.summary = "git-managed LDAP group configurations"
s.description = "The Ruby Gem that Powers Entitlements - GitHub's Identity and Access Management System"
@ -11,6 +11,7 @@ Gem::Specification.new do |s|
s.files = Dir.glob("lib/**/*") + %w[bin/deploy-entitlements VERSION]
s.homepage = "https://github.com/github/entitlements-app"
s.executables = %w[deploy-entitlements]
s.required_ruby_version = '~> 3.0'
s.add_dependency "concurrent-ruby", "= 1.1.9"
s.add_dependency "contracts", "= 0.17.0"

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

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

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

@ -1,7 +1,7 @@
#!/bin/bash
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
export APP_NAME="entitlements"
export APP_NAME="entitlements-app"
export GIT_SERVER_NAME="git-server"
export LDAP_SERVER_NAME="ldap-server"

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

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

40
script/release Executable file
Просмотреть файл

@ -0,0 +1,40 @@
#!/bin/bash
# Tag and push a release.
set -e
set -x
# Make sure we're in the project root.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd ${DIR}
# Build a new gem archive.
rm -rf entitlements-app-*.gem
gem build -q entitlements-app.gemspec
# Make sure we're on the main branch.
(git branch --no-color | grep -q '* main') || {
echo "Only release from the main branch."
exit 1
}
# Figure out what version we're releasing.
tag=v`ls entitlements-app-*.gem | sed 's/^entitlements-app-\(.*\)\.gem$/\1/'`
# Make sure we haven't released this version before.
git fetch -t origin
(git tag -l | grep -q "$tag") && {
echo "Whoops, there's already a '${tag}' tag."
exit 1
}
# Tag it and bag it.
gem push entitlements-app-*.gem && git tag "$tag" &&
git push origin main && git push origin "$tag"

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

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

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

@ -5,17 +5,17 @@ networks:
internal: true
services:
entitlements:
entitlements-app:
build:
context: "${DIR}"
dockerfile: "spec/acceptance/Dockerfile.entitlements"
dockerfile: "spec/acceptance/Dockerfile.entitlements-app"
networks:
ldap-network:
aliases:
- entitlements.fake
volumes:
- "${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:
entrypoint: /acceptance/git-server/run-server.sh
image: jkarlos/git-server-docker

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

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

Двоичные данные
vendor/cache/parser-3.1.2.0.gem поставляемый

Двоичный файл не отображается.

Двоичные данные
vendor/cache/parser-3.1.2.1.gem поставляемый Normal file

Двоичный файл не отображается.

Двоичные данные
vendor/cache/rubocop-ast-1.19.1.gem поставляемый

Двоичный файл не отображается.

Двоичные данные
vendor/cache/rubocop-ast-1.21.0.gem поставляемый Normal file

Двоичный файл не отображается.