Skip to content
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

CIF-1625 Setup dev branch with snapshot dependencies #55

Merged
merged 6 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ common:
username: $DOCKER_USER
password: $DOCKER_PASS

install_components: &install_components
run:
name: Install CIF Components
command: |
if [[ "$CIRCLE_BRANCH" != "" && "$CIRCLE_BRANCH" != "main" ]]; then
git clone https://github.com/adobe/aem-core-cif-components.git
cd aem-core-cif-components
components_branch=$(git ls-remote --heads origin ${CIRCLE_BRANCH})
if [[ ! -z ${components_branch} ]]; then
git fetch
git checkout $CIRCLE_BRANCH
fi
mvn -B clean install
cd react-components
npm link
fi
working_directory: ./dependencies

jobs:
build:
executor: cif_executor
Expand All @@ -54,12 +72,17 @@ jobs:
- run:
name: Update permissions
command: sudo chown -R circleci /usr/local/lib/node_modules
- *install_components
- run:
name: Build
command: |
java -version
mvn -v
mvn -B clean install
if [[ "$CIRCLE_BRANCH" != "" && "$CIRCLE_BRANCH" != "main" ]]; then
mvn -B clean install -Pcloud,fedDev
else
mvn -B clean install
fi
- save_cache:
paths:
- ~/.m2
Expand Down Expand Up @@ -89,12 +112,17 @@ jobs:
- run:
name: Update permissions
command: sudo chown -R circleci /usr/local/lib/node_modules
- *install_components
- run:
name: Build
command: |
java -version
mvn -v
mvn -B clean install -Pclassic
if [[ "$CIRCLE_BRANCH" != "" && "$CIRCLE_BRANCH" != "main" ]]; then
mvn -B clean install -Pclassic,fedDev
else
mvn -B clean install -Pclassic
fi
- save_cache:
paths:
- ~/.m2
Expand Down
8 changes: 6 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ coverage:
target: 80%
threshold: 10%
base: auto
flags: unittests
flags:
- unittests
patch:
default: off
unittests:
enabled: true
target: 80%
threshold: 10%
base: auto
flags: unittests
flags:
- unittests
flags:
unittests:
paths:
- core/
ignore:
- "dependencies"
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ The CIF Core Components and the CIF Connector connect to a Magento (or alternati

The project deployment can be done via Cloud Manager or AEM package install. For project build and deployment use the `classic` profile, see steps below.

## Branching Strategy
This project uses a `dev` branch for the development cycle between releases. On `dev` there can be dependencies to snapshot versions of the CIF Core components project. CircleCI will provide the snapshot dependencies including the `react-components` package on all branches except `main`.

After a release of the required dependencies, all dependencies have to be updated to release versions and the current state of the `dev` branch is merged to `main`. All releases of this project will be done from the `main` branch. This guarantees that the state on `main` can always be built and installed as-is.

## Modules

The main parts of the template are:
Expand Down Expand Up @@ -164,6 +169,8 @@ The Venia demo is ony released on Github but not on Maven Central like other pro

`mvn release:prepare release:clean -Prelease-prepare`

Releases must be done on the `main` branch.

## Contributing

Contributions are welcomed! Read the [Contributing Guide](.github/CONTRIBUTING.md) for more information.
Expand Down