-
Notifications
You must be signed in to change notification settings - Fork 15
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
ci: prod rvd tests #465
Merged
Merged
ci: prod rvd tests #465
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
bf77c1f
ci: remove -q flag from grep health check
JeremyTubongbanua 781736b
ci: quotations
JeremyTubongbanua 6149aa4
ci: try this way
JeremyTubongbanua c15e5c8
ci: quotations
JeremyTubongbanua 06402f4
ci: bruh quotation
JeremyTubongbanua 3bddc44
ci: use `&>` and refactor to all.txt instead of err.txt
JeremyTubongbanua 8e5aa5c
ci: use posix compilation notation `2>&>`
JeremyTubongbanua ca9ab35
ci: oops
JeremyTubongbanua 7cacbbc
ci: oops v2
JeremyTubongbanua 3b9952c
merge: remote-tracking branch 'upstream/trunk' into jeremy-monitor-st…
JeremyTubongbanua 63ac135
ci: release log /atsign/all.txt
JeremyTubongbanua 99a961a
ci: put it in entry point
JeremyTubongbanua 870f4f7
ci:
JeremyTubongbanua 2b2e319
ci:
JeremyTubongbanua da564b3
ci: use tee
JeremyTubongbanua 262231e
ci: add q back
JeremyTubongbanua 558fbdf
ci: prod tests
JeremyTubongbanua 952d735
ci: fix composite action
JeremyTubongbanua e34efeb
ci:
JeremyTubongbanua b611520
ci: fix keys not echoing
JeremyTubongbanua fd4920a
ci: fix path
JeremyTubongbanua 6afa986
ci:
JeremyTubongbanua fffd481
ci:
JeremyTubongbanua da0db56
ci:
JeremyTubongbanua 79a256d
ci:
JeremyTubongbanua 2478384
ci:
JeremyTubongbanua 13f6591
ci: blank base
JeremyTubongbanua d77baa8
ci: look for test passed
JeremyTubongbanua 5cf3968
merge: remote-tracking branch 'upstream/jeremy-monitor-started' into …
JeremyTubongbanua 96e8184
chore: comment on: pull_request which was for debugging
JeremyTubongbanua 8939c0e
merge: remote-tracking branch 'upstream/trunk' into jeremy-prod-tests
JeremyTubongbanua 1fb60c4
revert: remove tail stuff
JeremyTubongbanua 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
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,163 @@ | ||
name: prod_tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "2 * * * *" # “At minute 2.” https://crontab.guru | ||
# pull_request: # temporary | ||
# branches: | ||
# - trunk | ||
|
||
env: | ||
SSHNP_ATSIGN: "@8incanteater" | ||
SSHNP_ATSIGN_KEYS: ${{ secrets.ATKEYS_8INCANTEATER }} | ||
SSHNPD_ATSIGN: "@8052simple" | ||
SSHNPD_ATSIGN_KEYS: ${{ secrets.ATKEYS_8052SIMPLE }} | ||
SSHRVD_ATSIGN: "@8485wealthy51" | ||
SSHRVD_ATSIGN_KEYS: ${{ secrets.ATKEYS_8485WEALTHY51 }} | ||
SSHRVD_AM_ATSIGN: "@rv_am" | ||
SSHRVD_AP_ATSIGN: "@rv_ap" | ||
SSHRVD_EU_ATSIGN: "@rv_eu" | ||
DOCKER_COMPOSE_BUILD_CMD: "docker compose build" | ||
DOCKER_COMPOSE_UP_CMD: "docker compose up --abort-on-container-exit --timeout 900" | ||
|
||
jobs: | ||
e2e_test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rvd: | ||
# - ${{ env.SSHRVD_ATSIGN }} | ||
# - ${{ env.SSHRVD_AM_ATSIGN }} | ||
# - ${{ env.SSHRVD_AP_ATSIGN }} | ||
# - ${{ env.SSHRVD_EU_ATSIGN }} | ||
- "@8485wealthy51" | ||
- "@rv_am" | ||
- "@rv_ap" | ||
- "@rv_eu" | ||
|
||
steps: | ||
- name: Show Matrix Values | ||
run: | | ||
echo "rvd: ${{ matrix.rvd }}" | ||
|
||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: Setup NP/NPD key env | ||
run: | | ||
SSHNP_ATKEYS="$(tr '[:lower:]' '[:upper:]' <<< '${{ env.SSHNP_ATSIGN }}')" | ||
echo "SSHNP_ATKEYS=ATKEYS_${SSHNP_ATKEYS:1}" >> $GITHUB_ENV | ||
|
||
SSHNPD_ATKEYS="$(tr '[:lower:]' '[:upper:]' <<< '${{ env.SSHNPD_ATSIGN }}')" | ||
echo "SSHNPD_ATKEYS=ATKEYS_${SSHNPD_ATKEYS:1}" >> $GITHUB_ENV | ||
|
||
- name: Setup NP/NPD keys | ||
working-directory: tests/end2end_tests/contexts | ||
run: | | ||
echo "${{ secrets[env.SSHNP_ATKEYS] }}" > sshnp/.atsign/keys/${{ env.SSHNP_ATSIGN }}_key.atKeys | ||
echo "${{ secrets[env.SSHNPD_ATKEYS] }}" > sshnpd/.atsign/keys/${{ env.SSHNPD_ATSIGN }}_key.atKeys | ||
|
||
- name: Set up NP/NPD entrypoints | ||
working-directory: tests/end2end_tests/contexts/_init_ | ||
run: | | ||
./setup-sshnp-entrypoint.sh \ | ||
${{ github.run_id }}${{ github.run_attempt }}${{ strategy.job-index }} \ | ||
${{ env.SSHNP_ATSIGN }} \ | ||
${{ env.SSHNPD_ATSIGN }} \ | ||
${{ matrix.rvd }} \ | ||
sshnp_entrypoint.sh | ||
|
||
./setup-sshnpd-entrypoint.sh \ | ||
${{ github.run_id }}${{ github.run_attempt }}${{ strategy.job-index }} \ | ||
${{ env.SSHNP_ATSIGN }} \ | ||
${{ env.SSHNPD_ATSIGN }} \ | ||
sshnpd_entrypoint.sh | ||
|
||
- name: Set up RVD keys and entrypoint | ||
if: matrix.rvd == env.SSHRVD_ATSIGN | ||
working-directory: tests/end2end_tests | ||
run: | | ||
# setup keys | ||
echo "${{ env.SSHRVD_ATSIGN_KEYS }}" > contexts/sshrvd/.atsign/keys/${{ env.SSHRVD_ATSIGN }}_key.atKeys | ||
|
||
# set up sshrvd entrypoint | ||
cd contexts/_init_ | ||
./setup-sshrvd-entrypoint.sh \ | ||
${{ matrix.rvd }} \ | ||
sshrvd_entrypoint.sh | ||
cd ../sshrvd | ||
cat entrypoint.sh | ||
|
||
- name: Ensure entrypoints exist | ||
working-directory: tests/end2end_tests/contexts | ||
run: | | ||
cat sshnp/entrypoint.sh | ||
cat sshnpd/entrypoint.sh | ||
|
||
- name: Build docker-compose.yaml | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
cat docker-compose-blank-base.yaml > docker-compose.yaml | ||
cat service-image-runtime-release.yaml >> docker-compose.yaml | ||
echo " - release=latest" >> docker-compose.yaml | ||
echo " image: atsigncompany/sshnp-e2e-runtime:latest" >> docker-compose.yaml | ||
cat service-container-sshnp.yaml >> docker-compose.yaml | ||
echo " image: atsigncompany/sshnp-e2e-runtime:latest" >> docker-compose.yaml | ||
echo " depends_on:" >> docker-compose.yaml | ||
echo " - image-runtime-release" >> docker-compose.yaml | ||
echo " - container-sshnpd" >> docker-compose.yaml | ||
if [ "${{ matrix.rvd }}" == "@8485wealthy51" ]; then | ||
echo " - container-sshrvd" >> docker-compose.yaml | ||
fi | ||
cat service-container-sshnpd.yaml >> docker-compose.yaml | ||
echo " image: atsigncompany/sshnp-e2e-runtime:latest" >> docker-compose.yaml | ||
echo " depends_on:" >> docker-compose.yaml | ||
echo " - image-runtime-release" >> docker-compose.yaml | ||
if [ "${{ matrix.rvd }}" == "@8485wealthy51" ]; then | ||
echo " - container-sshrvd" >> docker-compose.yaml | ||
fi | ||
|
||
- name: Add RVD service to docker-compose.yaml | ||
if: matrix.rvd == env.SSHRVD_ATSIGN | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
cat service-container-sshrvd.yaml >> docker-compose.yaml | ||
echo " image: atsigncompany/sshnp-e2e-runtime:latest" >> docker-compose.yaml | ||
echo " depends_on:" >> docker-compose.yaml | ||
echo " - image-runtime-release" >> docker-compose.yaml | ||
|
||
- name: docker-compose.yaml | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
cat docker-compose.yaml | ||
|
||
- name: Build | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
${{ env.DOCKER_COMPOSE_BUILD_CMD }} | ||
|
||
- name: Test | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
${{ env.DOCKER_COMPOSE_UP_CMD }} | ||
|
||
- name: Found "Test Passed" in Logs | ||
if: always() | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
docker compose logs --timestamps | grep -q "Test Passed$" | ||
|
||
- name: Logs | ||
if: always() | ||
continue-on-error: true # if this fails, do not fail the job | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
docker compose ps -a | ||
docker compose logs --timestamps | ||
|
||
- name: Tear down | ||
if: always() | ||
continue-on-error: true # if this fails, do not fail the job | ||
working-directory: tests/end2end_tests/tests | ||
run: | | ||
docker compose down |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: '3' | ||
networks: | ||
sshnp: | ||
driver: bridge | ||
name: atsigncompany/sshnp-e2e-network-sshnp | ||
sshnpd: | ||
driver: bridge | ||
name: atsigncompany/sshnp-e2e-network-sshnpd | ||
services: |
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.
Don't need SSH*_ATSIGN_KEYS environment variables, that's what the setup keys steps are for down below