Merge branch 'main' into main
This commit is contained in:
Коммит
0547095a39
|
@ -6,18 +6,19 @@ on:
|
|||
- main
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# Detects changes to any of the source files for entitlements-app
|
||||
changes:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
outputs:
|
||||
has_change: ${{ steps.diff.outputs.has_change}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- id: fetch-base
|
||||
if: github.event_name == 'pull_request'
|
||||
|
@ -56,9 +57,7 @@ jobs:
|
|||
name: runner / acceptance-tests
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [ '2.7.5', '3.1.2' ]
|
||||
permissions:
|
||||
contents: read
|
||||
ruby: [ '2.7.5', '3.1.2', '3.2.2', '3.3.0' ]
|
||||
|
||||
steps:
|
||||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
|
||||
|
@ -74,7 +73,7 @@ jobs:
|
|||
|
||||
- name: checkout
|
||||
if: ${{ needs.changes.outputs.has_change == 'true' }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Use Docker layer caching for 'docker build' and 'docker-compose build' commands.
|
||||
# https://github.com/satackey/action-docker-layer-caching/releases/tag/v0.0.11
|
||||
|
|
|
@ -15,11 +15,15 @@ permissions:
|
|||
jobs:
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
|
||||
with:
|
||||
|
|
|
@ -9,14 +9,15 @@ on:
|
|||
schedule:
|
||||
- cron: '25 4 * * 5'
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -25,7 +26,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
|
|
@ -6,19 +6,20 @@ on:
|
|||
- main
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
rubocop:
|
||||
name: runner / rubocop
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [ '2.7.5', '3.1.2' ]
|
||||
permissions:
|
||||
contents: read
|
||||
ruby: [ '2.7.5', '3.1.2', '3.2.2', '3.3.0' ]
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
|
||||
with:
|
||||
|
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
|
||||
with:
|
||||
|
|
|
@ -6,19 +6,20 @@ on:
|
|||
- main
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
rubocop:
|
||||
name: runner / rspec
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: [ '2.7.5', '3.1.2' ]
|
||||
permissions:
|
||||
contents: read
|
||||
ruby: [ '2.7.5', '3.1.2', '3.2.2', '3.3.0' ]
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- uses: ruby/setup-ruby@250fcd6a742febb1123a77a841497ccaa8b9e939 # pin@v1.152.0
|
||||
with:
|
||||
|
|
|
@ -17,3 +17,5 @@ coverage/*
|
|||
|
||||
# Ignore JetBrains IDEs
|
||||
.idea
|
||||
|
||||
tmp/
|
||||
|
|
|
@ -5,7 +5,7 @@ inherit_gem:
|
|||
AllCops:
|
||||
SuggestExtensions: false
|
||||
DisplayCopNames: true
|
||||
TargetRubyVersion: 3.1.2
|
||||
TargetRubyVersion: 3.3.0
|
||||
Exclude:
|
||||
- 'bin/*'
|
||||
- 'vendor/**/*'
|
||||
|
|
|
@ -1 +1 @@
|
|||
3.1.2
|
||||
3.3.0
|
||||
|
|
|
@ -94,7 +94,7 @@ GEM
|
|||
rubocop (>= 1.7.0, < 2.0)
|
||||
ruby-progressbar (1.13.0)
|
||||
ruby2_keywords (0.0.5)
|
||||
rugged (0.27.5)
|
||||
rugged (1.7.2)
|
||||
sawyer (0.9.2)
|
||||
addressable (>= 2.3.5)
|
||||
faraday (>= 0.17.3, < 3)
|
||||
|
@ -126,7 +126,7 @@ DEPENDENCIES
|
|||
rubocop (= 1.29.1)
|
||||
rubocop-github (= 0.17.0)
|
||||
rubocop-performance (= 1.13.3)
|
||||
rugged (= 0.27.5)
|
||||
rugged (~> 1.7, >= 1.7.2)
|
||||
simplecov (= 0.16.1)
|
||||
simplecov-erb (= 1.0.1)
|
||||
vcr (= 4.0.0)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require_relative "lib/version"
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = ENV["GEM_NAME"] ? ENV["GEM_NAME"] : "entitlements-app"
|
||||
s.name = ENV["GEM_NAME"] || "entitlements-app"
|
||||
s.version = Entitlements::Version::VERSION
|
||||
s.summary = "git-managed LDAP group configurations"
|
||||
s.description = "The Ruby Gem that Powers Entitlements - GitHub's Identity and Access Management System"
|
||||
|
@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency "rubocop", "= 1.29.1"
|
||||
s.add_development_dependency "rubocop-github", "= 0.17.0"
|
||||
s.add_development_dependency "rubocop-performance", "= 1.13.3"
|
||||
s.add_development_dependency "rugged", "= 0.27.5"
|
||||
s.add_development_dependency "rugged", "~> 1.7", ">= 1.7.2"
|
||||
s.add_development_dependency "simplecov", "= 0.16.1"
|
||||
s.add_development_dependency "simplecov-erb", "= 1.0.1"
|
||||
s.add_development_dependency "vcr", "= 4.0.0"
|
||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
|
|
@ -1,14 +1,54 @@
|
|||
#!/bin/bash
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -e
|
||||
# COLORS
|
||||
OFF='\033[0m'
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
BLUE='\033[0;34m'
|
||||
PURPLE='\033[0;35m'
|
||||
|
||||
set -e # Prevent any kind of script failures
|
||||
|
||||
# if any of the following env vars are set, use them for the APP_ENV value
|
||||
if [ -n "$APP_ENV" ]; then
|
||||
export APP_ENV="$APP_ENV"
|
||||
elif [ -n "$ENV" ]; then
|
||||
export APP_ENV="$ENV"
|
||||
elif [ -n "$ENVIRONMENT" ]; then
|
||||
export APP_ENV="$ENVIRONMENT"
|
||||
elif [ -n "$RAILS_ENV" ]; then
|
||||
export APP_ENV="$RAILS_ENV"
|
||||
elif [ -n "$RACK_ENV" ]; then
|
||||
export APP_ENV="$RACK_ENV"
|
||||
fi
|
||||
|
||||
# set the working directory to the root of the project
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
||||
cd "$DIR"
|
||||
|
||||
export PATH=/usr/share/rbenv/shims:$PATH
|
||||
export RBENV_VERSION="$(cat .ruby-version)"
|
||||
rm -rf "${DIR}/.bundle"
|
||||
# set the ruby version to the one specified in the .ruby-version file
|
||||
[ -z "$RBENV_VERSION" ] && export RBENV_VERSION=$(cat "$DIR/.ruby-version")
|
||||
|
||||
# Using Deprecated Flags to avoid pulling from upstream
|
||||
bundle install --local
|
||||
# set the app environment to development if it's not set
|
||||
[ -z "$APP_ENV" ] && export APP_ENV="development"
|
||||
|
||||
bundle binstubs rake rspec-core rubocop
|
||||
# set the path to include the rbenv shims if they exist
|
||||
[ -d "/usr/share/rbenv/shims" ] && export PATH=/usr/share/rbenv/shims:$PATH
|
||||
|
||||
TRASHDIR=$(mktemp -d /tmp/bootstrap.XXXXXXXXXXXXXXXXX)
|
||||
cleanup() {
|
||||
rm -rf "$TRASHDIR"
|
||||
# Remove empty directory
|
||||
rmdir "$DIR/vendor/cache" 2>/dev/null || true
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Bootstrap gem dependencies.
|
||||
if [ "$APP_ENV" == "production" ]; then
|
||||
echo -e "💎 ${BLUE}Installing Gems for ${GREEN}production${BLUE}...${OFF}"
|
||||
BUNDLE_WITHOUT=development bundle install --local
|
||||
BUNDLE_WITHOUT=development bundle binstubs --all
|
||||
else
|
||||
echo -e "💎 ${BLUE}Installing Gems for ${PURPLE}development${BLUE}...${OFF}"
|
||||
bundle install --local
|
||||
bundle binstubs --all
|
||||
fi
|
||||
|
|
|
@ -17,7 +17,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|||
pkg-config
|
||||
|
||||
# Install bundler
|
||||
RUN gem install bundler
|
||||
RUN gem install bundler -v 2.4.22
|
||||
|
||||
# Bootstrap files and caching for speed
|
||||
COPY "vendor/cache/" "/data/entitlements-app/vendor/cache/"
|
||||
|
|
|
@ -12,7 +12,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
|||
ldap-utils
|
||||
|
||||
# Install bundler
|
||||
RUN gem install bundler
|
||||
RUN gem install bundler -v 2.4.22
|
||||
|
||||
# Bootstrap files and caching for speed
|
||||
COPY "vendor/cache/" "/data/entitlements-app/vendor/cache/"
|
||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче