Skip to content

Commit

Permalink
update(ghactions): Improve gh actions process
Browse files Browse the repository at this point in the history
- Use new a actions/v3
- Use new Ubuntu LTS 22.04 ( Jammy )
- Move external java setup to temurin package based to be aligned with
  docker
- Install all necessary packages in a single step

Signed-off-by: Helio Chissini de Castro <heliocastro@gmail.com>
  • Loading branch information
heliocastro committed Jul 6, 2022
1 parent bcdfad6 commit 1bef35d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/githubactions.yml
Expand Up @@ -27,12 +27,8 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- uses: actions/checkout@v3

- name: Setup CouchDB
uses: iamssen/couchdb-github-action@master
with:
Expand All @@ -42,13 +38,19 @@ jobs:
run: |
sudo sed -i 's/^couchdb.user\s*=/& '${COUCHDB_USER}'/' build-configuration/test-resources/couchdb-test.properties
sudo sed -i 's/^couchdb.password\s*=/& '${COUCHDB_PASSWORD}'/' build-configuration/test-resources/couchdb-test.properties
sudo mkdir /etc/sw360
sudo mkdir -p /etc/sw360
sudo cp ./scripts/sw360BackendRestDockerConfig/etc_sw360/couchdb-test.properties /etc/sw360/
- name: Set up JDK 11
run: |
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | sudo tee /usr/share/keyrings/adoptium.asc
echo "deb [signed-by=/usr/share/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list
- name: Prepare build environment
run: |
sudo apt-get update -qq
sudo apt-get install python3 python3-pip build-essential libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config libssl-dev git
sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq python3-pip build-essential libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config libssl-dev git temurin-11-jdk maven
pip install mkdocs mkdocs-material
- name: Verify license headers
run: |
Expand All @@ -61,7 +63,7 @@ jobs:
bash scripts/install-thrift.sh --no-cleanup
- name: Build SW360
run: mvn clean package --no-transfer-progress -P deploy -Dhelp-docs=true -Dbase.deploy.dir=. -Dliferay.deploy.dir=/home/runner/work/sw360/sw360/deploy -Dbackend.deploy.dir=/home/runner/work/sw360/sw360/webapps -Drest.deploy.dir=/home/runner/work/sw360/sw360/webapps -DRunComponentVisibilityRestrictionTest=false -DRunPrivateProjectAccessTest=false
run: mvn clean package --no-transfer-progress -P deploy -Dhelp-docs=true -Dbase.deploy.dir=. -Dliferay.deploy.dir=${PWD}/deploy -Dbackend.deploy.dir=${PWD}/deploy/webapps -Drest.deploy.dir=${PWD}/deploy/webapps -DRunComponentVisibilityRestrictionTest=false -DRunPrivateProjectAccessTest=false

- name: Run PrivateProjectAccessTest
run: |
Expand Down
4 changes: 2 additions & 2 deletions sw360BackendRest.Dockerfile
Expand Up @@ -8,8 +8,8 @@
# SPDX-License-Identifier: EPL-2.0
#

FROM tomcat:10.1-jdk11-temurin-jammy
FROM tomcat:9-jdk11-temurin-jammy

COPY ./scripts/sw360BackendRestDockerConfig/etc_sw360/ /etc/sw360/

COPY ./webapps/* /usr/local/tomcat/webapps/
COPY ./deploy/webapps/* /usr/local/tomcat/webapps/

0 comments on commit 1bef35d

Please sign in to comment.