Skip to content

Commit 19cde6e

Browse files
committed
merge develop
2 parents 8630df4 + 236c88e commit 19cde6e

File tree

343 files changed

+13546
-7150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+13546
-7150
lines changed

.circleci/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CircleCI Configuration
2+
3+
This directory contains CircleCI configuration files that are automatically generated and updated.
4+
5+
## Prerequisites
6+
7+
### CircleCI Local CLI
8+
9+
The CircleCI Local CLI is required to generate the `pull-request.yml` file from the source configuration.
10+
11+
**Installation:**
12+
13+
- **macOS (Homebrew):**
14+
```bash
15+
brew install circleci
16+
```
17+
18+
- **Linux:**
19+
```bash
20+
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash
21+
```
22+
23+
- **Windows:**
24+
```bash
25+
choco install circleci-cli
26+
```
27+
28+
- **Manual installation:**
29+
Download from [CircleCI Local CLI releases](https://github.com/CircleCI-Public/circleci-cli/releases)
30+
31+
For more detailed installation instructions, see the [CircleCI Local CLI documentation](https://circleci.com/docs/2.0/local-cli/).
32+
33+
## Lint-Staged Rules
34+
35+
When files in this directory are modified, the following lint-staged rule will automatically run:
36+
37+
```bash
38+
circleci config pack .circleci/workflows-src > .circleci/workflows.yml
39+
```
40+
41+
This command:
42+
1. Takes the source configuration from `./.circleci/workflows-src/`
43+
2. Packs it into a single YAML file
44+
3. Outputs the result to `./circleci/workflows.yml`
45+
46+
## File Structure
47+
48+
- `workflows-src/` - Source configuration files (modify these)
49+
- `workflows.yml` - Generated configuration file (auto-generated, do not edit manually)
50+
51+
## Development Workflow
52+
53+
1. Make changes to files in `workflows-src/`
54+
2. The lint-staged hook will automatically regenerate `workflows.yml` and stage it
55+
3. Commit both the source changes and the generated file
56+
57+
**Note:** Always commit both the source files and the generated `workflows.yml` file together to ensure the CircleCI configuration stays in sync.

.circleci/config.yml

Lines changed: 58 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,60 @@
1-
version: 2.1
2-
setup: true
3-
4-
orbs:
5-
continuation: circleci/[email protected]
6-
71
jobs:
8-
verify-ci-should-run:
9-
resource_class: small
10-
docker:
11-
- image: cimg/node:current
12-
steps:
13-
- run:
14-
name: Verify CI should run
15-
command: |
16-
# run CI when manually triggers via CircleCi Dashboard
17-
if [ <<pipeline.trigger_source>> == 'api' ]; then
18-
echo "Always run CI when manually triggered from the UI."
19-
exit 0
20-
fi
21-
22-
if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then
23-
echo "Always run CI for develop and for release candidate branches."
24-
exit 0
25-
fi
26-
27-
LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message')
28-
29-
if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then
30-
echo "Always run CI when the commit message includes 'run ci'."
31-
exit 0
32-
fi
33-
34-
cancel_build () {
35-
echo "Canceling the CI build..."
36-
circleci-agent step halt
37-
}
38-
39-
TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI."
40-
41-
if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then
42-
DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft')
43-
44-
if [[ "${DRAFT}" == true ]]; then
45-
echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS"
46-
cancel_build
47-
fi
48-
49-
echo "Always run CI for PR that is ready for review."
50-
exit 0
51-
fi
52-
53-
echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS"
54-
cancel_build
55-
- checkout
56-
- continuation/continue:
57-
configuration_path: .circleci/workflows.yml
58-
2+
verify-ci-should-run:
3+
docker:
4+
- image: cimg/node:current
5+
resource_class: small
6+
steps:
7+
- run:
8+
command: |
9+
# run CI when manually triggers via CircleCi Dashboard
10+
if [ <<pipeline.trigger_source>> == 'api' ]; then
11+
echo "Always run CI when manually triggered from the UI."
12+
exit 0
13+
fi
14+
15+
if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then
16+
echo "Always run CI for develop and for release candidate branches."
17+
exit 0
18+
fi
19+
20+
LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message')
21+
22+
if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then
23+
echo "Always run CI when the commit message includes 'run ci'."
24+
exit 0
25+
fi
26+
27+
cancel_build () {
28+
echo "Canceling the CI build..."
29+
circleci-agent step halt
30+
}
31+
32+
TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI."
33+
34+
if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then
35+
DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft')
36+
37+
if [[ "${DRAFT}" == true ]]; then
38+
echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS"
39+
cancel_build
40+
fi
41+
42+
echo "Always run CI for PR that is ready for review."
43+
exit 0
44+
fi
45+
46+
echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS"
47+
cancel_build
48+
name: Verify CI should run
49+
- checkout
50+
- continuation/continue:
51+
configuration_path: .circleci/workflows.yml
52+
orbs:
53+
continuation: circleci/[email protected]
54+
setup: true
55+
version: 2.1
5956
workflows:
60-
# the setup-workflow workflow is always triggered.
61-
setup-workflow:
62-
jobs:
63-
- verify-ci-should-run
57+
setup-workflow:
58+
jobs:
59+
- verify-ci-should-run
60+

.circleci/src/config/@config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: 2.1
2+
setup: true
3+
orbs:
4+
continuation: circleci/[email protected]
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
resource_class: small
2+
docker:
3+
- image: cimg/node:current
4+
steps:
5+
- run:
6+
name: Verify CI should run
7+
command: |
8+
# run CI when manually triggers via CircleCi Dashboard
9+
if [ <<pipeline.trigger_source>> == 'api' ]; then
10+
echo "Always run CI when manually triggered from the UI."
11+
exit 0
12+
fi
13+
14+
if [[ "$CIRCLE_BRANCH" == "develop" || "$CIRCLE_BRANCH" == "release/"* ]]; then
15+
echo "Always run CI for develop and for release candidate branches."
16+
exit 0
17+
fi
18+
19+
LAST_COMMIT_MESSAGE=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/commits/${CIRCLE_BRANCH}" | jq '.commit.message')
20+
21+
if [[ "$LAST_COMMIT_MESSAGE" =~ "run ci" ]]; then
22+
echo "Always run CI when the commit message includes 'run ci'."
23+
exit 0
24+
fi
25+
26+
cancel_build () {
27+
echo "Canceling the CI build..."
28+
circleci-agent step halt
29+
}
30+
31+
TRIGGER_INSTRUCTIONS="to trigger CI , include 'run ci' in the commit message or click the 'Trigger Pipeline' button in the CircleCI UI."
32+
33+
if [ ! -z "${CIRCLE_PULL_REQUEST##*/}" ]; then
34+
DRAFT=$(curl --silent "https://api.github.com/repos/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/pulls/${CIRCLE_PULL_REQUEST##*/}" | jq '.draft')
35+
36+
if [[ "${DRAFT}" == true ]]; then
37+
echo "Skipping CI; PR is in draft - $TRIGGER_INSTRUCTIONS"
38+
cancel_build
39+
fi
40+
41+
echo "Always run CI for PR that is ready for review."
42+
exit 0
43+
fi
44+
45+
echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS"
46+
cancel_build
47+
- checkout
48+
- continuation/continue:
49+
configuration_path: .circleci/workflows.yml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jobs:
2+
- verify-ci-should-run

0 commit comments

Comments
 (0)