Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-14399 move to OpenLiberty, add API server #936

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,20 @@ jobs:
-DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload cldr-apps.war
- name: Build liberty server
run: >
mvn -s .github/workflows/mvn-settings.xml -B -pl cldr-apps liberty:create liberty:deploy liberty:package -Dinclude=usr --file tools/pom.xml
-DskipTests=true -Dinclude=usr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cleanup liberty server
run: >
zip tools/cldr-apps/target/cldr-apps.zip -d wlp/usr/servers/cldr/apps/expanded/\*
- name: Upload cldr-apps.zip
uses: actions/upload-artifact@v2
with:
name: cldr-apps
path: tools/cldr-apps/target/cldr-apps.war
name: cldr-apps-server
path: tools/cldr-apps/target/cldr-apps.zip
- name: Upload cldr-code.jar
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -86,11 +95,11 @@ jobs:
- check
runs-on: ubuntu-latest
steps:
- name: Download cldr-apps.war
- name: Download cldr-apps.zip
uses: actions/download-artifact@v2
with:
name: cldr-apps
- name: Deploy to cldr-smoke (experimental)
name: cldr-apps-server
- name: Deploy to cldr-smoke
# Deploys only on push to master.
# Does not deploy for PRs.
if: ${{ github.event_name == 'push' }}
Expand All @@ -107,4 +116,4 @@ jobs:
run: |
echo "${RSA_KEY_SURVEYTOOL}" > .key && chmod go= .key
echo "${SMOKETEST_KNOWNHOSTS}" > .knownhosts && chmod go= .knownhosts
ssh -C -o UserKnownHostsFile=.knownhosts -i .key -p ${SMOKETEST_PORT} surveytool@${SMOKETEST_HOST} bash /usr/local/bin/deploy-to-tomcat.sh < cldr-apps.war ${GITHUB_SHA} --override
ssh -C -o UserKnownHostsFile=.knownhosts -i .key -p ${SMOKETEST_PORT} surveytool@${SMOKETEST_HOST} bash /usr/local/bin/deploy-to-openliberty.sh < cldr-apps.zip ${GITHUB_SHA} --override
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,9 @@
/tools/cldr-code/.build.properties.swp
/tools/cldr-code/doc

# ignore temporary config files here
/tools/cldr-apps/src/main/liberty/config/server.env
/tools/cldr-apps/src/main/liberty/config/bootstrap.properties


org.eclipse.wst.common.project.facet.core.xml
5 changes: 2 additions & 3 deletions tools/cldr-apps/.factorypath
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<factorypath>
<factorypathentry kind="PLUGIN" id="com.ibm.ws.ast.wsfp.annotations.processor" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="com.ibm.etools.webtools.jpa" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="com.ibm.jee.ejb.annotations.processor" enabled="false" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="com.ibm.jaxrs.annotations.processor" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="false" runInBatchMode="false"/>
</factorypath>
6 changes: 3 additions & 3 deletions tools/cldr-apps/.settings/org.eclipse.jdt.apt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Mon May 03 15:03:41 PDT 2010
org.eclipse.jdt.apt.processorOptions/com.ibm.ws.ast.jws.annotations.processor.validateWSDL=on
org.eclipse.jdt.apt.aptEnabled=true
eclipse.preferences.version=1
org.eclipse.jdt.apt.aptEnabled=true
org.eclipse.jdt.apt.processorOptions/com.ibm.ws.ast.jws.annotations.processor.validateWSDL=on
org.eclipse.jdt.apt.reconcileEnabled=true
42 changes: 27 additions & 15 deletions tools/cldr-apps/.settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -1,67 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">







<wb-module deploy-name="cldr-apps">




<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>







<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>







<wb-resource deploy-path="/WEB-INF/lib" source-path="/WebContent/WEB-INF/lib"/>







<!-- needed? -->







<wb-resource deploy-path="/WEB-INF/classes" source-path="/.apt_generated"/>





<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>

<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>

<dependent-module archiveName="cldr-code-39.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cldr-code/cldr-code">

<dependency-type>uses</dependency-type>

</dependent-module>

<dependent-module archiveName="cldr-rdf-39.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cldr-rdf/cldr-rdf">

<dependency-type>uses</dependency-type>

</dependent-module>






<property name="context-root" value="cldr-apps"/>





<property name="java-output-path" value="/cldr-apps/build/classes"/>

<property name="context-root" value="cldr-apps"/>






</wb-module>






Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<root>
<facet id="jst.jaxrs">
<node name="libprov">
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
</node>
</facet>
<facet id="jst.jsf">
<node name="libprov">
<attribute name="provider-id" value="jsf-no-op-library-provider"/>
</node>
</facet>
</root>

This file was deleted.

8 changes: 7 additions & 1 deletion tools/cldr-apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ for CLDR.

Please use the parent [CLDR/tools/pom.xml](../pom.xml) with maven to build and run.

- Copy `src/main/liberty/config/server.env.sample` to `src/main/liberty/config/server.env`
- Edit that `server.env` file to contain the MySQL credentials for the ST database
- Use `mvn --file=tools/pom.xml -pl cldr-apps liberty:dev` to run a development
web server, listening on port 9080
- Navigate to http://localhost:9080/cldr-apps to view the app

See <http://cldr.unicode.org/development/running-survey-tool> for further information
about the Survey Tool.

Expand All @@ -22,6 +28,6 @@ For more details, see the main [README.md](../../README.md).

### Copyright

Copyright &copy; 1991-2020 Unicode, Inc.
Copyright &copy; 1991-2021 Unicode, Inc.
All rights reserved.
[Terms of use](http://www.unicode.org/copyright.html)
Loading