Add license files to release #213
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 is part of IRIS HTTP Send Module. | |
# | |
# Copyright (C) 2023 Airbus CyberSecurity (SAS) | |
# | |
# IRIS HTTP Send Module is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or (at your | |
# option) any later version. | |
# | |
# IRIS HTTP Send Module is distributed in the hope that it will be useful, but | |
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | |
# for more details. | |
# | |
# You should have received a copy of the GNU Lesser General Public License along | |
# with IRIS HTTP Send Module. If not, see <https://www.gnu.org/licenses/>. | |
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@v4 | |
- 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@v4 | |
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.3.2 | |
HTTPSEND_VERSION: ${{ needs.iris-httpsend-module.outputs.version }} | |
steps: | |
- name: Check out Iris ${{ env.IRIS_VERSION }} | |
uses: actions/checkout@v4 | |
with: | |
repository: dfir-iris/iris-web | |
ref: ${{ env.IRIS_VERSION }} | |
path: iris-web | |
- name: Download iris-httpsend-module wheel | |
uses: actions/download-artifact@v4 | |
with: | |
name: iris-httpsend-module-wheel | |
path: iris-web/source/dependencies | |
- name: Check out iris-httpsend-module | |
uses: actions/checkout@v4 | |
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 | |
zip iris-httpsend-${{ env.HTTPSEND_VERSION }}.zip iris-httpsend-${{ env.HTTPSEND_VERSION }}.dockers.tar.gz LICENSE COPYING.* | |
- name: Archive dockers tar as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dockers | |
path: iris-httpsend-${{ env.HTTPSEND_VERSION }}.zip | |
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 }}.zip | |
fail_on_unmatched_files: true |