Skip to content

Commit

Permalink
Merge branch '3279-only-run-ci-on-non-draft' into 3334-update-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
aronchick committed Jan 29, 2024
2 parents 35e02bf + def8548 commit b59cbbd
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 20 deletions.
31 changes: 29 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
parameters:
GHA_Actor:
type: string
default: ""
GHA_Action:
type: string
default: ""
GHA_Event:
type: string
default: ""
GHA_Meta:
type: string
default: ""
run_workflow_build:
default: true
type: boolean

run_workflow_test:
default: true
type: boolean

run_workflow_lint:
default: true
type: boolean

orbs:
node: circleci/[email protected]
Expand Down Expand Up @@ -566,14 +590,15 @@ jobs:
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
check_canary:
when: << pipeline.parameters.GHA_Action >>
jobs:
- build_canary:
name: Check canary build
filters:
tags:
ignore: /.*/

test:
when: << pipeline.parameters.GHA_Action >>
jobs:
- build_webui
- test:
Expand Down Expand Up @@ -602,6 +627,7 @@ workflows:
- test

python:
when: << pipeline.parameters.GHA_Action >>
jobs:
- build_swagger:
name: build-swagger-spec
Expand All @@ -625,8 +651,9 @@ workflows:
branches:
ignore: /.*/ # don't run on any branches - only tags
!!merge <<: *build_on_branch_and_tag_push

build:
when: << pipeline.parameters.GHA_Action >>
jobs:
- build_webui:
filters: *build_on_branch_and_tag_push
Expand Down
7 changes: 7 additions & 0 deletions .circleci/trigger_pipeline.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
curl -X POST --header "Content-Type: application/json" --header "Circle-Token: ${CIRCLE_TOKEN}" -d "{
\"parameters\": {
\"GHA_Action\": \"trigger_pipeline\"
},
\"branch\": \"${BRANCH}\"
}" https://circleci.com/api/v2/project/gh/bacalhau-project/bacalhau/pipeline
9 changes: 5 additions & 4 deletions .cspell-code.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
"allowCompoundWords": true,
"dictionaryDefinitions": [
{
"name": "custom-words",
"path": ".gitprecommit/codespell_ignore_words.txt",
"name": "custom-dictionary",
"path": "./.cspell/custom-dictionary.txt",
"addWords": true
}
],
"dictionaries": [
"en",
"custom-words"
"custom-words",
"custom-dictionary"
],
"ignorePaths": [
"**/package.json",
Expand Down Expand Up @@ -48,4 +49,4 @@
"/github.com.*/",
"/\\w+{12,}/"
]
}
}
4 changes: 2 additions & 2 deletions .cspell-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"allowCompoundWords": true,
"dictionaryDefinitions": [
{
"name": "custom-words",
"path": ".gitprecommit/codespell_ignore_words.txt",
"name": "custom-dictionary",
"path": "./.cspell/custom-dictionary.txt",
"addWords": true
}
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Custom Dictionary Words
abcdefghi
Acked
acks
Expand Down Expand Up @@ -267,6 +268,7 @@ sdkmetric
sdktrace
sharded
shellescape
skippable
softmax
sparkoperator
stackdriver
Expand Down Expand Up @@ -308,11 +310,12 @@ wazero
wdbaruni's
webui
wesbos
whyayen
winderresearch
workdir
Wrapf
writefile
xlarge
xmap
xvfz
zerolog
zerolog
25 changes: 25 additions & 0 deletions .github/workflows/circleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CircleCI Trigger Action
on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
trigger-circle-ci:
if: |
!contains(github.event.pull_request.labels.*.name, 'do-not-merge') &&
!contains(github.event.pull_request.labels.*.name, 'wip')
runs-on: ubuntu-latest
name: Pull Request Triggered CircleCI
steps:
- uses: LedgerHQ/actions/gh-context@main
- uses: actions/checkout@v3
- name: Trigger CircleCI
id: trigger-circle-ci
run: |
./.circleci/trigger_pipeline.sh
env:
CIRCLE_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
BRANCH: ${{ github.event.pull_request.head.ref }}

13 changes: 11 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
make spellcheck-docs

build:
if: |
github.event_name == 'pull_request' &&
!contains(github.event.pull_request.labels.*.name, 'do-not-merge') &&
!contains(github.event.pull_request.labels.*.name, 'wip')
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -33,10 +37,15 @@ jobs:
path: docs/build/

deploy:

runs-on: ubuntu-latest
needs: build

if: github.ref == 'refs/heads/main'
if: |
github.event_name == 'pull_request' &&
github.ref == 'refs/heads/main' &&
!contains(github.event.pull_request.labels.*.name, 'do-not-merge') &&
!contains(github.event.pull_request.labels.*.name, 'wip')


# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@
[Bacalhau](https://www.bacalhau.org/) is a platform for fast, cost efficient, and secure computation by running jobs where the data is generated and stored. With Bacalhau you can streamline your existing workflows without the need of extensive rewriting by running arbitrary Docker containers and WebAssembly (wasm) images as tasks.

## Table of Contents
- [Why Bacalhau](#why-bacalhau)
- [Getting started](#getting-started---bacalhau-in-1-minute)
- [Table of Contents](#table-of-contents)
- [Why Bacalhau?](#why-bacalhau)
- [Getting started - Bacalhau in 1 minute](#getting-started---bacalhau-in-1-minute)
- [Learn more](#learn-more)
- [Documentation](#documentation)
- [Developers guide](#developers-guide)
- [Running Bacalhau locally](#running-bacalhau-locally)
- [Notes for Dev contributors](#notes-for-dev-contributors)
- [Ways to contribute ](#ways-to-contribute)
- [Current state of Bacalhau](#current-state-of-bacalhau-)
- [License](#license)
- [OpenAPI](#openapi)
- [Python Libraries](#python-libraries)
- [Issues, feature requests, and questions](#issues-feature-requests-and-questions)
- [Ways to contribute](#ways-to-contribute)
- [Open Source](#open-source)

## Why Bacalhau?
- :zap: **Fast job processing**: Jobs in Bacalhau are processed where the data was created and all jobs are parallel by default.
Expand Down Expand Up @@ -161,4 +164,4 @@ Others are allowed to make their own distribution of the software, but they cann

We explicitly grant permission for you to make a build that includes our trademarks while developing Bacalhau software itself. You may not publish or share the build, and you may not use that build to run Bacalhau software for any other purpose.

We have borrowed the above Open Source clause from the excellent [System Initiative](https://github.com/systeminit/si/blob/main/CONTRIBUTING.md)
We have borrowed the above Open Source clause from the excellent [System Initiative](https://github.com/systeminit/si/blob/main/CONTRIBUTING.md)
3 changes: 1 addition & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"ignorePaths": [],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [],
"ignoreWords": [],
"import": ["./.cspell-docs.json", "./.cspell-code.json"]
"import": [".cspell-docs.json", ".cspell-code.json"]
}
2 changes: 1 addition & 1 deletion integration/flyte/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ lint: ## Run linters

.PHONY: spellcheck
spellcheck: ## Runs a spellchecker over all code and documentation
codespell -L "te,raison,fo" --skip="./docs/build,./.git" --ignore-words="./.gitprecommit/codespell_ignore_words.txt"
codespell -L "te,raison,fo" --skip="./docs/build,./.git" --ignore-words="./.cspell/custom-dictionary.txt"

0 comments on commit b59cbbd

Please sign in to comment.