Skip to content

Commit

Permalink
Update milestone-worker.yml github-release.yml [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
corneil committed Aug 16, 2023
1 parent 792b112 commit 40fdb4d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-snapshot-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ jobs:
# build and publish to configured target
- name: Build and Publish
run: |
mvn clean
./spring-cloud-dataflow-package/set-package-version.sh
jfrog rt mvn clean install -Pfull -B $MAVEN_THREADS
jfrog rt mvn install -Pfull -B $MAVEN_THREADS
jfrog rt build-publish
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname=spring-cloud-dataflow-main >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
mvn clean
./spring-cloud-dataflow-package/set-package-version.sh
jfrog rt mvn install -Pfull,asciidoctordocs,restdocs -B $MAVEN_THREADS
jfrog rt mvn install -Pfull,asciidoctordocs,restdocs -B
jfrog rt build-publish
- name: Capture Test Results
if: ${{ always() }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/milestone-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true

env:
MAVEN_THREADS: '-T 2'
MAVEN_THREADS: '-T 0.5C'

jobs:
build:
Expand Down Expand Up @@ -87,10 +87,7 @@ jobs:
-B
jfrog rt build-clean
./spring-cloud-dataflow-package/set-package-version.sh
jfrog rt mvn clean install \
-gs .github/settings.xml \
-P-spring,stagingmilestone,full,deploymentfiles \
-DskipTests -B $MAVEN_THREADS
jfrog rt mvn -gs .github/settings.xml -Pstagingmilestone,full,deploymentfiles -B install -DskipTests
jfrog rt build-publish
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_version=$(mvn -gs .github/settings.xml -Pstagingmilestone help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname=spring-cloud-dataflow-main-milestone >> $GITHUB_ENV
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/next-dev-version-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ jobs:
-DnewVersion=${BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version} \
-B
jfrog rt build-clean
mvn clean
./spring-cloud-dataflow-package/set-package-version.sh
jfrog rt mvn clean install -DskipTests -B $MAVEN_THREADS
jfrog rt mvn install -DskipTests -B
jfrog rt build-publish
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname=spring-cloud-dataflow-main-ndv >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,9 @@ jobs:
-DnewVersion=${BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_version} \
-B
jfrog rt build-clean
mvn clean
./spring-cloud-dataflow-package/set-package-version.sh
jfrog rt mvn clean install \
-gs .github/settings.xml \
-Pstagingrelease,full,deploymentfiles \
-DskipTests -B $MAVEN_THREADS
jfrog rt mvn -gs .github/settings.xml -Pstagingrelease,full,deploymentfiles -B install -DskipTests
jfrog rt build-publish
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname=spring-cloud-dataflow-main-release >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-dataflow-package/set-package-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ fi
echo "PACKAGE_VERSION=$PACKAGE_VERSION"
if [[ "$PACKAGE_VERSION" != *"SNAPSHOT"* ]]; then
yq '.default.version="release"' -i "$SCDIR/../src/deploy/versions.yaml"
echo "Setting default.version=release"
echo "Setting default.version=release $PACKAGE_VERSION"
yq ".default.package-version=\"$PACKAGE_VERSION\"" -i "$SCDIR/../src/deploy/versions.yaml"
fi
29 changes: 25 additions & 4 deletions src/deploy/k8s/use-mk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "$sourced" = "0" ]; then
exit 1
fi
if [ "$1" = "" ]; then
echo "Arguments <driver> [--namespace <namespace>] [database] [broker]"
echo "Arguments <driver> [--namespace <namespace>] [database] [broker] [--pro] [--skip-reg] [--release] [--snapshot] [--milestone]"
echo "Driver must be one of kind, Or a valid driver for minikube like kvm2, docker, vmware, virtualbox, podman, vmwarefusion, hyperkit"
return 0
fi
Expand All @@ -15,6 +15,10 @@ KUBECONFIG=
NS=scdf
METRICS=
SKIP_REG=
VERSION_FILE=$(realpath "$SCDIR/../versions.yaml")
VERSION_TYPE=$(cat "$VERSION_FILE" | yq '.default.version')
SCDF_TYPE=$(cat "$VERSION_FILE" | yq '.default.scdf-type')
FORCE_VERSION=false
shift
while [ "$1" != "" ]; do
case "$1" in
Expand All @@ -33,6 +37,18 @@ while [ "$1" != "" ]; do
"prometheus" | "grafana")
METRICS=prometheus
;;
"--release")
VERSION_TYPE=release
FORCE_VERSION=true
;;
"--snapshot")
VERSION_TYPE=snapshot
FORCE_VERSION=true
;;
"--milestone")
VERSION_TYPE=milestone
FORCE_VERSION=true
;;
"--skip-reg")
export SKIP_REG=true
;;
Expand All @@ -56,17 +72,22 @@ done
echo "Namespace: $NS"
export NS
if [ "$BROKER" != "" ]; then
echo "Broker: $BROKER"
echo "BROKER: $BROKER"
export BROKER
fi
if [ "$DATABASE" != "" ]; then
echo "Database: $DATABASE"
echo "DATABASE: $DATABASE"
export DATABASE
fi
if [ "$METRICS" != "" ]; then
echo "Metrics: $METRICS"
echo "METRICS: $METRICS"
export METRICS
fi
export K8S_DRIVER
export KUBECONFIG

if [ "$DATAFLOW_VERSION" = "" ] || [ "$FORCE_VERSION" = "true" ]; then
DATAFLOW_VERSION=$(cat $VERSION_FILE | yq ".scdf-type.${SCDF_TYPE}.${VERSION_TYPE}")
export DATAFLOW_VERSION
echo "DATAFLOW_VERSION: $DATAFLOW_VERSION"
fi

0 comments on commit 40fdb4d

Please sign in to comment.