From a47e4ee8964286086200d5dced685ec80d682af9 Mon Sep 17 00:00:00 2001 From: Vsevolod Fedorov Date: Mon, 20 Feb 2023 14:05:32 +0300 Subject: [PATCH] Tests: Add regression tests for already fixed stories Change-Id: Ie31a557e5adb56db22254a074eebf3117ed4e268 --- .../job_fixtures/regression-2006254.inc | 22 ++++ .../job_fixtures/regression-2006254.xml | 105 ++++++++++++++++++ .../job_fixtures/regression-2006254.yaml | 45 ++++++++ 3 files changed, 172 insertions(+) create mode 100644 tests/yamlparser/job_fixtures/regression-2006254.inc create mode 100644 tests/yamlparser/job_fixtures/regression-2006254.xml create mode 100644 tests/yamlparser/job_fixtures/regression-2006254.yaml diff --git a/tests/yamlparser/job_fixtures/regression-2006254.inc b/tests/yamlparser/job_fixtures/regression-2006254.inc new file mode 100644 index 000000000..bfcf44016 --- /dev/null +++ b/tests/yamlparser/job_fixtures/regression-2006254.inc @@ -0,0 +1,22 @@ +#!/bin/bash +IMG_NAME="gluster/glusterd2-nightly" +IMG_VERSION=$(date +%Y%m%d) + + +mkdir -p go/{pkg,src,bin} +export GOPATH=$PWD/go +export PATH=$PATH:$GOPATH/bin +export PATH=/usr/sbin:$PATH + +export CSISRC=$GOPATH/src/github.com/gluster/gluster-csi-driver +cd $CSISRC +go get github.com/xxx/yyy +go get -u github.com/golang/dep/cmd/dep +make + +cp pkg/glusterfs/Dockerfile . +buildah bud . +#if [ "$PUSH_TO_HUB" = true ]; then + #buildah push --authfile $AUTH_JSON "localhost/$IMG_NAME:$IMG_VERSION" "docker://docker.io/gluster/glusterd2-nightly:$IMG_VERSION" + #buildah push --authfile $AUTH_JSON "localhost/$IMG_NAME:$IMG_VERSION" "docker://docker.io/gluster/glusterd2-nightly:latest" +#fi diff --git a/tests/yamlparser/job_fixtures/regression-2006254.xml b/tests/yamlparser/job_fixtures/regression-2006254.xml new file mode 100644 index 000000000..6a39a6e6d --- /dev/null +++ b/tests/yamlparser/job_fixtures/regression-2006254.xml @@ -0,0 +1,105 @@ + + + + Build gluster-sci containers and push it to dockerhub<!-- Managed by Jenkins Job Builder --> + false + true + false + false + true + fedora + false + + + + + PUSH_TO_HUB + Push to Docker Hub + true + + + + + + 2 + + + origin + +refs/heads/*:refs/remotes/origin/* + https://github.com/gluster/gluster-csi-driver.git + + + + + master + + + false + false + false + false + Default + + + + + + + go/src/github.com/gluster/gluster-csi-driver + + + + + + + H 14 * * * + + + + + #!/bin/bash +IMG_NAME="gluster/glusterd2-nightly" +IMG_VERSION=$(date +%Y%m%d) + + +mkdir -p go/{pkg,src,bin} +export GOPATH=$PWD/go +export PATH=$PATH:$GOPATH/bin +export PATH=/usr/sbin:$PATH + +export CSISRC=$GOPATH/src/github.com/gluster/gluster-csi-driver +cd $CSISRC +go get github.com/xxx/yyy +go get -u github.com/golang/dep/cmd/dep +make + +cp pkg/glusterfs/Dockerfile . +buildah bud . +#if [ "$PUSH_TO_HUB" = true ]; then + #buildah push --authfile $AUTH_JSON "localhost/$IMG_NAME:$IMG_VERSION" "docker://docker.io/gluster/glusterd2-nightly:$IMG_VERSION" + #buildah push --authfile $AUTH_JSON "localhost/$IMG_NAME:$IMG_VERSION" "docker://docker.io/gluster/glusterd2-nightly:latest" +#fi + + + + + + + + + + AUTH_JSON + xxx + + + + + + 30 + + + + + + + diff --git a/tests/yamlparser/job_fixtures/regression-2006254.yaml b/tests/yamlparser/job_fixtures/regression-2006254.yaml new file mode 100644 index 000000000..ea928a67b --- /dev/null +++ b/tests/yamlparser/job_fixtures/regression-2006254.yaml @@ -0,0 +1,45 @@ +# https://storyboard.openstack.org/#!/story/2006254 +# Bug introduced when added support for rendering Jinja template + +- job: + name: gluster-csi-containers + node: fedora + disabled: true + description: Build gluster-sci containers and push it to dockerhub + project-type: freestyle + concurrent: true + + scm: + - git: + basedir: go/src/github.com/gluster/gluster-csi-driver + url: https://github.com/gluster/gluster-csi-driver.git + branches: + - master + + # properties: + # - discard-after-x: + # x: 10 + # - one-build-per-node + + triggers: + - timed: "H 14 * * *" + + builders: + - shell: !include-raw: regression-2006254.inc + + parameters: + - bool: + default: true + description: Push to Docker Hub + name: PUSH_TO_HUB + + wrappers: + - timestamps + - credentials-binding: + - file: + credential-id: xxx + variable: AUTH_JSON + - timeout: + timeout: 30 + abort: true + type: absolute