1
0

Adding gitlab-ci.yml

This commit is contained in:
Jason L Hannan 2019-10-07 11:12:45 -07:00
parent 52eef3d977
commit 32fbc21ad9
5 changed files with 57 additions and 5 deletions

25
.gitlab-ci.yml Normal file
View File

@ -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

View File

@ -1,3 +1,4 @@
REPO_URL=amr-registry.caas.intel.com/vtt-osgc/solutions
CONTAINER=intel-media-ffmpeg CONTAINER=intel-media-ffmpeg
OS_DISTRO=ubuntu OS_DISTRO=ubuntu
OS_RELEASE=disco OS_RELEASE=disco

View File

@ -15,8 +15,13 @@ EOM
} }
docker tag ${CONTAINER}:agama-${AGAMA_VERSION} ${CONTAINER} 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 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 If the build looks good, you should commit the changes
to Dockerfile and tag it as agama-${AGAMA_VERSION} 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 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} 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. 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 docker tag ${CONTAINER}:agama-${AGAMA_VERSION} amr-registry.caas.intel.com/vtt-osgc/solutions/${CONTAINER}:latest

8
scripts/clean-image.sh Executable file
View File

@ -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

18
scripts/test.sh Normal file
View File

@ -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