Skip to content

Update study_for_issue_252.md #157

Update study_for_issue_252.md

Update study_for_issue_252.md #157

Workflow file for this run

name: Continuous Integration
on: push
jobs:
iris-httpsend-module:
name: Build iris-httpsend-module
runs-on: ubuntu-20.04
steps:
- name: Check out iris-httpsend-module
uses: actions/checkout@v3
- name: Get iris-httpsend-module version
id: get-version
run: |
echo "version=$(python setup.py --version)" >> $GITHUB_OUTPUT
- name: Build wheel for iris-httpsend-module ${{ steps.get-version.outputs.version }}
run: |
python setup.py bdist_wheel
- name: Archive iris-httpsend-module wheel
uses: actions/upload-artifact@v3
with:
name: iris-httpsend-module-wheel
path: dist/iris_httpsend_module-${{ steps.get-version.outputs.version }}-py3-none-any.whl
if-no-files-found: error
retention-days: 1
outputs:
version: ${{ steps.get-version.outputs.version }}
dockers:
name: Build iris dockers with iris-httpsend-module and run end-to-end tests
runs-on: ubuntu-20.04
needs: iris-httpsend-module
env:
IRIS_VERSION: v2.2.2
HTTPSEND_VERSION: ${{ needs.iris-httpsend-module.outputs.version }}
steps:
- name: Check out Iris ${{ env.IRIS_VERSION }}
uses: actions/checkout@v3
with:
repository: dfir-iris/iris-web
ref: ${{ env.IRIS_VERSION }}
path: iris-web
- name: Download iris-httpsend-module wheel
uses: actions/download-artifact@v3
with:
name: iris-httpsend-module-wheel
path: iris-web/source/dependencies
- name: Check out iris-httpsend-module
uses: actions/checkout@v3
with:
path: iris-httpsend-module
- name: Patch Iris (if any patch present)
working-directory: iris-web
run: |
if [ -d ../iris-httpsend-module/patches ]
then
git apply --verbose ../iris-httpsend-module/patches/*.patch
fi
- name: Build dockers
working-directory: iris-web
run: |
printf "\ndependencies/iris_httpsend_module-${{ env.HTTPSEND_VERSION }}-py3-none-any.whl" >> source/requirements.txt
cp .env.model .env
docker-compose build
- name: Run end-to-end tests
working-directory: iris-httpsend-module/tests
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python -u -m unittest --verbose
- name: Produce tar archive with dockers
run: |
docker tag iriswebapp_db:${{ env.IRIS_VERSION }} iriswebapp_db:${{ env.HTTPSEND_VERSION }}
docker tag iriswebapp_nginx:${{ env.IRIS_VERSION }} iriswebapp_nginx:${{ env.HTTPSEND_VERSION }}
docker tag iriswebapp_app:${{ env.IRIS_VERSION }} iriswebapp_app:${{ env.HTTPSEND_VERSION }}
docker save iriswebapp_db:${{ env.HTTPSEND_VERSION }} iriswebapp_nginx:${{ env.HTTPSEND_VERSION }} iriswebapp_app:${{ env.HTTPSEND_VERSION }} | gzip > iris-httpsend-${{ env.HTTPSEND_VERSION }}.dockers.tar.gz
- name: Archive dockers tar as artifact
uses: actions/upload-artifact@v3
with:
name: dockers
path: iris-httpsend-${{ env.HTTPSEND_VERSION }}.dockers.tar.gz
if-no-files-found: error
retention-days: 1
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
iris-httpsend-${{ env.HTTPSEND_VERSION }}.dockers.tar.gz
fail_on_unmatched_files: true