-
Notifications
You must be signed in to change notification settings - Fork 266
Migration GitHub to circleci #1185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
5c230e3
add CircleCI configuration for linting job
raffaele-oplabs 6e42d0d
add lint job to CircleCI configuration
raffaele-oplabs 2e5a375
rename lint job to publish-algolia-search in CircleCI configuration
raffaele-oplabs c56cb25
update CircleCI configuration to use Ubuntu 22.04 and Node.js 16.13 f…
raffaele-oplabs f3e6fc4
refactor CircleCI configuration to use machine executor and pnpm for …
raffaele-oplabs b58f990
add Node.js orb to CircleCI configuration
raffaele-oplabs 3b957e0
update CircleCI configuration to install packages using npm and run t…
raffaele-oplabs bdd0bec
update CircleCI configuration to use pnpm for package management in t…
raffaele-oplabs 8521612
update CircleCI configuration to install Node.js 20.x and pnpm, and m…
raffaele-oplabs 14ed9fb
refactor CircleCI configuration to use a dedicated Node.js 20.x execu…
raffaele-oplabs eed1de7
simplify dependency installation in CircleCI configuration by removin…
raffaele-oplabs b84d490
enable index documentation creation and upload in CircleCI configuration
raffaele-oplabs d1e09ab
update CircleCI configuration to use Ubuntu executor and install Node…
raffaele-oplabs cb3cbe2
remove commented-out environment variables from CircleCI configuration
raffaele-oplabs d7d7e7a
restore environment variables for index documentation creation in Cir…
raffaele-oplabs d3dc09c
refactor CircleCI configuration to create and upload Algolia search i…
raffaele-oplabs 451550a
refactor CircleCI configuration to add breadcrumbs job and update Alg…
raffaele-oplabs 73390e6
update CircleCI configuration to enable filters for breadcrumbs job o…
raffaele-oplabs 48b0b60
refactor CircleCI configuration to inline Algolia index creation command
raffaele-oplabs e07f703
add CircleCI job to build and run Lychee link checker
raffaele-oplabs c45b557
refactor CircleCI configuration to set Lychee path in the run command
raffaele-oplabs 01d53bb
refactor CircleCI configuration to create separate workflows for Algo…
raffaele-oplabs 801f058
refactor CircleCI configuration to rename workflows for clarity
raffaele-oplabs da804b7
refactor CircleCI configuration to simplify workflow job definitions
raffaele-oplabs 0f74e6f
add CircleCI job to lint Markdown files
raffaele-oplabs d9583c3
add setup-node step to CircleCI job for linting Markdown files
raffaele-oplabs bc5b6cf
add developer metrics jobs to CircleCI configuration
raffaele-oplabs 4b05cf5
add Slack notifications for job failures and new tutorial workflows i…
raffaele-oplabs c916d46
Merge branch 'main' into migration-github-to-circleci
raffaele-oplabs 5a77383
remove commented-out Algolia job configuration from CircleCI
raffaele-oplabs 5695cbf
update job name to reflect index creation and upload in CircleCI conf…
raffaele-oplabs 671985a
refactor CircleCI configuration to use environment variable names dir…
raffaele-oplabs 48726a7
add debug step to CircleCI configuration and use environment variable…
raffaele-oplabs 348b513
add environment variable for ALGOLIA_INDEX_NAME in CircleCI job
raffaele-oplabs 0881cee
remove debug step and unnecessary environment variables from CircleCI…
raffaele-oplabs d84ca0a
update job name for Algolia index update in CircleCI configuration
raffaele-oplabs 18f8209
remove unused GitHub workflows for Algolia index update, breadcrumbs,…
raffaele-oplabs 5e0852d
rename developer-issue-metrics job to developer-metrics and remove de…
raffaele-oplabs fc63b70
rename developer-metrics job to developer-issue-metrics and add devel…
raffaele-oplabs 214be75
rename developer-issue-metrics job to developer-metrics and remove de…
raffaele-oplabs 61961ed
update file paths for issue and PR metrics in CircleCI configuration
raffaele-oplabs cf471ef
update CircleCI utils orb version to 0.0.7
raffaele-oplabs 7074017
refactor CircleCI configuration: remove unused jobs and notifications…
raffaele-oplabs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,171 @@ | ||
version: 2.1 | ||
orbs: | ||
utils: ethereum-optimism/[email protected] | ||
|
||
executors: | ||
node20: | ||
docker: | ||
- image: cimg/node:20.11.1 # Prebuilt CircleCI image for Node.js 20.x | ||
resource_class: medium # Adjust resource allocation as needed | ||
ubuntu: | ||
machine: | ||
image: ubuntu-2204:current | ||
rust: | ||
docker: | ||
- image: cimg/rust:1.75.0 # CircleCI's Rust Docker image | ||
working_directory: ~/project | ||
|
||
commands: | ||
setup-node: | ||
steps: | ||
- run: | ||
name: Install Node.js (20.x) and pnpm | ||
command: | | ||
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
npm install -g pnpm | ||
pnpm --version | ||
- restore_cache: | ||
keys: | ||
- v1-pnpm-cache-{{ checksum "pnpm-lock.yaml" }} | ||
- run: | ||
name: Install dependencies | ||
command: npm install -g pnpm && pnpm install | ||
- save_cache: | ||
key: v1-pnpm-cache-{{ checksum "pnpm-lock.yaml" }} | ||
paths: | ||
- ~/.pnpm-store | ||
|
||
raffaele-oplabs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
jobs: | ||
algolia: | ||
description: Create and upload Algolia search index | ||
executor: ubuntu | ||
steps: | ||
- checkout | ||
- setup-node | ||
- run: | ||
name: Create and upload index | ||
command: | | ||
# index:docs requires the following environment variables, coming from the algolia-search context | ||
# ALGOLIA_APPLICATION_ID | ||
# ALGOLIA_WRITE_API_KEY | ||
# ALGOLIA_INDEX_NAME | ||
pnpm run index:docs | ||
|
||
breadcrumbs: | ||
description: Check breadcrumbs in documentation | ||
executor: ubuntu | ||
steps: | ||
- checkout | ||
- setup-node | ||
- run: | ||
name: Run breadcrumb check | ||
command: pnpm check-breadcrumbs | ||
lint: | ||
description: Lint Markdown files | ||
executor: ubuntu | ||
steps: | ||
- checkout | ||
- setup-node | ||
- run: | ||
name: Lint Markdown files | ||
command: pnpm lint | ||
|
||
links: | ||
executor: rust | ||
steps: | ||
- checkout: | ||
path: docs | ||
- run: | ||
name: Checkout lycheeverse/lychee | ||
command: | | ||
git clone https://github.com/lycheeverse/lychee.git lychee | ||
|
||
- restore_cache: | ||
keys: | ||
- v1-rust-cache-{{ checksum "lychee/Cargo.lock" }} | ||
- v1-rust-cache- | ||
|
||
- run: | ||
name: Build Lychee | ||
command: | | ||
cd lychee | ||
cargo build --release | ||
|
||
- save_cache: | ||
key: v1-rust-cache-{{ checksum "lychee/Cargo.lock" }} | ||
paths: | ||
- ~/.cargo/registry | ||
- ~/.cargo/git | ||
- lychee/target | ||
|
||
- run: | ||
name: Run Lychee link checker | ||
command: | | ||
export PATH=$PATH:$HOME/project/lychee/target/release | ||
cd docs | ||
lychee --config ./lychee.toml --quiet "./pages" | ||
|
||
developer-metrics: | ||
description: Monthly Metrics Report | ||
executor: ubuntu | ||
parameters: | ||
repo: | ||
type: string | ||
default: $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME | ||
steps: | ||
- utils/get-github-access-token: | ||
private-key-str: GITHUB_APP_KEY | ||
app-id: GITHUB_APP_ID | ||
repo: << parameters.repo >> | ||
- run: | ||
name: Get Dates for Last Month | ||
command: | | ||
# Calculate the first day of the previous month | ||
first_day=$(date -d "last month" +%Y-%m-01) | ||
|
||
|
||
# Calculate the last day of the previous month | ||
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d) | ||
|
||
# Export the last_month variable for subsequent steps | ||
echo "export LAST_MONTH=${first_day}..${last_day}" >> $BASH_ENV | ||
- utils/generate-issue-metrics-file: | ||
SEARCH_QUERY: 'repo:ethereum-optimism/docs is:issue closed:${LAST_MONTH} -reason:\"not planned\" -label:monthly-report' | ||
file-path: "./closed_issue_metrics.md" | ||
- utils/create-github-issue-from-file: | ||
repo: << parameters.repo >> | ||
file-path: "./closed_issue_metrics.md" | ||
issue-title: "${LAST_MONTH} metrics report for closed issues" | ||
issue-labels: "monthly-report" | ||
assignees: "sbvegan" | ||
- utils/generate-issue-metrics-file: | ||
SEARCH_QUERY: "repo:ethereum-optimism/docs is:pr created:${LAST_MONTH}" | ||
file-path: "./pr_issue_metrics.md" | ||
- utils/create-github-issue-from-file: | ||
repo: << parameters.repo >> | ||
file-path: "./pr_issue_metrics.md" | ||
issue-title: "${LAST_MONTH} metrics report for opened prs" | ||
issue-labels: "monthly-report" | ||
assignees: "sbvegan" | ||
|
||
workflows: | ||
merge-workflow: | ||
jobs: | ||
- algolia: | ||
name: Algolia Index Update | ||
context: algolia-search | ||
filters: | ||
branches: | ||
only: main | ||
pr-workflow: | ||
jobs: | ||
- breadcrumbs | ||
- links | ||
- lint | ||
monthly-workflow: | ||
when: | ||
equal: [build_monthly, <<pipeline.schedule.name>>] | ||
jobs: | ||
- developer-metrics: | ||
context: circleci-repo-docs | ||
sbvegan marked this conversation as resolved.
Show resolved
Hide resolved
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.