-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create ldap.yml * Create a continuous integration pipeline for CWS using LDAP security and associated tests. * Test security env variable. * Configure open source LDAP for CI. * Adjust wait time for web elements * Create WebTestLdap * Publish CWS Docker image * Adjust WebTestUtil for timeout error * Run WebTestLdap * Update WebTestUtil * Update workflow files * Update web elements for integration tests
- Loading branch information
1 parent
3b33764
commit 8c87cfa
Showing
16 changed files
with
279 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: CWS CI LDAP | ||
|
||
# Triggers the workflow on push | ||
on: | ||
push: | ||
schedule: | ||
# trigger a build and test of CWS daily at 5 AM PST / 12 PM UTC | ||
- cron: '0 12 * * *' | ||
|
||
jobs: | ||
|
||
build-and-test-cws: | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
SECURITY: "LDAP" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Create open-source certs | ||
run: | | ||
cd cws-certs | ||
chmod +x generate-certs.sh | ||
./generate-certs.sh | ||
- name: Download Logstash | ||
uses: carlosperate/download-file-action@v1 | ||
with: | ||
file-url: https://artifacts.elastic.co/downloads/logstash/logstash-oss-7.16.2-windows-x86_64.zip | ||
file-name: logstash-7.16.2.zip | ||
location: install/logging/ | ||
|
||
- name: Check for Logstash | ||
run: | | ||
cd install/logging/ | ||
ls -l | ||
- name: Set up Elasticsearch | ||
run: | | ||
cd install/docker/es-only | ||
docker-compose up -d | ||
- name: Set up CWS database using Docker | ||
run: docker run -d -p 3306:3306 -e MYSQL_DATABASE=cws_dev -e MYSQL_ROOT_PASSWORD=adminpw --name mdb103 mariadb:10.3 | ||
|
||
- name: Set up CWS LDAP Server | ||
run: | | ||
cd cws-opensource-ldap | ||
docker-compose up -d | ||
- name: Show Docker containers | ||
run: | | ||
sleep 5s | ||
docker ps -a | ||
- name: Build CWS | ||
id: build | ||
run: | | ||
cd ci | ||
chmod +x run_ci.sh | ||
./run_ci.sh $SECURITY | ||
shell: bash | ||
|
||
- name: Show CWS Log | ||
run: | | ||
cd dist/console-only/cws/server/apache-tomcat-9.0.33/logs | ||
ls -al | ||
- name: Set up Google Chrome | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get --only-upgrade install google-chrome-stable | ||
- name: Display Google Chrome version | ||
run: google-chrome --version | ||
|
||
- name: Run LDAP Integration Tests | ||
id: ldap | ||
run: mvn -DfailIfNoTests=false -Dtest=WebTestLdap clean test | ||
shell: bash | ||
|
||
- name: Send custom JSON data to Slack workflow | ||
if: ${{ always() }} | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
# This data can be any valid JSON from a previous step in the GitHub Action | ||
payload: | | ||
{ | ||
"status": "CWS CI LDAP build and test result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nCWS build result: ${{ steps.build.outcome }}\nLDAP integration test result: ${{ steps.ldap.outcome }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "CWS CI LDAP build and test result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nCWS build result: ${{ steps.build.outcome }}\nLDAP integration test result: ${{ steps.ldap.outcome }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
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
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 |
---|---|---|
|
@@ -8,11 +8,11 @@ dn: ou=Users,dc=example,dc=com | |
objectClass: organizationalUnit | ||
ou: Users | ||
|
||
dn: cn=cwsuser,ou=Users,dc=example,dc=com | ||
dn: cn=cwsci,ou=Users,dc=example,dc=com | ||
objectclass: inetOrgPerson | ||
cn: cwsuser | ||
givenName: cws | ||
sn: user | ||
uid: cwsuser | ||
userpassword: ldapcwspassword | ||
cn: cwsci | ||
givenName: Ronny | ||
sn: Fray | ||
uid: cwsci | ||
userpassword: changeme | ||
mail: [email protected] |
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.