Adding gitlab-ci.yml
This commit is contained in:
parent
52eef3d977
commit
32fbc21ad9
25
.gitlab-ci.yml
Normal file
25
.gitlab-ci.yml
Normal 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
|
||||||
|
|
1
SOLUTION
1
SOLUTION
@ -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
|
||||||
|
@ -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
8
scripts/clean-image.sh
Executable 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
18
scripts/test.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user