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

ci: camunda docker CI #19623

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

ci: camunda docker CI #19623

wants to merge 8 commits into from

Conversation

houssain-barouni
Copy link
Collaborator

@houssain-barouni houssain-barouni commented Jun 21, 2024

Description

add camunda docker image build and publication in the GH workflow:
1- .github/workflows/camunda-platform-release.yml
2- .github/workflows/ci.yml

  • docker-checks job:
    • triggered when GHA or java or frontend or Docker changes
    • builds a camunda/camunda image and pushs it to a local registry
    • verifies the docker image labels against a golden file
    • runs CamundaDockerIT integration test (now it is part of dist module but can be moved to qa module that @Zelldon is creating). This test starts an ES image and the freshly built camunda/camunda image. It checks the actuator health endpoint response
  • deploy-camunda-docker-snapshot job
    • triggered when branch is main and the check-results is passing
    • creates and publishes SNAPSHOT image to DockerHub

Related issues

relates to #18670

@github-actions github-actions bot added component/build-pipeline component/zeebe Related to the Zeebe component/team component/operate Related to the Operate component/team component/tasklist Related to the Tasklist component/team labels Jun 21, 2024
Copy link
Contributor

github-actions bot commented Jun 21, 2024

Operate Opensearch ITs Results

182 tests  ±0   182 ✅ ±0   1m 4s ⏱️ -10s
 19 suites ±0     0 💤 ±0 
 19 files   ±0     0 ❌ ±0 

Results for commit 61eb54b. ± Comparison against base commit 4f5510b.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jun 21, 2024

Operate Unit Tests Results

308 tests  ±0   307 ✅ ±0   6m 28s ⏱️ -13s
 51 suites ±0     1 💤 ±0 
 51 files   ±0     0 ❌ ±0 

Results for commit 61eb54b. ± Comparison against base commit 4f5510b.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jun 21, 2024

Operate Integration Tests Results

535 tests  ±0   533 ✅ ±0   8m 36s ⏱️ +21s
 89 suites ±0     2 💤 ±0 
 89 files   ±0     0 ❌ ±0 

Results for commit 61eb54b. ± Comparison against base commit 4f5510b.

♻️ This comment has been updated with latest results.

@houssain-barouni houssain-barouni force-pushed the camunda_docker_ci branch 2 times, most recently from a3c812a to b558919 Compare June 21, 2024 09:24
Copy link
Contributor

github-actions bot commented Jun 21, 2024

Tasklist Test Results

146 files  ± 0  146 suites  ±0   1h 27m 45s ⏱️ - 12m 0s
565 tests ± 0  560 ✅ ± 0  5 💤 ±0  0 ❌ ±0 
533 runs   - 30  528 ✅  - 30  5 💤 ±0  0 ❌ ±0 

Results for commit 61eb54b. ± Comparison against base commit 4f5510b.

♻️ This comment has been updated with latest results.

@houssain-barouni houssain-barouni force-pushed the camunda_docker_ci branch 9 times, most recently from a6b15ff to b91b5c2 Compare June 25, 2024 09:47
.github/actions/paths-filter/action.yml Outdated Show resolved Hide resolved
docker-checks:
if: needs.detect-changes.outputs.docker-ci == 'true'
needs: [ detect-changes ]
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a timeout-minutes variable to limit execution time to what is conservatively needed based on observation how long it usually runs.

Copy link
Collaborator Author

@houssain-barouni houssain-barouni Jun 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first successful run took ~15 minutes https://github.com/camunda/camunda/actions/runs/9664124006/job/26658087425?pr=19623
I will put 25 minutes timeout for now, which is less than the timeout of the concurrent job java-unit-tests (30 min)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The java-unit-tests job also doesn't need the 30 minutes, it is closer to 15 the last time I checked.

I also want to keep runtimes low so 15 minutes is already at the upper bound (I put some new guidelines in https://github.com/camunda/camunda/wiki/CI-&-Automation#workflow-inclusion-criteria ) - we have to make sure to not let it grow, otherwise parallelization/caching/bigger runners need to be considered.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@houssain-barouni houssain-barouni force-pushed the camunda_docker_ci branch 5 times, most recently from cf4559a to 70066b8 Compare June 25, 2024 14:14
@houssain-barouni houssain-barouni marked this pull request as ready for review June 26, 2024 06:42
Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @houssain-barouni I have some questions and comments, lets clarify them first before we move on. We can do this also sync if you like.

@@ -0,0 +1,21 @@
{
"io.k8s.description": "Workflow engine for microservice orchestration",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ I guess these labels are still need to be updated?

Copy link
Collaborator Author

@houssain-barouni houssain-barouni Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, it is being discussed here #19495 (comment)
if you have any suggestions, please let me know :)
otherwise I will reach out to #ask-devrel

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated some of the labels here 514a4c8
after this discussion https://camunda.slack.com/archives/C026U8GBNSW/p1719493763579659

.github/actions/paths-filter/action.yml Show resolved Hide resolved
.github/actions/paths-filter/action.yml Show resolved Hide resolved
@@ -0,0 +1,31 @@
name: Build Frontend
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Didn't we had this already as a workflow or action before? 🤔 Can we use also in other places then?

Copy link
Collaborator Author

@houssain-barouni houssain-barouni Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a dedicated one to Tasklist https://github.com/camunda/camunda/blob/main/.github/actions/build-tasklist-fe/action.yml
@pedesen is also currently working on using GHA to build operate frontend #19085. I will get in touch with him to avoid overlapping work

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
Comment on lines 269 to 272
deploy-camunda-docker-snapshot:
name: Deploy snapshot Camunda Docker image
needs: [ detect-changes, check-results ]
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ 🔧 Could we reuse the image from before and just retag it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid we can't, this is a diffrent Job and can be run by a different worker
the image built in docker-checks job is pushed to a local registery, that must be killed after the job is completed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@Zelldon Zelldon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks 🙇🏼

import org.testcontainers.elasticsearch.ElasticsearchContainer;

@EnabledIfSystemProperty(named = "camunda.docker.test.enabled", matches = "true")
public class CamundaDockerIT {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Root QA module is now available on main, do you want to move it now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I have the same idea. I am planning to do it in a a new pull request.
I was planning to create a new module under QA module, dedicated to this kind of tests, with the minimum possible of dependencies: testContainers, jUnit5, apache http5...
we don't really need any dependency to the applicative code, and it should be easy to build and run tests. WDYT @Zelldon ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate PR is fine by me. Extra module not sure whether this is necessary. I think you can just put it into the integration-tests module in a different package.

Copy link
Collaborator Author

@houssain-barouni houssain-barouni Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is not run within integration tests suite, but only on newly built camunda docker image (conditional on camunda.docker.test.enabled property). When we need to run this test only, we don't really need to do a full project build or import dozens of applicative snapshot artifacts that we don't use in the test.

Base automatically changed from camunda_docker_file to main June 27, 2024 12:59
@github-actions github-actions bot added the component/identity Related to the Identity component/team label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/build-pipeline component/identity Related to the Identity component/team component/operate Related to the Operate component/team component/tasklist Related to the Tasklist component/team component/zeebe Related to the Zeebe component/team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants