Skip to content

Bump body-parser and express in /application/frontend #627

Bump body-parser and express in /application/frontend

Bump body-parser and express in /application/frontend #627

Workflow file for this run

name: pipeline
env:
MAVEN_ARGS: -B -C -V -ntp -Dhttp.keepAlive=false -e
on:
push:
branches:
- '*'
tags:
- "*"
pull_request:
types: [ opened, synchronize, reopened ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
java-version: [ 17 ]
python-version: [ '3.10' ]
node-version: [ 14 ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up jdk ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get release notes
id: config
run: |
source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh)
- name: Output release notes
run: |
echo "${{ steps.config.outputs.GIT_RELEASE_NOTES }}"
echo CURRENT_VERSION="${{ steps.config.outputs.CURRENT_VERSION }}"
- name: Cache maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Everything
run: |
mvn ${MAVEN_ARGS} clean install -DskipTests -Djacoco.skip=true
- name: Start the stack
run: |
cd environment/local
docker-compose up -d
- name: Wait for CMS to start
run: |
echo "Waiting for bundles to be installed"
export LOGIN="wsadmin:wsadmin"
export ADDRESS="http://0.0.0.0:8080"
export INSTALL_CHECK="/system/console/bundles.json"
echo "curl -u $LOGIN --header Referer:${ADDRESS} --silent --connect-timeout 5 --max-time 5 ${ADDRESS}${INSTALL_CHECK} | grep -q \"state\":\"Installed\" && echo true || echo false"
echo "Wait: "
echo -n "." ""
while [[ "true" == "$(curl -L -u "$LOGIN" --header "Referer:${ADDRESS}" --silent -N --connect-timeout 5 --max-time 5 "${ADDRESS}${INSTALL_CHECK}" | grep -q "\"state\":\"Installed\"" && echo true || echo false)" ]]; do
echo -n "." ""
$SLEEP 1
done
echo "" ""
echo "Bundles are installed"
# - name: Install test content
# run: |
# cd tests/content
# mvn clean install -P autoInstallPackage -Dsling.install.package.host=0.0.0.0 -Dsling.install.package.username=wsadmin -Dsling.install.package.password=wsadmin
# - name: Run Automation tests
# run: |
# cd tests/end-to-end
# npm install
# npm run test:ci
# npm run report:createHtml
# - name: Cypress run
# uses: cypress-io/github-action@v5
# with:
# config: pageLoadTimeout=250000,baseUrl=http://0.0.0.0:8080
# wait-on: "http://0.0.0.0:8080"
# project: tests/end-to-end
# install: false
# build: |
# npm install
# command: |
# npm run test:ci
# npm run report:createHtml
- name: Run Automation tests
run: |
cd environment/local
docker-compose --profile test up cmstest
- name: Stop the stack
run: |
cd environment/local
docker-compose down
- name: Automation test if failure
run: |
df
docker ps -a
cd environment/local
docker-compose down
if: failure()
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./tests/end-to-end/cypress/reports/html/
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: tests/end-to-end/cypress/reports/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Zip Artifacts Folder
if: startsWith(github.ref, 'refs/tags/')
run: |
cd distribution/target/artifacts
zip -qq -r artifacts.zip .
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: false
generate_release_notes: true
files: |
artifacts.zip