Tests: Add regression tests for already fixed stories

Change-Id: Ie31a557e5adb56db22254a074eebf3117ed4e268
This commit is contained in:
Vsevolod Fedorov 2023-02-20 14:05:32 +03:00
parent e77555e242
commit a47e4ee896
3 changed files with 172 additions and 0 deletions

View File

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

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<actions/>
<description>Build gluster-sci containers and push it to dockerhub&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
<keepDependencies>false</keepDependencies>
<disabled>true</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<concurrentBuild>true</concurrentBuild>
<assignedNode>fedora</assignedNode>
<canRoam>false</canRoam>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.BooleanParameterDefinition>
<name>PUSH_TO_HUB</name>
<description>Push to Docker Hub</description>
<defaultValue>true</defaultValue>
</hudson.model.BooleanParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<name>origin</name>
<refspec>+refs/heads/*:refs/remotes/origin/*</refspec>
<url>https://github.com/gluster/gluster-csi-driver.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<disableSubmodules>false</disableSubmodules>
<recursiveSubmodules>false</recursiveSubmodules>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<remotePoll>false</remotePoll>
<gitTool>Default</gitTool>
<submoduleCfg class="list"/>
<reference/>
<gitConfigName/>
<gitConfigEmail/>
<extensions>
<hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
<relativeTargetDir>go/src/github.com/gluster/gluster-csi-driver</relativeTargetDir>
</hudson.plugins.git.extensions.impl.RelativeTargetDirectory>
<hudson.plugins.git.extensions.impl.WipeWorkspace/>
</extensions>
</scm>
<triggers class="vector">
<hudson.triggers.TimerTrigger>
<spec>H 14 * * *</spec>
</hudson.triggers.TimerTrigger>
</triggers>
<builders>
<hudson.tasks.Shell>
<command>#!/bin/bash
IMG_NAME=&quot;gluster/glusterd2-nightly&quot;
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 [ &quot;$PUSH_TO_HUB&quot; = true ]; then
#buildah push --authfile $AUTH_JSON &quot;localhost/$IMG_NAME:$IMG_VERSION&quot; &quot;docker://docker.io/gluster/glusterd2-nightly:$IMG_VERSION&quot;
#buildah push --authfile $AUTH_JSON &quot;localhost/$IMG_NAME:$IMG_VERSION&quot; &quot;docker://docker.io/gluster/glusterd2-nightly:latest&quot;
#fi
</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers>
<hudson.plugins.timestamper.TimestamperBuildWrapper/>
<org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper>
<bindings>
<org.jenkinsci.plugins.credentialsbinding.impl.FileBinding>
<variable>AUTH_JSON</variable>
<credentialsId>xxx</credentialsId>
</org.jenkinsci.plugins.credentialsbinding.impl.FileBinding>
</bindings>
</org.jenkinsci.plugins.credentialsbinding.impl.SecretBuildWrapper>
<hudson.plugins.build__timeout.BuildTimeoutWrapper>
<strategy class="hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy">
<timeoutMinutes>30</timeoutMinutes>
</strategy>
<operationList>
<hudson.plugins.build__timeout.operations.AbortOperation/>
</operationList>
</hudson.plugins.build__timeout.BuildTimeoutWrapper>
</buildWrappers>
</project>

View File

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