Migration: Jenkins -> Semaphore#1204
Conversation
7d97323 to
f47416c
Compare
4b7e315 to
c7a03c4
Compare
c7a03c4 to
1a604a8
Compare
| processing: parallel | ||
| global_job_config: | ||
| env_vars: | ||
| - name: NO_OF_TEST_WORKER_NODES |
There was a problem hiding this comment.
why do you all of these env vars? It seems all are copied from ce-kafka. you can only use whichever you want and remove the rest
There was a problem hiding this comment.
I'll remove the ones that aren't required
| if [ "$NANO_VERSION" = "true" ] && [ "$RELEASE_JOB" = "false" ] && [ "$ENABLE_PUBLISH_ARTIFACTS" = "true" ]; then | ||
| . ci-tools ci-update-version | ||
| fi | ||
| - make compile-validate |
There was a problem hiding this comment.
do you need these checks. double check again with existing jenkins code.
There was a problem hiding this comment.
In jenkins, it does do this, I just changed the command in the makefile to the exact same as was in the jenkinsfile
https://github.com/confluentinc/kafka/pull/1204/files#diff-e6ffa5dc854b843b3ee3c3c28f8eae2f436c2df2b1ca299cca1fa5982e390cf8L80-L81
There was a problem hiding this comment.
There was a problem hiding this comment.
for CI update version, it's migrated from this
https://github.com/confluentinc/kafka/pull/1204/files#diff-e6ffa5dc854b843b3ee3c3c28f8eae2f436c2df2b1ca299cca1fa5982e390cf8L66-L68
| - make compile-validate | ||
| - make check-scala-compatibility | ||
| - | | ||
| if [ "$PUBLISH" = "true" ] && [ "$SEMAPHORE_GIT_REF_TYPE" != "pull-request" ] && [ "$ENABLE_PUBLISH_ARTIFACTS" = "true" ]; then \ |
There was a problem hiding this comment.
ensure these conditions are proper and relevant.
There was a problem hiding this comment.
yes, it maps directly to
if (config.publish) {
stage("Publish to artifactory") {
if (!config.isReleaseJob && !config.isPrJob) {
ciTool("ci-push-tag ${env.WORKSPACE} kafka")
}
if (config.isDevJob) {
publishStep('artifactory_snapshots_settings')
} else if (config.isPreviewJob) {
publishStep('artifactory_preview_release_settings')
}
}
}
from jenkinsfile
| echo "PUBLISH: $PUBLISH, RELEASE_JOB: $RELEASE_JOB, SEMAPHORE_GIT_REF_TYPE: $SEMAPHORE_GIT_REF_TYPE, ENABLE_DOWNSTREAM_TRIGGER: $ENABLE_DOWNSTREAM_TRIGGER" | ||
| if [ "$PUBLISH" = "true" ] && [ "$RELEASE_JOB" = "false" ] && [ "$SEMAPHORE_GIT_REF_TYPE" != "pull-request" ] && [ "$ENABLE_DOWNSTREAM_TRIGGER" = "true" ]; then | ||
| for project in $DOWNSTREAM_PROJECTS; do | ||
| sem-trigger -p $project -b $DOWNSTREAM_BRANCH_NAME -f .semaphore/semaphore.yml |
There was a problem hiding this comment.
is this required for open source kafka?
There was a problem hiding this comment.
yes, here it shows that it uses the downstream build command
https://github.com/confluentinc/kafka/pull/1204/files#diff-e6ffa5dc854b843b3ee3c3c28f8eae2f436c2df2b1ca299cca1fa5982e390cf8L99-L109
1a604a8 to
822724a
Compare
| echo $(( ($(date +%s%3N) - $SEMAPHORE_JOB_CREATION_TIME * 1000) )) > duration.txt | ||
| artifact push workflow duration.txt --destination $SEMAPHORE_JOB_INDEX-test-duration-$SEMAPHORE_WORKFLOW_ID || true | ||
|
|
||
| - name: Gradle Build |
There was a problem hiding this comment.
suggest making build as first block then followed by test.
* migrated jenkins to semaphore * moved build to be before test in pipeline
* migrated jenkins to semaphore * moved build to be before test in pipeline
* migrated jenkins to semaphore * moved build to be before test in pipeline
Migrated jenkins to semaphore
where DOWNSTREAM_BRANCH_NAME is set with
set_downstream_branch.shService bot already ran with codeartifact in service.yml
https://semaphore.ci.confluent.io/jobs/b6fa3e0e-f2e3-4fae-b569-add5a54078a3#L112
Committer Checklist (excluded from commit message)