|
| 1 | +name: Jackson 3 source build |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + source_refs: |
| 7 | + description: JSON map of prerequisite repositories to full commit SHAs |
| 8 | + type: string |
| 9 | + default: '{}' |
| 10 | + push: |
| 11 | + branches: [master] |
| 12 | +permissions: |
| 13 | + contents: read |
| 14 | + actions: read |
| 15 | +env: |
| 16 | + # Reviewed master policy and separately qualified candidate; both pins are immutable. |
| 17 | + JACKSON3_QUALIFIER_REVISION: f0d2100f972eec765b2b276e7ace38922394f0a6 |
| 18 | + JACKSON3_CORE_REVISION: 97b2359b92ed3e1d05cac04f2da8760aa954e49d |
| 19 | +jobs: |
| 20 | + test: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + timeout-minutes: 90 |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + with: |
| 26 | + path: consumer |
| 27 | + ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 28 | + - uses: actions/setup-java@v4 |
| 29 | + with: |
| 30 | + distribution: temurin |
| 31 | + java-version: '25' |
| 32 | + - uses: actions/checkout@v4 |
| 33 | + with: |
| 34 | + repository: networknt/light-4j |
| 35 | + ref: ${{ env.JACKSON3_QUALIFIER_REVISION }} |
| 36 | + path: qualification-policy |
| 37 | + - name: Select qualified core and resolve remaining prerequisites |
| 38 | + id: prerequisites |
| 39 | + env: |
| 40 | + GH_TOKEN: ${{ github.token }} |
| 41 | + SOURCE_REFS: ${{ inputs.source_refs || '{}' }} |
| 42 | + shell: bash |
| 43 | + run: | |
| 44 | + jq -e --arg core "$JACKSON3_CORE_REVISION" --argjson expected '["http-client","json-overlay","light-4j","light-aws-lambda","light-rest-4j","openapi-parser","yaml-rule"]' '.["light-4j"] == $core and keys == $expected and all(.[]; type == "string" and test("^[0-9a-f]{40}$"))' consumer/ci/jackson3-source-refs.json >/dev/null |
| 45 | + source_refs=$(jq -c --argjson overrides "$SOURCE_REFS" '. * $overrides' consumer/ci/jackson3-source-refs.json) |
| 46 | + python3 qualification-policy/scripts/resolve_jackson3_consumer_sources.py \ |
| 47 | + --core-sha "$JACKSON3_CORE_REVISION" \ |
| 48 | + --repositories '{"json-overlay":null,"openapi-parser":null,"light-rest-4j":null,"light-aws-lambda":null}' --source-refs "$source_refs" \ |
| 49 | + --report core-qualification.json --github-output "$GITHUB_OUTPUT" |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + with: |
| 52 | + repository: networknt/yaml-rule |
| 53 | + ref: ${{ steps.prerequisites.outputs.yaml_rule }} |
| 54 | + path: sources/yaml-rule |
| 55 | + - uses: actions/checkout@v4 |
| 56 | + with: |
| 57 | + repository: networknt/http-client |
| 58 | + ref: ${{ steps.prerequisites.outputs.http_client }} |
| 59 | + path: sources/http-client |
| 60 | + - uses: actions/checkout@v4 |
| 61 | + with: |
| 62 | + repository: networknt/light-4j |
| 63 | + ref: ${{ steps.prerequisites.outputs.light_4j }} |
| 64 | + path: sources/light-4j |
| 65 | + - uses: actions/checkout@v4 |
| 66 | + with: |
| 67 | + repository: networknt/json-overlay |
| 68 | + ref: ${{ steps.prerequisites.outputs.json_overlay }} |
| 69 | + path: sources/json-overlay |
| 70 | + - uses: actions/checkout@v4 |
| 71 | + with: |
| 72 | + repository: networknt/openapi-parser |
| 73 | + ref: ${{ steps.prerequisites.outputs.openapi_parser }} |
| 74 | + path: sources/openapi-parser |
| 75 | + - uses: actions/checkout@v4 |
| 76 | + with: |
| 77 | + repository: networknt/light-aws-lambda |
| 78 | + ref: ${{ steps.prerequisites.outputs.light_aws_lambda }} |
| 79 | + path: sources/light-aws-lambda |
| 80 | + - uses: actions/checkout@v4 |
| 81 | + with: |
| 82 | + repository: networknt/light-rest-4j |
| 83 | + ref: ${{ steps.prerequisites.outputs.light_rest_4j }} |
| 84 | + path: sources/light-rest-4j |
| 85 | + - name: Record source commits |
| 86 | + shell: bash |
| 87 | + run: | |
| 88 | + for source in consumer sources/*; do |
| 89 | + echo "$source $(git -C "$source" rev-parse HEAD)" |
| 90 | + done | tee source-commits.txt |
| 91 | + for source in sources/*; do |
| 92 | + printf '{"key":"%s","value":"%s"}\n' "${source##*/}" "$(git -C "$source" rev-parse HEAD)" |
| 93 | + done | jq -s from_entries | tee source-refs.json |
| 94 | + - name: Build prerequisites and run full tests |
| 95 | + shell: bash |
| 96 | + env: |
| 97 | + GH_TOKEN: ${{ github.token }} |
| 98 | + JACKSON3_REUSE_CORE_QUALIFICATION: 1 |
| 99 | + JACKSON3_CORE_SOURCE: ${{ github.workspace }}/sources/light-4j |
| 100 | + JACKSON3_CORE_QUALIFICATION_REPORT: ${{ github.workspace }}/core-qualification.json |
| 101 | + JACKSON3_MAVEN_REPO: ${{ runner.temp }}/m2 |
| 102 | + JACKSON3_YAML_RULE: ${{ github.workspace }}/sources/yaml-rule |
| 103 | + JACKSON3_HTTP_CLIENT: ${{ github.workspace }}/sources/http-client |
| 104 | + run: | |
| 105 | + set -euo pipefail |
| 106 | + bash qualification-policy/scripts/verify-jackson3-bootstrap.sh 2>&1 | tee source-build.log |
| 107 | + mvn -f sources/yaml-rule/pom.xml "-Dmaven.repo.local=$JACKSON3_MAVEN_REPO" clean install 2>&1 | tee -a source-build.log |
| 108 | + mvn -f sources/json-overlay/pom.xml "-Dmaven.repo.local=$JACKSON3_MAVEN_REPO" clean install 2>&1 | tee -a source-build.log |
| 109 | + mvn -f sources/openapi-parser/pom.xml "-Dmaven.repo.local=$JACKSON3_MAVEN_REPO" clean install 2>&1 | tee -a source-build.log |
| 110 | + mvn -f sources/light-rest-4j/pom.xml "-Dmaven.repo.local=$JACKSON3_MAVEN_REPO" clean install 2>&1 | tee -a source-build.log |
| 111 | + mvn -f sources/light-aws-lambda/pom.xml "-Dmaven.repo.local=$JACKSON3_MAVEN_REPO" clean install 2>&1 | tee -a source-build.log |
| 112 | + mvn -f consumer/pom.xml "-Dmaven.repo.local=$JACKSON3_MAVEN_REPO" clean install 2>&1 | tee -a source-build.log |
| 113 | + - name: Test native packaging script |
| 114 | + working-directory: consumer |
| 115 | + run: python3 tests/test_native_image_script.py |
| 116 | + - name: Build and invoke native Runtime locally |
| 117 | + working-directory: consumer |
| 118 | + env: |
| 119 | + MAVEN_REPO_LOCAL: ${{ runner.temp }}/m2 |
| 120 | + run: | |
| 121 | + bash native-image-linux.sh |
| 122 | + python3 tests/native_runtime_smoke.py target/custom-runtime/lambda-native |
| 123 | + - name: Audit resolved artifacts, including releases and Jackson boundaries |
| 124 | + env: |
| 125 | + SOURCE_MAVEN_REPO: ${{ runner.temp }}/m2 |
| 126 | + shell: bash |
| 127 | + run: | |
| 128 | + set -euo pipefail |
| 129 | + mvn -B -Dstyle.color=never -f consumer/pom.xml "-Dmaven.repo.local=$SOURCE_MAVEN_REPO" dependency:tree 2>&1 | tee resolved-dependencies.txt |
| 130 | + python3 sources/light-4j/scripts/jackson3_artifact_audit.py --repository "$SOURCE_MAVEN_REPO" --tree resolved-dependencies.txt --report artifact-audit.json --require-jackson3-only |
| 131 | + - uses: actions/upload-artifact@v4 |
| 132 | + if: always() |
| 133 | + with: |
| 134 | + name: source-build-reports |
| 135 | + path: | |
| 136 | + source-build.log |
| 137 | + source-commits.txt |
| 138 | + source-refs.json |
| 139 | + resolved-dependencies.txt |
| 140 | + artifact-audit.json |
| 141 | + core-qualification.json |
| 142 | + **/target/surefire-reports/** |
| 143 | + **/target/*smoke*.log |
0 commit comments