Skip to content

Commit

Permalink
Add .tool-versions. Add dependabot support. Update GPG keys. Update d…
Browse files Browse the repository at this point in the history
…ependencies.
  • Loading branch information
tobyclemson committed Nov 7, 2023
1 parent 5867207 commit f8c2756
Show file tree
Hide file tree
Showing 11 changed files with 333 additions and 144 deletions.
161 changes: 126 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,163 @@
version: 2.1

orbs:
slack: circleci/[email protected]

ruby_container: &ruby_container
docker:
- image: ruby:3.1.1

slack_context: &slack_context
context:
- slack

only_main: &only_main
filters:
branches:
only:
- main

only_dependabot: &only_dependabot
filters:
branches:
only:
- /^dependabot.*/

only_main_and_dependabot: &only_main_and_dependabot
filters:
branches:
only:
- main
- /^dependabot.*/

commands:
notify:
steps:
- when:
condition:
matches:
pattern: "^dependabot.*"
value: << pipeline.git.branch >>
steps:
- slack/notify:
event: fail
channel: builds-dependabot
template: SLACK_FAILURE_NOTIFICATION
- slack/notify:
event: pass
channel: builds-dependabot
template: SLACK_SUCCESS_NOTIFICATION
- when:
condition:
matches:
pattern: "^(?!dependabot).*"
value: << pipeline.git.branch >>
steps:
- slack/notify:
event: fail
channel: dev
template: SLACK_FAILURE_NOTIFICATION
- slack/notify:
event: pass
channel: builds
template: SLACK_SUCCESS_NOTIFICATION
configure_build_tools:
steps:
- run: ./scripts/ci/common/install-openjdk.sh
configure_secrets_tools:
steps:
- run: ./scripts/ci/common/upgrade-gpg.sh
- run: ./scripts/ci/common/install-git-crypt.sh
- run: ./scripts/ci/common/install-gpg-key.sh
configure_release_tools:
steps:
- run: ./scripts/ci/common/configure-git.sh
- run: ./scripts/ci/common/configure-clojars.sh

jobs:
build:
working_directory: ~/source
docker:
- image: ruby:3.1.1
<<: *ruby_container
steps:
- checkout
- run: ./scripts/ci/common/install-openjdk.sh
- configure_build_tools
- run: ./scripts/ci/steps/build.sh
- notify

test:
<<: *ruby_container
working_directory: ~/source
docker:
- image: ruby:3.1.1
steps:
- checkout
- run: ./scripts/ci/common/install-openjdk.sh
- configure_build_tools
- run: ./scripts/ci/steps/test.sh
- notify

prerelease:
working_directory: ~/source
docker:
- image: ruby:3.1.1
<<: *ruby_container
steps:
- checkout
- run: ./scripts/ci/common/install-openjdk.sh
- run: ./scripts/ci/common/upgrade-gpg.sh
- run: ./scripts/ci/common/install-git-crypt.sh
- run: ./scripts/ci/common/install-gpg-key.sh
- run: ./scripts/ci/common/configure-git.sh
- run: ./scripts/ci/common/configure-clojars.sh
- configure_build_tools
- configure_secrets_tools
- configure_release_tools
- run: ./scripts/ci/steps/prerelease.sh
- notify

release:
working_directory: ~/source
docker:
- image: ruby:3.1.1
<<: *ruby_container
steps:
- checkout
- run: ./scripts/ci/common/install-openjdk.sh
- run: ./scripts/ci/common/upgrade-gpg.sh
- run: ./scripts/ci/common/install-git-crypt.sh
- run: ./scripts/ci/common/install-gpg-key.sh
- run: ./scripts/ci/common/configure-git.sh
- run: ./scripts/ci/common/configure-clojars.sh
- configure_build_tools
- configure_secrets_tools
- configure_release_tools
- run: ./scripts/ci/steps/release.sh
- notify

merge_pull_request:
<<: *ruby_container
steps:
- checkout
- configure_build_tools
- configure_secrets_tools
- run: ./scripts/ci/steps/merge-pull-request.sh
- notify

workflows:
version: 2
pipeline:
jobs:
- build
- build:
<<: *only_main_and_dependabot
<<: *slack_context
- test:
<<: *only_main_and_dependabot
<<: *slack_context
requires:
- build
- merge_pull_request:
<<: *only_dependabot
<<: *slack_context
requires:
- test
- prerelease:
<<: *only_main
<<: *slack_context
requires:
- test
filters:
branches:
only: main
- slack/on-hold:
<<: *only_main
<<: *slack_context
requires:
- prerelease
channel: release
template: SLACK_ON_HOLD_NOTIFICATION
- hold:
<<: *only_main
type: approval
requires:
- prerelease
filters:
branches:
only: main
- slack/on-hold
- release:
<<: *only_main
<<: *slack_context
requires:
- hold
filters:
branches:
only: main
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ PROJECT_DIR="$(pwd)"

PATH_add "${PROJECT_DIR}"
PATH_add "${PROJECT_DIR}"/vendor/**/bin

if has asdf; then
asdf install
fi

layout ruby
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "daily"
54 changes: 37 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
/target
/classes
/checkouts
# vim
*.swp
*.swo

# IntelliJ
.idea/
*.ipr
*.iml
*.iws

# Build
vendor/
build/
dist/
target/
classes/
checkouts/
run/
.bundle
.rakeTasks
.direnv

# OS
.DS_Store

# Clojure
profiles.clj
.eastwood
pom.xml
pom.xml.asc
*.jar
*.class
/.lein-*
/.nrepl-port
/run
.hgignore
.bundle
.hg/
*.iml
*.iws
*.ipr
.DS_Store
/vendor
.eastwood
/.idea
lsp/
.lein-*/
lsp/
.nrepl-port

# Temporary
run/pids/
run/logs/
*.log
.tmp

1 change: 1 addition & 0 deletions .lein-failures
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruby 3.1.1
java temurin-11.0.20+101
Loading

0 comments on commit f8c2756

Please sign in to comment.