Updated to version being used in intel-compute-clinfo
Signed-off-by: James Ketrenos <james.p.ketrenos@intel.com>
This commit is contained in:
parent
363f40de52
commit
fa52c35027
@ -1,26 +1,26 @@
|
||||
stages:
|
||||
- build-devel
|
||||
- test-devel
|
||||
- publish-rolling
|
||||
- build
|
||||
- test
|
||||
- publish
|
||||
|
||||
# Required Input From Trigger
|
||||
# OS_DISTRO: ex. ubuntu
|
||||
# OS_RELEASE: ex. eoan
|
||||
# PACKAGE_STREAM: ex. eoan
|
||||
# BUILD: Agama Build number
|
||||
# BRANCH: Agama CI branch (releases_*, master, embargo)
|
||||
|
||||
variables:
|
||||
ci_enabled: "true"
|
||||
PACKAGE_REPOSITORY: "https://repositories.intel.com/graphics"
|
||||
REGISTRY_URL: "amr-registry.caas.intel.com/vtt-osgc/solutions"
|
||||
CONTAINER: "intel-media-ffmpeg"
|
||||
TARGET_TAG: "${OS_DISTRO}-${PACKAGE_STREAM}"
|
||||
TAG: "${CI_PIPELINE_IID}-${CI_COMMIT_REF_NAME}-${OS_DISTRO}-${PACKAGE_STREAM}"
|
||||
|
||||
build_devel_image:
|
||||
stage: "build-devel"
|
||||
build_image:
|
||||
stage: "build"
|
||||
script:
|
||||
- ./scripts/build-dockerfile.sh
|
||||
- ./scripts/build-image.sh
|
||||
- ./scripts/build-image.sh --no-cache
|
||||
- ./scripts/push-image.sh
|
||||
tags:
|
||||
- builder
|
||||
@ -28,8 +28,8 @@ build_devel_image:
|
||||
only:
|
||||
- triggers
|
||||
|
||||
test_devel_image:
|
||||
stage: "test-devel"
|
||||
test_image:
|
||||
stage: "test"
|
||||
script:
|
||||
- ./scripts/test-image.sh
|
||||
tags:
|
||||
@ -37,8 +37,8 @@ test_devel_image:
|
||||
only:
|
||||
- triggers
|
||||
|
||||
publish_rolling_image:
|
||||
stage: "publish-rolling"
|
||||
publish_image:
|
||||
stage: "publish"
|
||||
script:
|
||||
- ./scripts/push-rolling-image.sh
|
||||
- ./scripts/remove-tag.sh
|
||||
|
@ -4,13 +4,26 @@
|
||||
# 2. If not found, create the 'sys_osgc CI trigger'
|
||||
# 3. Invoke the trigger
|
||||
|
||||
# Bring in the variables from SOLUTION file, supporting
|
||||
# nested substitution
|
||||
. SOLUTION
|
||||
. MANIFEST
|
||||
|
||||
VARS=($(sed -nE "s,(^[^#][^=]*).*$,\1,pg" SOLUTION))
|
||||
VARS+=($(sed -nE "s,(^[^#][^=]*).*$,\1,pg" MANIFEST))
|
||||
for var in ${VARS[@]}; do
|
||||
export ${var}
|
||||
done
|
||||
|
||||
# The following constants are used so we can run trigger.sh
|
||||
# against a known build
|
||||
BUILD=${BUILD:-7517585}
|
||||
BRANCH=${BRANCH:-releases_19.4}
|
||||
PROJECT=${PROJECT:-50552}
|
||||
REF=${REF:-master}
|
||||
|
||||
PROJECT="vtt/sws/osgc/solutions/$(basename $(pwd))"
|
||||
URI_PROJECT=$(echo ${PROJECT} | sed -E 's,/,%2F,g')
|
||||
|
||||
eval $(grep ^SYS_OSGC_TOKEN SECRETS)
|
||||
|
||||
[[ "$SYS_OSGC_TOKEN" == "" ]] && {
|
||||
@ -25,9 +38,9 @@ echo "Looking for CI trigger"
|
||||
RESULTS=$(curl --noproxy '*' -s -X GET \
|
||||
--header "PRIVATE-TOKEN: ${SYS_OSGC_TOKEN}" \
|
||||
--header "Content-Type: application/json" \
|
||||
${GITLAB}/api/v4/projects/${PROJECT}/triggers)
|
||||
${GITLAB}/api/v4/projects/${URI_PROJECT}/triggers)
|
||||
|
||||
TOKEN=$(echo ${RESULTS} | sed -E 's#([{},])#\1\n#g' | {
|
||||
TOKEN=$(echo ${RESULTS} | sed -E 's#([[{},])#\1\n#g' | {
|
||||
STATE=0
|
||||
MATCH=
|
||||
TOKEN=
|
||||
@ -81,7 +94,7 @@ TOKEN=$(echo ${RESULTS} | sed -E 's#([{},])#\1\n#g' | {
|
||||
RESULTS=$(curl --noproxy '*' -s -X POST \
|
||||
--header "PRIVATE-TOKEN: ${SYS_OSGC_TOKEN}" \
|
||||
-F 'description="sys_osgc CI trigger"' \
|
||||
${GITLAB}/api/v4/projects/${PROJECT}/triggers)
|
||||
${GITLAB}/api/v4/projects/${URI_PROJECT}/triggers)
|
||||
|
||||
TOKEN=$(echo ${RESULTS} | sed -nE 's,.*"token":\s*"([^"]*).*,\1,p')
|
||||
|
||||
@ -100,13 +113,13 @@ function post {
|
||||
RESULTS=$(curl --noproxy '*' -s -X POST \
|
||||
-F "token=${TOKEN}" \
|
||||
-F "ref=${REF}" \
|
||||
-F "variables[OS_DISTRO]=ubuntu" \
|
||||
-F "variables[OS_RELEASE]=disco" \
|
||||
-F "variables[PACKAGE_STREAM]=disco" \
|
||||
-F "variables[OS_DISTRO]=${OS_DISTRO}" \
|
||||
-F "variables[OS_RELEASE]=${OS_RELEASE}" \
|
||||
-F "variables[PACKAGE_STREAM]=${PACKAGE_STREAM}" \
|
||||
-F "variables[BRANCH]=${BRANCH}" \
|
||||
-F "variables[BUILD]=${BUILD}" \
|
||||
-F "variables[BUILDNUMBER]=${BUILD}" \
|
||||
${GITLAB}/api/v4/projects/${PROJECT}/trigger/pipeline)
|
||||
${GITLAB}/api/v4/projects/${URI_PROJECT}/trigger/pipeline)
|
||||
|
||||
PIPELINE=$(echo ${RESULTS} | sed -nE 's,^.*details_path":"([^"]*)".*,\1,p')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user