-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split tests and add smoke for log4shell-goof-server
- Loading branch information
Eric
committed
Jan 31, 2022
1 parent
7cf8304
commit 50edd00
Showing
2 changed files
with
58 additions
and
19 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,47 @@ | ||
name: log4shell-goof-server Docker image build and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'log4shell-goof/log4shell-goof-server/**' | ||
- '.github/workflows/log4shell-goof-server-docker-image.yaml' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'log4shell-goof/log4shell-goof-server/**' | ||
- '.github/workflows/log4shell-goof-server-docker-image.yaml' | ||
jobs: | ||
|
||
build-log4shell-server-image: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: log4shell-goof/log4shell-server | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
load: true | ||
context: log4shell-goof/log4shell-server | ||
push: false | ||
tags: log4shell-server:latest | ||
|
||
- name: Run container | ||
run: docker run -d --rm --name log4shell-server log4shell-server:latest && sleep 5 | ||
|
||
- name: Smoke test LDAP running in container | ||
run: docker logs log4shell-server | grep "LDAP server listening on 0.0.0.0:8000" | ||
|
||
- name: Smoke test HTTP running in container | ||
run: docker logs log4shell-server | grep "HTTP server listening on 0.0.0.0:9999" | ||
|
||
- name: Cleanup container | ||
run: docker kill log4shell-server |
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