Skip to content

Commit

Permalink
Merge branch 'corneil-main-target'
Browse files Browse the repository at this point in the history
The big whoppa
  • Loading branch information
onobc committed Sep 30, 2024
2 parents 1297af7 + f975c5f commit 799c226
Show file tree
Hide file tree
Showing 877 changed files with 23,310 additions and 24,989 deletions.
8 changes: 4 additions & 4 deletions .github/actions/build-images/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ if [ "$TAG" == "" ]; then
exit 1
fi
if [ "$DEFAULT_JDK" = "" ]; then
echo "DEFAULT_JDK not found using 11"
DEFAULT_JDK=11
echo "DEFAULT_JDK not found using 17"
DEFAULT_JDK=17
else
echo "DEFAULT_JDK=$DEFAULT_JDK"
fi
Expand All @@ -20,7 +20,7 @@ function pack_image {
fi
echo "Creating: $REPO:$TAG-jdk$v"
# --buildpack "paketo-buildpacks/[email protected]" --buildpack "paketo-buildpacks/[email protected]"
pack build --builder gcr.io/paketo-buildpacks/builder:base \
pack build --builder paketobuildpacks/builder-jammy-base:latest \
--path "$JAR" \
--trust-builder --verbose \
--env BP_JVM_VERSION=$v "$REPO:$TAG-jdk$v"
Expand All @@ -37,7 +37,7 @@ for ((i = 0; i < LEN; i++)); do
IMAGE="$(jq -r --argjson index $i '.include[$index] | .image' .github/workflows/images.json)"
ARTIFACT_ID="$(jq -r --argjson index $i '.include[$index] | .name' .github/workflows/images.json)"
# 8 11 17 21
for v in 8 11 17; do
for v in 17 21; do
pack_image "$TARGET/$ARTIFACT_ID" $IMAGE $v $ARTIFACT_ID
RC=$?
if [ $RC -ne 0 ]; then
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if [ "$TAG" == "" ]; then
exit 1
fi
if [ "$DEFAULT_JDK" = "" ]; then
echo "DEFAULT_JDK not found using 11"
DEFAULT_JDK=11
echo "DEFAULT_JDK not found using 17"
DEFAULT_JDK=17
else
echo "DEFAULT_JDK=$DEFAULT_JDK"
fi
Expand Down Expand Up @@ -55,7 +55,8 @@ if [ ! -f "$JAR" ]; then
exit $RC
fi
fi
for v in 8 11 17; do
# TODO add Java 21 when packeto supports it
for v in 17; do
echo "Creating: $REPO:$TAG-jdk$v"
pack build --builder gcr.io/paketo-buildpacks/builder:base \
--path "$JAR" \
Expand Down Expand Up @@ -93,9 +94,5 @@ for v in 8 11 17; do
fi
fi
done
#if [ "$PUSH" == "true" ]; then
# echo "Pruning Docker"
# docker system prune -f
# docker system prune --volumes -f
#fi


6 changes: 3 additions & 3 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- name: Load matrix
id: matrix
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- name: Install pack
uses: jvalkeal/[email protected]
Expand All @@ -81,7 +81,7 @@ jobs:
shell: bash
env:
TAG: ${{ needs.prepare.outputs.version }}
DEFAULT_JDK: '11'
DEFAULT_JDK: '17'
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
DELETE_TAGS: ${{ inputs.delete-tags }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-snapshot-controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
"workflow_dispatch": {
"owner": "spring-cloud",
"repo": "spring-cloud-deployer",
"ref": "main",
"ref": "main-3",
"workflow": "build-snapshot-worker.yml"
}
},
Expand All @@ -39,7 +39,7 @@ jobs:
"workflow_dispatch": {
"owner": "spring-cloud",
"repo": "spring-cloud-dataflow-ui",
"ref": "main",
"ref": "main-3",
"workflow": "build-snapshot-worker.yml"
}
},
Expand All @@ -49,7 +49,7 @@ jobs:
"workflow_dispatch": {
"owner": "spring-cloud",
"repo": "spring-cloud-dataflow",
"ref": "main",
"ref": "main-3",
"workflow": "build-snapshot-worker.yml"
}
},
Expand All @@ -59,7 +59,7 @@ jobs:
"workflow_dispatch": {
"owner": "spring-cloud",
"repo": "spring-cloud-dataflow",
"ref": "main",
"ref": "main-3",
"workflow": "carvel-worker.yml"
}
},
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-snapshot-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
${{ runner.os }}-m2-${{ matrix.db }}
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-uaa-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
path: src/docker/uaa/uaa
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- name: Build UAA Test Image
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-carvel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI Carvel
on:
push:
branches:
- main
- main-3
paths:
- 'src/carvel/**'
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-java@v3
if: ${{ inputs.version == null || inputs.version == '' }}
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- name: Version from POM
if: ${{ inputs.version == null || inputs.version == '' }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-it-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand All @@ -40,7 +40,7 @@ jobs:
-Dgroups=${{ matrix.group }} \
-Pfailsafe \
--batch-mode \
test
verify
- name: Integration Test Report for ${{ matrix.group }}
id: test_report
uses: dorny/test-reporter@v1
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-it-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand All @@ -37,7 +37,7 @@ jobs:
-Dgroups=performance \
-Pfailsafe \
--batch-mode \
test
verify
- name: Test Report
uses: dorny/test-reporter@v1
if: ${{ success() || failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-it-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- name: Build
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# jdk8
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
${{ runner.os }}-m2-${{ matrix.db }}
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fix-deployment-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Fix Deployment Files
on:
push:
branches:
- main
- main-3

jobs:
build:
Expand All @@ -18,7 +18,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/milestone-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/next-dev-version-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'liberica'
- uses: jvalkeal/setup-maven@v1
with:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/schedule-train-builds.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/workflow.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
= Workflow Reference

This README serves as a guide to the GitHub Action workflows included in this repository.
It outlines the purpose and functionality of each workflow, detailing their role in the CI and release processes.
Additionally, this document provides an overview of the scripts and actions utilized in these workflows, offering insights into how they work together in SCDF's CI/CD pipeline.

This document is a work in progress, and as various workflows are updated, the documentation will be revised to reflect both existing and new behaviors.


== Building Docker Images and pushing the containers to DockerHub
.This diagram shows the flow of execution of how workflows create Docker imges.
```
┌─────────────────────────┐
│ │
│ │
│build-snapshot-worker.yml┼────┐
│ │ │
│ │ │
└─────────────────────────┘ │
┌─────────────────────────┐ │
│ │ │
│ │ │
│ ci-images.yml ┼────┤ ┌─────────────────────────┐ ┌─────────────────────────┐
│ │ │ │ │ │ │
│ │ │ │ │ │ │
└─────────────────────────┘ ├────►│ build-images.yml ┼────────►│ build-image.sh │
┌─────────────────────────┐ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ └───────────┬─────────────┘ └─────────────────────────┘
│ ci.yml ┼────┤ │
│ │ │ │
│ │ │ ┌───────────┴─────────────┐
└─────────────────────────┘ │ │ │
┌─────────────────────────┐ │ │ │
│ │ │ │ images.json │
│ │ │ │ │
│ release-worker.yml ┼────┘ │ │
│ │ └─────────────────────────┘
│ │
└─────────────────────────┘
```

Part of the release and CI process involves creating and pushing images to a registry (such as DockerHub) for the Dataflow server, Skipper server, CTR app, and other components.
This process is managed by the `build-images` (build-images.yml) workflow. While the `build-images` workflow is typically not run independently, it is invoked by other workflows that handle CI builds and releases.
The `build-images` workflow determines which images to create based on the `images.json` file.
This file contains metadata on the primary SCDF components that need to have an associated image.
Each entry specifies the location (directory) where the jar can be found, jar name, and image name for each artifact that will be used to construct the image.
For each entry in the `images.json` file, the workflow calls the `build-image.sh` script, which retrieves the jar, builds the image, and then pushes it to the registry.

SCDF also provides images for external applications that support some of the optional features that are offered by dataflow.
These include Grafana and Prometheus local.
These images are created and pushed using the docker/build-push-action@v2 action.

=== Scripts used to build images
As mentioned above, the `build-image.sh` script is responsible for building the specified image based on the parameters provided and then pushing the image to Dockerhub.
This script uses Paketo to build an image for each of the supported Java versions using the corresponding jar file.
The resulting image name will look something like `spring-cloud-dataflow-server:3.0.0-SNAPSHOT-jdk17`.
Additionally, the script creates a default image using the default Java version as specified by the `DEFAULT_JDK` environment variable.

The format for running the `build-image.sh` is as follows:
[source, bash]
```
bash
./build-image.sh <directory containing the jar> <The name of the image to create> <name of the jar>
```

There is an optional `DEFAULT_JDK` environment variable that allows you to set the JDK version for the default image created.
If not the script will set it to its current setting (which as of the writing of this document is `17`).

NOTE: When new releases of Java are available and are compliant with the SCDF release, they need to be added to the `build-image.sh` script.

Loading

0 comments on commit 799c226

Please sign in to comment.