|
| 1 | +name: Test in Private Super.Human.Installer instance |
| 2 | + |
| 3 | +# Optional feature to automatically build and import your agents into a local Domino instance created with Super.Human.Installer |
| 4 | +# Setup: See README for more info |
| 5 | +# - Create a Super.Human.Installer instance |
| 6 | +# - Setup a private GitHub self-hosted runner on your instance |
| 7 | +# - Populate the secrets in the evn section |
| 8 | +# - Commit a change to your repository, and the agents will be deployed for testing on your local instance. |
| 9 | + |
| 10 | + |
| 11 | +on: |
| 12 | + workflow_dispatch: |
| 13 | + push: |
| 14 | +# branches: |
| 15 | +# - main |
| 16 | + |
| 17 | +env: |
| 18 | + # Instead of setting it here, add PASSWORD=mypass into ~/.bash_profile |
| 19 | + #PASSWORD: ${{ secrets.TEST_PASSWORD }} |
| 20 | + SERVER: ${{ vars.TEST_SERVER }} |
| 21 | + DATABASE: ${{ vars.TEST_DATABASE }} |
| 22 | + DOMINO_INSTALLATION: ${{ vars.TEST_DOMINO_INSTALLATION }} |
| 23 | + |
| 24 | +jobs: |
| 25 | + setup-database: |
| 26 | + runs-on: [self-hosted, super.human.installer] |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: Checkout repository |
| 30 | + uses: actions/checkout@v4 |
| 31 | + |
| 32 | + - name: Setup Domino environment |
| 33 | + run: | |
| 34 | + ln -s /local/notesjava/notes.ini |
| 35 | + shell: bash |
| 36 | + |
| 37 | + - name: Verify Domino environment and ID |
| 38 | + run: | |
| 39 | + whoami |
| 40 | + set |
| 41 | + echo "Server: '$SERVER'" |
| 42 | + echo "Database: '$DATABASE'" |
| 43 | +
|
| 44 | + echo "# Check configured server" |
| 45 | + ping -c 1 `echo "$SERVER" | sed 's:\(.*\)/.*$:\1:'` |
| 46 | +
|
| 47 | + echo "# Check configured user" |
| 48 | + java -jar /local/notesjava/CheckNotesUser.jar |
| 49 | + shell: bash |
| 50 | + |
| 51 | + # Create an empty database with a default view and permissive ACL |
| 52 | + - name: Create empty database |
| 53 | + run: | |
| 54 | + PASSWORD=password java \ |
| 55 | + -jar /local/notesjava/CreateDatabase.jar \ |
| 56 | + $SERVER $DATABASE 2>&1 |
| 57 | + shell: bash |
| 58 | + |
| 59 | + # Import DXL into the database |
| 60 | + # Use HCL Designer to export an existing design element or document to a DXL file. |
| 61 | + # You can duplicate this entry for multiple files |
| 62 | + - name: Import other design elements or documents using DxlImporter. Repeat for additional files |
| 63 | + run: | |
| 64 | + PASSWORD=password java \ |
| 65 | + -jar /local/notesjava/DXLImport.jar \ |
| 66 | + $SERVER $DATABASE dxl/HelloWorld.dxl 2>&1 |
| 67 | + shell: bash |
| 68 | + |
| 69 | + - name: Import all agents in to the test database |
| 70 | + run: | |
| 71 | + # This imports all agents configured in agentProperties using the the custom importAll task in build.gradle |
| 72 | + gradle -PnotesIDPassword="${{ secrets.TEST_PASSWORD }}" \ |
| 73 | + -PnotesInstallation=$DOMINO_INSTALLATION \ |
| 74 | + -Pserver=$SERVER -PdbName=$DATABASE \ |
| 75 | + clean importAll 2>&1 |
| 76 | + shell: bash |
| 77 | + |
| 78 | +# - name: Import a single agent |
| 79 | +# run: | |
| 80 | +# # This imports a single agent using the generated task in build.gradle |
| 81 | +# gradle -PnotesIDPassword="${{ secrets.TEST_PASSWORD }}" \ |
| 82 | +# -PnotesInstallation=$DOMINO_INSTALLATION \ |
| 83 | +# -Pserver=$SERVER -PdbName=$DATABASE \ |
| 84 | +# clean importTestWeb 2>&1 |
| 85 | +# shell: bash |
| 86 | + |
| 87 | + |
| 88 | +# TODO: Add any other build tasks to test your application |
| 89 | +# Example: Build a Web app and deploy it to the Domino server: /local/notesdata/domino/html/<your-app> |
0 commit comments