-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1557 from AtlasOfLivingAustralia/feature/cognito
Feature/cognito
- Loading branch information
Showing
42 changed files
with
712 additions
and
343 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ env: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -31,6 +31,30 @@ jobs: | |
|
||
- run: npm install | ||
|
||
- name: Validate Gradle wrapper | ||
uses: gradle/[email protected] | ||
|
||
- name: Install and start elasticsearch | ||
run: | | ||
curl https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.3-amd64.deb -o elasticsearch.deb | ||
sudo dpkg -i --force-confnew elasticsearch.deb | ||
sudo chown -R elasticsearch:elasticsearch /etc/default/elasticsearch | ||
sudo sh -c 'echo ES_JAVA_OPTS=\"-Xmx1g -Xms1g\" >> /etc/default/elasticsearch' | ||
sudo service elasticsearch restart | ||
- name: Setup required MERIT folders | ||
run: | | ||
sudo mkdir -p /data/fieldcapture/cache | ||
sudo chmod o+xw /data | ||
sudo chmod o+xw /data/fieldcapture | ||
sudo chmod o+xw /data/fieldcapture/cache | ||
- name: Install and start mongodb | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: '5.0' | ||
|
||
|
||
- name: Read the biocollect version from the gradle.properties file | ||
id: read_property | ||
uses: christian-draeger/[email protected] | ||
|
@@ -53,22 +77,28 @@ jobs: | |
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: build biocollect before running js unit test to compile dependent js templates | ||
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee | ||
uses: gradle/gradle-build-action@v2.4.0 | ||
with: | ||
arguments: build | ||
arguments: _Events | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Run javascript unit tests | ||
run: node_modules/karma/bin/karma start karma.conf.js --single-run --browsers ChromeHeadless | ||
|
||
- name: Run BioCollect functional tests | ||
run: ./src/main/scripts/runFunctionalTests.sh chromeHeadless /tmp/ecodata feature/cognito | ||
env: | ||
GITHUB_ACTOR: ${{env.GITHUB_ACTOR}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Clean to remove clover instrumentation | ||
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee | ||
uses: gradle/gradle-build-action@v2.4.0 | ||
with: | ||
arguments: clean | ||
|
||
- name: Publish the JAR to the repository | ||
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee | ||
uses: gradle/gradle-build-action@v2.4.0 | ||
with: | ||
arguments: publish | ||
env: | ||
|
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,11 +32,13 @@ environments { | |
sender = "[email protected]" | ||
debugUI = true | ||
loggerLevel = "DEBUG" | ||
auth.baseURL = "https://auth-test.ala.org.au" | ||
} | ||
|
||
test { | ||
debugUI: false | ||
loggerLevel: "DEBUG" | ||
spring.autoconfigure.exclude="au.org.ala.ws.security.AlaWsSecurityConfiguration" | ||
debugUI = false | ||
loggerLevel = "DEBUG" | ||
server.port = "8087" | ||
grails.host = "http://devt.ala.org.au" | ||
serverName = "${grails.host}:${server.port}" | ||
|
@@ -46,15 +48,20 @@ environments { | |
app.default.hub='ala' | ||
runWithNoExternalConfig = true | ||
wiremock.port = 8018 | ||
grails.config.locations = [] | ||
security.oidc.discoveryUri = "http://localhost:${wiremock.port}/cas/oidc/.well-known" | ||
security.oidc.allowUnsignedIdTokens = true | ||
def casBaseUrl = "http://devt.ala.org.au:${wiremock.port}" | ||
|
||
security.cas.appServerName=serverName | ||
security.cas.contextPath= | ||
security.cas.casServerName="${casBaseUrl}" | ||
auth.baseURL = "${casBaseUrl}" | ||
security.cas.casServerUrlPrefix="${casBaseUrl}/cas" | ||
security.cas.loginUrl="${security.cas.casServerUrlPrefix}/login" | ||
security.cas.casLoginUrl="${security.cas.casServerUrlPrefix}/login" | ||
security.cas.logoutUrl="${security.cas.casServerUrlPrefix}/logout" | ||
security.jwt.discoveryUri="${casBaseUrl}/cas/oidc/.well-known" | ||
userDetails.url = "${casBaseUrl}/userdetails/userDetails/" | ||
userDetailsSingleUrl = "${userDetails.Url}getUserDetails" | ||
userDetailsUrl = "${userDetatails.url}getUserListFull" | ||
|
@@ -66,6 +73,14 @@ environments { | |
ecodata.service.url = 'http://devt.ala.org.au:8080/ws' | ||
pdfgen.baseURL = "http://devt.ala.org.au:${wiremock.port}/" | ||
api_key='testapikey' | ||
grails.cache.config = { | ||
diskStore { | ||
path '/tmp' | ||
} | ||
defaultCache { | ||
overflowToDisk false | ||
} | ||
} | ||
spatial.baseUrl = "http://localhost:${wiremock.port}" | ||
spatial.baseURL = "http://localhost:${wiremock.port}" | ||
spatial.geoserverUrl= spatial.baseUrl + "/geoserver" | ||
|
@@ -86,9 +101,37 @@ environments { | |
sender = "[email protected]" | ||
debugUI = false | ||
loggerLevel = "INFO" | ||
auth.baseURL = "https://auth.ala.org.au" | ||
} | ||
} | ||
|
||
casUrl = "${auth.baseURL}/cas/logout" | ||
appUrl = grails.serverURL | ||
|
||
security.cas.enabled = false | ||
security.cas.uriExclusionFilterPattern = ['/assets/.*','/uploads/.*'] | ||
security.cas.uriFilterPattern = [] | ||
security.cas.readOnlyOfficerRole= "ROLE_FC_READ_ONLY" | ||
security.cas.alaAdminRole = "ROLE_ADMIN" | ||
security.cas.officerRole = "ROLE_FC_OFFICER" | ||
security.cas.adminRole = "ROLE_FC_ADMIN" | ||
security.cas.casServerName= "${auth.baseURL}" | ||
security.cas.casServerLoginUrl= "${auth.baseURL}/cas/login" | ||
security.cas.casServerUrlPrefix= "${auth.baseURL}/cas" | ||
security.cas.logoutUrl= "${security.cas.casServerUrlPrefix}/logout" | ||
security.cas.loginUrl= "${security.cas.casServerUrlPrefix}/login" | ||
|
||
security.oidc.enabled= true | ||
security.oidc.discoveryUri= "${auth.baseURL}/cas/oidc/.well-known" | ||
security.oidc.clientId= "changeMe" | ||
security.oidc.secret= "changeMe" | ||
security.oidc.scope= "openid,profile,email,ala,roles" | ||
security.oidc.allowUnsignedIdTokens= true | ||
|
||
security.jwt.enabled= true | ||
security.jwt.discoveryUri= "${auth.baseURL}/cas/oidc/.well-known" | ||
security.jwt.fallbackToLegacyBehaviour= true | ||
|
||
dataAccessMethods = [ | ||
"oasrdfs", | ||
"oaordfs", | ||
|
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
Oops, something went wrong.