remove apache logging jars no longer needed and update apache collect… #12161
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build 7.0 | |
| on: | |
| workflow_call: | |
| inputs: | |
| LUCEE_TEST_JAVA_VERSION: | |
| required: true | |
| type: string | |
| LUCEE_BUILD_JAVA_VERSION: | |
| required: true | |
| type: string | |
| default: '25' | |
| push: | |
| branches: | |
| - '**' # thus ignoring tagging | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| LUCEE_BUILD_JAVA_VERSION: | |
| required: true | |
| type: string | |
| default: '25' | |
| LUCEE_TEST_JAVA_VERSION: | |
| description: Optional Java Test version, default is the build java version | |
| required: false | |
| type: string | |
| #concurrency: | |
| # group: ${{ github.head_ref }} | |
| # cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DO_DEPLOY: "${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/8.0') }}" | |
| # Push to 8.0 with "[release]" in the commit message deploys to Maven even when pom version ends with -ALPHA | |
| FORCE_RELEASE: "${{ github.event_name == 'push' && contains(github.event.head_commit.message, '[release]') }}" | |
| LUCEE_BUILD_JAVA_VERSION: 25 | |
| LUCEE_TEST_JAVA_VERSION: '' | |
| services: | |
| ldap: | |
| image: ghcr.io/lucee/test-openldap:test-mirror | |
| ports: | |
| - 10389:10389 | |
| - 10636:10636 | |
| sql-server: | |
| image: ghcr.io/lucee/mssql-server:test-mirror | |
| env: | |
| MSSQL_PID: Express | |
| ACCEPT_EULA: Y | |
| SA_PASSWORD: Lucee!1433 # password must be complex or the service won't start | |
| ports: | |
| - 1433:1433 | |
| options: --health-cmd="/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5 | |
| redis: | |
| image: ghcr.io/lucee/redis:test-mirror | |
| # Set health checks to wait until redis has started | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps port 6379 on service container to the host | |
| - 6379:6379 | |
| greenmail: | |
| image: ghcr.io/lucee/greenmail-standalone:test-mirror | |
| ports: | |
| - 3025:3025 #SMTP | |
| - 3110:3110 #POP3 | |
| - 3143:3143 #IMAP | |
| - 3465:3465 #SMTPS | |
| - 3993:3993 #IMAPS | |
| - 3995:3995 #POP3S | |
| - 8080:8080 #API | |
| httpbin: | |
| image: ghcr.io/lucee/httpbin:test-mirror | |
| ports: | |
| - 8081:80 | |
| mockllm: | |
| image: ghcr.io/dwmkerr/mock-llm:latest | |
| ports: | |
| - 6556:6556 | |
| steps: | |
| # when workflow is run via a workflow_call, these vars are found under input, which doesn't exist otherwise | |
| # so lets copy them over to the normal env vars | |
| - name: Configure Build Java Version | |
| if: ${{ inputs.LUCEE_BUILD_JAVA_VERSION != '' }} | |
| run: echo "LUCEE_BUILD_JAVA_VERSION=${{ inputs.LUCEE_BUILD_JAVA_VERSION }}" >> $GITHUB_ENV | |
| - name: Configure Test Java Version | |
| if: ${{ inputs.LUCEE_TEST_JAVA_VERSION != '' }} | |
| run: echo "LUCEE_TEST_JAVA_VERSION=${{ inputs.LUCEE_TEST_JAVA_VERSION }}" >> $GITHUB_ENV | |
| - uses: szenius/set-timezone@v2.0 | |
| with: | |
| timezoneLinux: "UTC" | |
| - uses: actions/checkout@v4 | |
| - name: Set up Test Java Version ${{ env.LUCEE_TEST_JAVA_VERSION }} | |
| uses: actions/setup-java@v4 | |
| if: ${{ env.LUCEE_TEST_JAVA_VERSION != '' }} | |
| with: | |
| java-version: ${{ env.LUCEE_TEST_JAVA_VERSION }} | |
| distribution: 'temurin' | |
| - name: Stash Test Java Version Home | |
| if: ${{ env.LUCEE_TEST_JAVA_VERSION != '' }} | |
| run: echo "LUCEE_TEST_JAVA_EXEC=${{ env.JAVA_HOME }}/bin/java" >> $GITHUB_ENV | |
| - name: Set up build JDK '${{ env.LUCEE_BUILD_JAVA_VERSION }}' | |
| uses: actions/setup-java@v4 | |
| if: ${{ env.LUCEE_TEST_JAVA_VERSION != env.LUCEE_BUILD_JAVA_VERSION }} | |
| with: | |
| java-version: '${{ env.LUCEE_BUILD_JAVA_VERSION }}' | |
| distribution: 'temurin' | |
| - name: Cache Lucee extensions | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/work/Lucee/Lucee/cache/ | |
| key: lucee-extensions | |
| restore-keys: lucee-extensions | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository/* | |
| !~/.m2/repository/org/lucee/lucee/ | |
| key: ${{ runner.os }}-maven-${{ hashFiles('loader/pom.xml','core/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Import GPG key | |
| run: | | |
| if [[ ! -z "$GPG_PRIVATE_KEY" ]]; then | |
| echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --import | |
| fi | |
| env: | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| - name: Set up MySQL (local) | |
| run: | | |
| sudo systemctl start mysql | |
| mysql -e 'CREATE DATABASE lucee' -uroot -proot | |
| mysql -e 'CREATE USER "lucee"@"localhost" IDENTIFIED WITH mysql_native_password BY "lucee";' -uroot -proot | |
| mysql -e 'GRANT ALL PRIVILEGES ON lucee.* TO "lucee"@"localhost"' -uroot -proot | |
| - name: Set up Postgres (local) | |
| run: | | |
| sudo /etc/init.d/postgresql start | |
| sudo -u postgres psql -c 'create database lucee;' | |
| sudo -u postgres psql -c "create user lucee with encrypted password 'lucee'"; | |
| sudo -u postgres psql -c 'grant all privileges on database lucee to lucee;' | |
| sudo -u postgres psql -c 'grant all on schema public to lucee;' -d lucee | |
| - name: Start MongoDB (docker) | |
| run: | | |
| docker run -d --name mongodb -p 27017:27017 mongo:4.4 | |
| sleep 5 | |
| - name: Setup Memcached (docker) | |
| run: | | |
| docker run -d --name memcached -p 11211:11211 memcached:latest | |
| sleep 5 | |
| - name: Start aimock | |
| run: | | |
| cd "${{ github.workspace }}/test/fixtures/aimock" | |
| nohup npx -y @copilotkit/aimock --config aimock.json --host 0.0.0.0 --port 4010 > "$RUNNER_TEMP/aimock.log" 2>&1 & | |
| echo $! > "$RUNNER_TEMP/aimock.pid" | |
| for i in $(seq 1 30); do | |
| if curl -sf -X POST http://127.0.0.1:4010/v1/messages \ | |
| -H "Content-Type: application/json" \ | |
| -H "x-api-key: mock" \ | |
| -H "anthropic-version: 2023-06-01" \ | |
| -d '{"model":"claude-3-sonnet-20240229","max_tokens":10,"messages":[{"role":"user","content":"ping"}]}' >/dev/null; then | |
| echo "aimock ready on port 4010" | |
| exit 0 | |
| fi | |
| if [ -f "$RUNNER_TEMP/aimock.pid" ] && ! kill -0 "$(cat "$RUNNER_TEMP/aimock.pid")" 2>/dev/null; then | |
| echo "aimock process exited early" | |
| cat "$RUNNER_TEMP/aimock.log" | |
| exit 1 | |
| fi | |
| sleep 2 | |
| done | |
| echo "aimock failed to become ready" | |
| cat "$RUNNER_TEMP/aimock.log" | |
| exit 1 | |
| - name: Extract version number | |
| id: extract-version | |
| run: | | |
| VERSION=$(mvn -f loader/pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout | tr -d '[:space:]\r\n') | |
| echo "VERSION: '$VERSION'" | |
| if [[ ! "$VERSION" =~ ^[0-9]+(\.[0-9]+)+(-[A-Za-z]+)?$ ]]; then | |
| echo "::error::Invalid extracted version '$VERSION' — aborting before any deploy" | |
| exit 1 | |
| fi | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Build Lucee with Maven | |
| env: | |
| MYSQL_SERVER: localhost | |
| MYSQL_USERNAME: lucee | |
| MYSQL_PASSWORD: lucee | |
| MYSQL_PORT: 3306 | |
| MYSQL_DATABASE: lucee | |
| POSTGRES_SERVER: localhost | |
| POSTGRES_USERNAME: lucee | |
| POSTGRES_PASSWORD: lucee | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_DATABASE: lucee | |
| MONGODB_SERVER: localhost | |
| MONGODB_PORT: 27017 | |
| MONGODB_DB: lucee | |
| MONGODB_DATABASE: lucee | |
| MSSQL_SERVER: localhost | |
| MSSQL_USERNAME: sa | |
| MSSQL_PASSWORD: Lucee!1433 | |
| MSSQL_PORT: 1433 | |
| MSSQL_DATABASE: master | |
| MEMCACHED_PORT: 11211 | |
| MEMCACHED_SERVER: localhost | |
| REDIS_PORT: 6379 | |
| REDIS_SERVER: localhost | |
| SMTP_PORT_INSECURE: 3025 | |
| SMTP_PORT_SECURE: 3465 | |
| SMTP_SERVER: localhost | |
| SMTP_USERNAME: lucee | |
| SMTP_PASSWORD: doesntmatter | |
| IMAP_PORT_INSECURE: 3143 | |
| IMAP_PORT_SECURE: 3993 | |
| IMAP_SERVER: localhost | |
| IMAP_USERNAME: lucee | |
| IMAP_PASSWORD: doesntmatter | |
| POP_PORT_INSECURE: 3110 | |
| POP_PORT_SECURE: 3995 | |
| POP_SERVER: localhost | |
| POP_USERNAME: lucee | |
| POP_PASSWORD: doesntmatter | |
| LDAP_SERVER: localhost | |
| LDAP_PORT: 10389 | |
| LDAP_PORT_SECURE: 10636 | |
| LDAP_BASE_DN: dc=planetexpress,dc=com | |
| LDAP_USERNAME: cn=admin,dc=planetexpress,dc=com | |
| LDAP_PASSWORD: GoodNewsEveryone | |
| HTTPBIN_SERVER: localhost | |
| HTTPBIN_PORT: 8081 | |
| AIMOCK_SERVER: localhost | |
| AIMOCK_PORT: 6556 | |
| AIMOCK_MULTI_PORT: 4010 | |
| S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_ID_TEST }} | |
| S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY_TEST }} | |
| S3_BUCKET_PREFIX: lucee-ldev-6- | |
| # for uploading successful builds | |
| S3_ACCESS_ID_DOWNLOAD: ${{ secrets.S3_ACCESS_ID_DOWNLOAD }} | |
| S3_SECRET_KEY_DOWNLOAD: ${{ secrets.S3_SECRET_KEY_DOWNLOAD }} | |
| # used by maven-settings.xml | |
| MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} | |
| GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | |
| GITHUB_RUN_NUMBER: ${{ github.run_number }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| LUCEE_DOCKER_FILES_PAT_TOKEN: ${{ secrets.LUCEE_DOCKER_FILES_PAT_TOKEN }} | |
| LUCEE_BUILD_FAIL_CONFIGURED_SERVICES_FATAL: true | |
| run: | | |
| VERSION_CLEAN="${VERSION//[$'\t\r\n ']}" | |
| echo "-------DO_DEPLOY: ${{ env.DO_DEPLOY }} -------" | |
| echo "-------FORCE_RELEASE: ${{ env.FORCE_RELEASE }} -------" | |
| echo "-------VERSION_CLEAN: '$VERSION_CLEAN' -------" | |
| if [[ "$VERSION_CLEAN" == *-SNAPSHOT ]]; then | |
| echo "------- Maven Deploy SNAPSHOT on ${{ github.event_name }} ---------" | |
| mvn -B -e -f loader/pom.xml clean deploy --settings maven-settings.xml -DtestJavaVersionExec="${{ env.LUCEE_TEST_JAVA_EXEC }}" | |
| elif [[ "$VERSION_CLEAN" == *-ALPHA ]]; then | |
| if [[ "${{ env.FORCE_RELEASE }}" == "true" && "${{ env.DO_DEPLOY }}" == "true" ]]; then | |
| echo "------- Maven Deploy RELEASE (forced via [release] commit message) on ${{ github.event_name }} -------" | |
| mvn -B -e -f loader/pom.xml clean deploy --settings maven-settings.xml -DperformRelease=true -DtestJavaVersionExec="${{ env.LUCEE_TEST_JAVA_EXEC }}" | |
| else | |
| echo "------- Maven Install ALPHA (no deployment) on ${{ github.event_name }} ---------" | |
| mvn -B -e -f loader/pom.xml clean install -DtestJavaVersionExec="${{ env.LUCEE_TEST_JAVA_EXEC }}" | |
| fi | |
| else | |
| if [[ "${{ env.DO_DEPLOY }}" == "true" ]]; then | |
| echo "------- Maven Deploy RELEASE on ${{ github.event_name }} -------" | |
| mvn -B -e -f loader/pom.xml clean deploy --settings maven-settings.xml -DperformRelease=true -DtestJavaVersionExec="${{ env.LUCEE_TEST_JAVA_EXEC }}" | |
| else | |
| echo "------- Maven Test RELEASE (no deploy) on ${{ github.event_name }} ---------" | |
| mvn -B -e -f loader/pom.xml test -DtestJavaVersionExec="${{ env.LUCEE_TEST_JAVA_EXEC }}" | |
| fi | |
| fi | |
| - name: clean github.ref_name | |
| uses: mad9000/actions-find-and-replace-string@5 | |
| id: cleanrefname | |
| if: always() | |
| with: | |
| source: ${{ github.ref_name }} | |
| find: '/' | |
| replace: '-' | |
| - name: Upload Artifact (junit-test-results) | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: Lucee-${{ steps.cleanrefname.outputs.value }}-junit-test-results-${{ github.run_number }} | |
| path: test/reports/*.xml | |
| - name: Remove Lucee build artifacts from local maven cache (avoid growing cache) | |
| run: | | |
| rm -rfv ~/.m2/repository/org/lucee/lucee/ | |
| - name: Publish Test Results | |
| uses: EnricoMi/publish-unit-test-result-action@v2 | |
| if: always() | |
| with: | |
| files: test/reports/*.xml | |
| check_name: "Lucee Test Results" |