You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "cimbalek (via GitHub)" <gi...@apache.org> on 2024/05/22 15:45:47 UTC
[PR] WIP: [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
cimbalek opened a new pull request, #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202
Add bash script that creates zip files with sources as required by Apache
This is being tested here (in queue)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611178119
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
Please create one zip file instead of a zip file for each repository. There should be one big zip file with all sources. Filename should be in the format of `apache-kie-${params.VERSION_NUMBER}.zip`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#issuecomment-2126587433
@baldimir I have several questions based on the document you sent
- In the document you linked I see 7 repositoritories. Should I remove the ones that are not mentioned there? (incubator-kie-kogito-serverless-operator, incubator-kie-optaplanner-quickstarts, incubator-kie-kogito-examples, incubator-kie-kogito-online) I picked based on [1]
- Automation D: There is list of container images. Should container-images-sources.zip match this list? And are container sources packed separately even needed given the kie-tools and kogito-images are already present in sources.zip? If the answer is yes, there will be a follow-up questions.
[1] https://ibm.ent.box.com/notes/1368218778156
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611306319
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
I'll adjust the list. I had the script long done already by the time jenkinsfile got to me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#issuecomment-2168468717
Should be ready now.
Summary of the whole PR now:
- Added shell script for zipping sources
- Added pipeline that uses the script ^^, signs resulting zip and uploads to SVN (signing and uploading is commented out as we are still waiting for credentials ATM)
- Added job dsl to create a pipeline job that does the zipping. It'll be currently located in `...KIE/kogito/<branch>/tools/zip-and-upload-sources` because of the limitations of the current framework and because of planned structural changes.
Seed jobs cascade[0][1] that generates zipping sources pipeline was successfully ran in my fork:
- [0] https://ci-builds.apache.org/job/KIE/job/test/job/mcimbalek/job/playground/job/kie-issues-828/job/kie-issues-828/job/0-seed-job/
- [1] https://ci-builds.apache.org/job/KIE/job/test/job/mcimbalek/job/playground/job/kie-issues-828/job/kie-issues-828/job/0-seed-job/
Actual pipeline run can be found here [2]. Resulting zip is available as archived artifacts [3]. Job failed because there was no signature to archive as the signing and uploading functionality is currently disabled.
- [2] https://ci-builds.apache.org/job/KIE/job/test/job/mcimbalek/job/playground/job/kie-issues-828/job/kie-issues-828/job/tools/job/0-zip-and-upload-sources/5/
- [3] https://ci-builds.apache.org/job/KIE/job/test/job/mcimbalek/job/playground/job/kie-issues-828/job/kie-issues-828/job/tools/job/0-zip-and-upload-sources/5/artifact/sources-out/
Unless there are another change requests, I consider this PR ready from my side.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611206439
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
Review Comment:
Default branch checked out is specified either by variable or job parameter. It's not default specified by the repository itself. So in this case (and attached job run) it should indeed be 'main'
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611178119
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
Please create one zip file instead of a zip file for each repository. There should be one big zip file with all sources. Filename should be in the format of `incubator-kie-${params.VERSION_NUMBER}.zip`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611209633
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:

Please come to an agreement with @porcelli
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#issuecomment-2126636422
@baldimir I saw it. It got answered in the meantime. I understand it that packing container sources separately (or copying them into separate folder inside the zip) is not needed then.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611212633
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
Review Comment:
fixed. Also fixed default job parameters
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611230775
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
That screenshot is from February. Please see the release document here https://docs.google.com/document/d/1t-08b970i9PMBy-TSM64x0RUH46pzwnIhEi-LVeL0lg/edit. (I edited the version template for the file name based on that in my previous comment). More specifically, please see "AUTOMATION D: Release candidate job on Jenkins", section with Artifacts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611230775
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
That screenshot is from February. Please see the release document here https://docs.google.com/document/d/1t-08b970i9PMBy-TSM64x0RUH46pzwnIhEi-LVeL0lg/edit. (I edited the version template for the file name based on that in my previous comment).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "porcelli (via GitHub)" <gi...@apache.org>.
porcelli commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611264853
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
it has to be one big zip file as mentioned by @baldimir
examples and quickstart are not part of the release. as also pointed out by @cimbalek please check the release document
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#issuecomment-2126614312
@cimbalek please see Alex's reply here https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611271982
The sources zip should be 1 zip with those 7 repositories. I would say, just clone those repositories and zip them. I don't think there is any need to delete anything from those repositories.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611172509
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
Review Comment:
For optaplanner-quickstarts, we need to clone branch `development`. https://github.com/apache/incubator-kie-optaplanner-quickstarts/tree/development
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611256572
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
It's from february but since I gathered the information noone notified me about changes in the requirements. There was very few information about it.
https://github.com/apache/incubator-kie-issues/issues/828
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611270047
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
It was presented multiple times on the KIE weekly call and also on the dev mailing list (the release procedure was discussed there).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "porcelli (via GitHub)" <gi...@apache.org>.
porcelli commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611271982
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:
btw: the list of repos is already on the jenkinsfile that I shared
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "baldimir (via GitHub)" <gi...@apache.org>.
baldimir commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611171685
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
Review Comment:
We need to clone kogito-examples `main` branch. The default branch for kogito-examples is `stable`. So `main` needs to be specified here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues#828] Create zip files for source code [incubator-kie-kogito-pipelines]
Posted by "cimbalek (via GitHub)" <gi...@apache.org>.
cimbalek commented on code in PR #1202:
URL: https://github.com/apache/incubator-kie-kogito-pipelines/pull/1202#discussion_r1611209633
##########
.ci/jenkins/scripts/bash/zip-sources-all.sh:
##########
@@ -0,0 +1,145 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+### MANDATORY VARIABLES DEFINITION - UNCOMMENT FOR LOCAL USE ###
+### In Jenkins these VARIABLES are set as jenkins job parameters ###
+
+#VERSION="10.0.0"
+#BRANCH_DEFAULT="main"
+# Configuration in format "repository-id;repository_name;branch(if-override-needed)"
+# - eg.not all repositories have main branch
+#REPOS="drools-repo;incubator-kie-drools
+#kogito-runtimes-repo;incubator-kie-kogito-runtimes
+#kogito-apps-repo;incubator-kie-kogito-apps
+#kogito-images-repo;incubator-kie-kogito-images
+#optaplanner-repo;incubator-kie-optaplanner
+#kogito-serverless-operator-repo;incubator-kie-kogito-serverless-operator
+#optaplanner-quickstarts-repo;incubator-kie-optaplanner-quickstarts;stable
+#kogito-examples-repo;incubator-kie-kogito-examples
+#kie-tools-repo;incubator-kie-tools
+#kie-sandbox-quarkus-accelerator-repo;incubator-kie-sandbox-quarkus-accelerator
+#kogito-online-repo;incubator-kie-kogito-online"
+
+function zip_sources() {
+ SOURCES_DIRECTORY_NAME="sources"
+ REPO_ORGANIZATION="apache"
+
+ while read line; do
+ BRANCH=${BRANCH_DEFAULT}
+ #get rid of carriage return character if present
+ line="$(echo $line | sed 's#\r##g')"
+
+ #Clone
+ echo "Clone $( echo $line | awk -F';' '{ print $1 }' | sed 's\-repo\\g' )"
+ REPO_NAME=$( echo $line | awk -F';' '{print $2 }' )
+ REPO_DIRECTORY=${SOURCES_DIRECTORY_NAME}/${REPO_NAME}
+ REPO_BRANCH=$( echo $line | awk -F';' '{print $3}' )
+ if [[ ! -z ${REPO_BRANCH} ]]; then
+ BRANCH=$REPO_BRANCH
+ fi
+ git clone --branch ${BRANCH} --depth 1 "https://github.com/${REPO_ORGANIZATION}/${REPO_NAME}.git" ${REPO_DIRECTORY}
+ STATE=$?
+ if [[ ${STATE} != 0 ]]; then
+ echo "Clonning of ${REPO_NAME} was NOT successfull. Failing"
+ exit 1
+ fi
+ # clone_repository ${REPO_NAME} ${REPO_ORGANIZATION} ${BRANCH} ${REPO_DIRECTORY}
+
+ #Remove unnecessary dirs
+ pushd $REPO_DIRECTORY
+ CURRENT_DIRECTORY=$(pwd)
+ echo "Current directory is ${CURRENT_DIRECTORY}"
+ echo "Before .git removal"
+ ls -lha
+ echo "Searching for .git directory"
+ if [[ -d '.git' ]]; then
+ echo ".git directory found, deleting..."
+ rm -rf ".git"
+ fi
+ echo "After .git removal"
+ ls -lha
+ popd
+
+ #Creating ZIP
+ pushd ${SOURCES_DIRECTORY_NAME}
+ ZIP_FILE_NAME="${REPO_NAME}-sources-${VERSION}.zip"
Review Comment:

Please come to an agreement with Alex @porcelli
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org