-
Notifications
You must be signed in to change notification settings - Fork 11
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
Create LDAP CI test #116
Merged
Merged
Create LDAP CI test #116
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
4c5741e
Create ldap.yml
RonnyFrayRegato 3b565b5
Test security env variable.
RonnyFrayRegato 98fc5ce
Test security env variable.
RonnyFrayRegato 0cc3074
Test security env variable.
RonnyFrayRegato a6d9eb7
Configure open source LDAP for CI.
RonnyFrayRegato a6c61c6
Configure open source LDAP for CI.
RonnyFrayRegato 72c924b
Adjust wait time for web elements
RonnyFrayRegato 403c43a
Merge branch 'main' into CWS-687-LDAP-CI-test
RonnyFrayRegato 90262ca
Create WebTestLdap
RonnyFrayRegato 0557963
Create WebTestLdap
RonnyFrayRegato 7eb77b9
Create WebTestLdap
RonnyFrayRegato 56b4e0b
Create WebTestLdap
RonnyFrayRegato 9fea6c9
Publish CWS Docker image
RonnyFrayRegato 2dd0442
Publish CWS Docker image
RonnyFrayRegato 869c9df
Test version v.2.3.0
RonnyFrayRegato 5ec98e3
Test version v.2.3.0
RonnyFrayRegato 06d3507
Test version v.2.3.0
RonnyFrayRegato 8118e0e
Test version v.2.3.0
RonnyFrayRegato 65b8d85
Test version v.2.3.0
RonnyFrayRegato 7b549e9
Test version v.2.3.0
RonnyFrayRegato 43e84d2
Update WebTestUtil
RonnyFrayRegato 9dc1f04
Update WebTestUtil
RonnyFrayRegato 38b9091
Update WebTestUtil
RonnyFrayRegato 5d01c47
Run WebTestLdap
RonnyFrayRegato 54e24bf
Update web elements for integration tests
RonnyFrayRegato c106ccf
Merge branch 'main' into CWS-687-LDAP-CI-test
RonnyFrayRegato e26e68e
Update WebTestUtil
RonnyFrayRegato 2ccad0f
Update workflow file
RonnyFrayRegato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? Shouldn't it pull the version from the tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll make the relevant changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
github.ref_name
context variable contains the branch or tag name that triggered the workflow run, which will be used in the Docker image tag when the CD portion is triggered.