Moving from Capella 6.1.0 to Capella 7.0.0. #122
This file contains 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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Environment | |
run: | | |
echo GITHUB_WORKSPACE $GITHUB_WORKSPACE | |
echo GITHUB_REF $GITHUB_REF | |
echo GITHUB_SHA $GITHUB_SHA | |
echo GITHUB_EVENT_NAME $GITHUB_EVENT_NAME | |
- uses: actions/[email protected] | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
- name: Install metacity and xvfb | |
uses: awalsh128/[email protected] | |
with: | |
packages: xvfb metacity | |
version: cache-apt-pkgs-${{ matrix.profile }} | |
- name: Build with Maven | |
run: | | |
/usr/bin/Xvfb :99 -ac -screen 0 1440x900x16& | |
ps auxwww | grep Xvfb | |
export DISPLAY=:99 | |
echo DISPLAY $DISPLAY | |
mvn clean verify -e -Dgpg.skip=true -Dmaven.wagon.provider.http=httpclient -Dmaven.artifact.threads=12 -Dhttp.tcp.nodelay=false | |
- name: Prepare deploy local directory | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
id: prepare_deploy | |
run: | | |
chmod a+x prepare-deploy-local-dir.sh | |
export TAG_OR_BRANCH="$(echo $GITHUB_REF | cut -d"/" -f3)/nightly" | |
if [[ "$(echo $GITHUB_REF | cut -d"/" -f2)" != "heads" ]]; then export TAG_OR_BRANCH="$(echo $GITHUB_REF | cut -d"/" -f3)"; fi | |
./prepare-deploy-local-dir.sh $GITHUB_WORKSPACE/$TAG_OR_BRANCH | |
echo "TAG_OR_BRANCH=${TAG_OR_BRANCH}" >> $GITHUB_OUTPUT | |
- name: Deploy to S3 | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: "eu-west-1" | |
SOURCE_DIR: ${{ steps.prepare_deploy.outputs.TAG_OR_BRANCH }} | |
DEST_DIR: capella-extensions/${{ steps.prepare_deploy.outputs.TAG_OR_BRANCH }} | |