diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..3c9e645 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +stages: +- build +- test + +build_image: + script: + - make + after_script: + - ./scripts/clean-image.sh + tags: + - builder + - ubuntu + only: + - triggers + +test_image_devel: + script: + - ./scripts/test.sh + after_script: + - ./scripts/clean-image.sh + tags: + - gen9 + only: + - triggers + diff --git a/SOLUTION b/SOLUTION index 734f0ae..6badb8f 100644 --- a/SOLUTION +++ b/SOLUTION @@ -1,3 +1,4 @@ +REPO_URL=amr-registry.caas.intel.com/vtt-osgc/solutions CONTAINER=intel-media-ffmpeg OS_DISTRO=ubuntu OS_RELEASE=disco diff --git a/scripts/build-images b/scripts/build-images index 09aa43a..cae9156 100755 --- a/scripts/build-images +++ b/scripts/build-images @@ -15,8 +15,13 @@ EOM } docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${CONTAINER} +docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${REPO_URL}/${CONTAINER}:devel +docker push ${REPO_URL}/${CONTAINER}:devel cat << EOM +This image was pushed to the devel tag + + amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel If the build looks good, you should commit the changes to Dockerfile and tag it as agama-${AGAMA_VERSION} @@ -29,11 +34,6 @@ To push to Harbor: docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION} docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:agama-${AGAMA_VERSION} -If this is a build others might want, roll the 'devel' tag to it: - - docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel - docker push amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:devel - If this is a good build, then roll the 'latest' tag to it. docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest diff --git a/scripts/clean-image.sh b/scripts/clean-image.sh new file mode 100755 index 0000000..4b8905e --- /dev/null +++ b/scripts/clean-image.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Bring in the variables from SOLUTION file +# +export $(grep -v '^#' SOLUTION | xargs -d '\n') +export $(grep -v '^#' MANIFEST | xargs -d '\n') + +docker rmi ${REPO_URL}/${CONTAINER}:devel diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100644 index 0000000..f9f50ec --- /dev/null +++ b/scripts/test.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Bring in the variables from SOLUTION file +# +export $(grep -v '^#' SOLUTION | xargs -d '\n') +export $(grep -v '^#' MANIFEST | xargs -d '\n') + +mkdir $(pwd)/media +wget -O $(pwd)/media/AUD_MW_E.264 \ + https://fate-suite.libav.org/h264-conformance/AUD_MW_E.264 +docker run \ + --rm \ + --device=/dev/dri \ + -e QSV_DEVICE=${QSV_DEVICE:-/dev/dri/renderD128} \ + --volume $(pwd)/media:/media \ + -it \ + intel-media-ffmpeg \ + test \ No newline at end of file