Skip to content

CI: test Starter vs CMS development version #195

CI: test Starter vs CMS development version

CI: test Starter vs CMS development version #195

# Copyright (C) 2022 Dynamic Solutions
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: 'CI: test Starter vs CMS development version'
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1-5'
env:
AWS_REGION: "eu-central-1"
APP_LC_FRONTEND_MODULE: applications/luna-low-code/frontend
APP_CC_FRONTEND_MODULE: applications/luna-custom-code/frontend
permissions:
id-token: write
contents: read
jobs:
build-starter-with-latest-cms-snapshots:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.GCP_WEBSIGHT_RELEASES_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_WEBSIGHT_SNAPSHOTS_SNAPSHOT_READ_SA }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: 'maven'
- uses: actions/cache@v3
with:
path: |
${{ env.APP_LC_FRONTEND_MODULE }}/node
${{ env.APP_LC_FRONTEND_MODULE }}/node_modules
${{ env.APP_CC_FRONTEND_MODULE }}/node
${{ env.APP_CC_FRONTEND_MODULE }}/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Update dependencies to the latest snapshot version
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
run: |
export CMS_VERSION=`./mvnw versions:update-properties | grep 'Updated ${websight.cms.version}.*SNAPSHOT' | sed 's/.*Updated ${websight.cms.version} from.*to //'`
if [ -z "$CMS_VERSION" ]; then
echo 'WebSight CMS version not updated'
exit 1
else
echo "WebSight CMS version updated to $CMS_VERSION"
fi
- name: Build and test
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
run: ./mvnw --batch-mode --update-snapshots clean install -P e2e-functional
- name: Clear snapshots before caching
if: always()
run: find ~/.m2/repository/pl/ds -name "*-SNAPSHOT" -type d -print -prune -exec rm -r "{}" \;