Skip to content

Add deployment playbook and CI test #234

Add deployment playbook and CI test

Add deployment playbook and CI test #234

Workflow file for this run

---
name: Pull request
on:
push:
branches:
- main
pull_request:
jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Build
# run: make build
# docs:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Build documentation
# run: make docs
# lint:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Lint
# run: make lint
# test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Test
# run: make test
# compliance-test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Build
# run: make build
#
# - name: Checkout compliance test suite
# uses: actions/checkout@v3
# with:
# repository: stackhpc/s3-active-storage-compliance-suite
# path: compliance
#
# - name: Setup python
# uses: actions/setup-python@v4
#
# - name: Install compliance test suite dependencies
# run: pip install -r requirements.txt
# working-directory: compliance
#
# - name: Configure compliance test suite
# run: |
# echo 'PROXY_URL = "http://localhost:8080"' >> compliance/config.py
# working-directory: compliance
#
# - name: Start minio object storage
# run: scripts/minio-start
#
# - name: Wait for minio object storage to start
# run: |
# until curl -if http://localhost:9001; do
# sleep 1;
# done
#
# - name: Run active storage container
# run: make run
#
# - name: Wait for active storage server to start
# run: |
# until curl -if http://localhost:8080/.well-known/reductionist-schema; do
# sleep 1;
# done
#
# - name: Create artifacts directory
# run: mkdir artifacts
#
# - name: Run compliance test suite
# run: pytest -s > artifacts/pytest.log
#
# - name: Get active storage logs
# run: docker logs reductionist > artifacts/reductionist.log
# if: always()
#
# - name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: compliance-test
# path: artifacts
# if: always()
#
# - name: Stop minio object storage
# run: scripts/minio-stop
# if: always()
#
# - name: Stop active storage container
# run: make stop
# if: always()
deployment-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
- name: Install Python client dependencies
run: pip install -r scripts/requirements.txt
# - name: Install ansible-lint
# run: pip install ansible ansible-lint==6.17.*
#
# - name: Lint Ansible playbook
# run: ansible-lint deployment/site.yml
- name: Run Ansible playbook
run: ansible-playbook -i deployment/inventory deployment/site.yml --skip-tags docker
- name: Upload some sample data
run: python ./scripts/upload_sample_data.py
- name: Perform a smoke test
run: >
python ./scripts/client.py
sum
--server https://localhost:8080
--cacert root.crt
--source http://localhost:9000
--username minioadmin --password minioadmin
--bucket sample-data --object data-uint32.dat
--dtype uint32
- name: Debug on failure
run: |
set -x
docker ps -a
for container in $(docker ps -aq); do
docker logs $container
done
if: failure()
dependency-review:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
# https://github.com/advisories/GHSA-g98v-hv3f-hcfr atty potential unaligned read on Windows
allow-ghsas: GHSA-g98v-hv3f-hcfr