Skip to content

build: add missing env var #5090

build: add missing env var

build: add missing env var #5090

Workflow file for this run

name: Build 5.3.7
on: [push, pull_request, workflow_dispatch]
concurrency:
group: lucee-build
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
DO_DEPLOY: "${{ github.event_name == 'push' && github.ref == 'refs/heads/5.4' }}"
LUCEE_BUILD_JAVA_VERSION: 8
LUCEE_TEST_JAVA_VERSION: ''
services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
MSSQL_PID: Express
ACCEPT_EULA: Y
SA_PASSWORD: Lucee!1433 # password must be complex or it won't start
ports:
- 1433:1433
options: --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P ${SA_PASSWORD} -Q 'SELECT 1' || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: szenius/[email protected]
with:
timezoneLinux: "UTC"
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Disable DEPLOY if not building with Java 8 (Lucee default)
if: ${{ env.LUCEE_BUILD_JAVA_VERSION != '8' }}
run: echo "DO_DEPLOY=false" >> $GITHUB_ENV
- name: Cache Lucee extensions
uses: actions/cache@v3
with:
path: ~/work/Lucee/Lucee/cache/
key: lucee-extensions
restore-keys: lucee-extensions
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('loader/pom.xml','core/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
maven-cache
- 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;'
- name: Start MongoDB (docker)
uses: supercharge/[email protected]
with:
mongodb-version: 4.4
mongodb-port: 27017
- name: Setup Memcached (docker)
uses: niden/actions-memcached@v7
- 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
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_ID_TEST }}
# s3 tests disabled due to LDEV-4474
#S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY_TEST }}
S3_BUCKET_PREFIX: lucee-ldev-5-
# DO_DEPLOY: ${{ github.event_name == 'push' }}
# for uploading successful builds
S3_ACCESS_ID_DOWNLOAD: ${{ secrets.S3_ACCESS_ID_DOWNLOAD }}
S3_SECRET_KEY_DOWNLOAD: ${{ secrets.S3_SECRET_KEY_DOWNLOAD }}
# used by travis-settings.xml
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
CI_DEPLOY_PASSPHRASE: ${{ secrets.CI_DEPLOY_PASSPHRASE }}
LUCEE_DOCKER_FILES_PAT_TOKEN: ${{ secrets.LUCEE_DOCKER_FILES_PAT_TOKEN }}
#run: ant -noinput -buildfile loader/build.xml
run: |
if [ "${{ env.DO_DEPLOY }}" == "true" ]; then
echo "------- Maven Deploy on ${{ github.event_name }} -------";
mvn -B -e -f loader/pom.xml clean deploy --settings travis-settings.xml;
else
echo "------- Maven Install on ${{ github.event_name }} ---------";
mvn -B -e -f loader/pom.xml clean install
fi
- 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/junit-test-results.xml
check_name: "Test Results"