-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #368 from FundingCircle/CAD-691-github-actions-mig…
…ration [CAD-691] GitHub actions migration
- Loading branch information
Showing
20 changed files
with
199 additions
and
256 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
run-name: Run Build | ||
|
||
on: | ||
push | ||
|
||
jobs: | ||
run_checks: | ||
uses: ./.github/workflows/run_checks.yaml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
run-name: Jackdaw build | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '*publish-snapshot*' | ||
|
||
jobs: | ||
run_checks: | ||
uses: ./.github/workflows/run_checks.yaml | ||
deploy: | ||
needs: run_checks | ||
runs-on: ubuntu-latest | ||
container: | ||
image: clojure:latest | ||
environment: clojars_deploy | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: deploy | ||
env: | ||
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }} | ||
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }} | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
run: | | ||
# https://github.com/actions/runner/issues/2033 | ||
git config --global --add safe.directory /__w/jackdaw/jackdaw | ||
apt-get update | ||
apt-get install -y gpg | ||
echo $GPG_PRIVATE_KEY |base64 --decode |gpg --yes --batch --import | ||
export LEIN_GPG=/__w/jackdaw/jackdaw/bin/gpg | ||
export REAL_GPG=$(which gpg) | ||
lein do jar, pom, deploy clojars | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
run-name: Run checks | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
RunChecks: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: clojure:latest | ||
options: --user 1001 # don't run as root | ||
services: | ||
kafka: | ||
image: confluentinc/cp-kafka:5.1.3 | ||
env: | ||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 | ||
KAFKA_AUTO_CREATE_TOPICS_ENABLE: true | ||
KAFKA_BROKER_ID: 1 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | ||
schema-registry: | ||
image: confluentinc/cp-schema-registry:5.1.2 | ||
env: | ||
SCHEMA_REGISTRY_HOST_NAME: schema-registry | ||
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: 'zookeeper:2181' | ||
kafka-rest: | ||
image: confluentinc/cp-kafka-rest:6.1.1 | ||
env: | ||
KAFKA_REST_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
KAFKA_REST_BOOTSTRAP_SERVERS: kafka:9092 | ||
KAFKA_REST_LISTENERS: http://0.0.0.0:8082 | ||
KAFKA_REST_SCHEMA_REGISTRY: http://schema-registry:8081 | ||
KAFKA_REST_HOST_NAME: kafka-rest | ||
zookeeper: | ||
image: confluentinc/cp-zookeeper:5.1.3 | ||
env: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
ZOOKEEPER_TICK_TIME: 2000 | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
# do not fetch tags if the trigger event is a tag push | ||
fetch-tags: ${{ startsWith(github.ref, 'refs/tags') != true }} | ||
fetch-depth: 100 | ||
- name: build | ||
run: | | ||
lein kaocha | ||
env: | ||
KAFKA_BOOTSTRAP_SERVERS: kafka | ||
ZOOKEEPER_HOST: zoopkeeper | ||
SCHEMA_REGISTRY_HOST: schema-registry | ||
KAFKA_REST_PROXY_HOST: kafka-rest | ||
- name: lint | ||
run: lein clj-kondo --lint src test || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
# | ||
# Invoked by `LEIN_GPG=$app/.circleci/bin/gpg lein deploy clojars` | ||
# Invoked by `LEIN_GPG=$app/bin/gpg lein deploy clojars` | ||
|
||
echo $GPG_PASSPHRASE \ | ||
| $REAL_GPG --pinentry-mode loopback --yes --batch --passphrase-fd=0 $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.