Skip to content

Commit

Permalink
Merge pull request #6 from codership/rc-8.0.40
Browse files Browse the repository at this point in the history
bump version for 8.0.40 release
  • Loading branch information
byte authored Dec 12, 2024
2 parents 9604c4a + 201135a commit 20117c2
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 23 deletions.
16 changes: 15 additions & 1 deletion .jenkins/helm-release-job.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
//
pipeline {
agent { label 'srcbuild' }
environment {
RELEASE_REPOSITORY="codership/mysql-galera"
TEST_REPOSITORY="codership/mysql-galera-test"
}
stages {
stage ('Prepare') {
steps {
Expand All @@ -10,7 +14,16 @@ pipeline {
//commitHash = sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
version = sh(script: "grep appVersion mysql-galera/helm/Chart.yaml | awk '{print \$NF}' | sed -e 's:\"::g'",
returnStdout: true).trim()
directory = "mysql-galera-" + version + "-" + env.RELEASENUM

if (env.RELEASE == "true") {
name = "mysql-galera"
env.REPOSITORY=env.RELEASE_REPOSITORY
} else {
name = "mysql-galera-test"
env.REPOSITORY=env.TEST_REPOSITORY
}

directory = name + "-" + version + "-" + env.RELEASENUM
tarball = directory + ".tgz"
currentBuild.description = "Branch: $GIT_BRANCH\nRev: $GIT_COMMIT"
}
Expand All @@ -20,6 +33,7 @@ pipeline {
cp -a mysql-galera/helm $directory
pushd $directory
./set_values.sh \
--repo "$REPOSITORY" \
--rootpw "@@SET_ME@@" \
--dbuser "@@SET_ME@@" \
--userpw "@@SET_ME@@"
Expand Down
4 changes: 4 additions & 0 deletions .jenkins/helm-release-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
name: RELEASENUM
default: "1"
description: "Package version"
- bool:
name: RELEASE
default: false
description: "Make release tarball instead of test one"
triggers:
- pollscm:
cron: "@daily"
Expand Down
19 changes: 13 additions & 6 deletions .jenkins/helm-test-job.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ pipeline {
HELM_VER="v3.15.0"
KUBECTL_VER="v1.30.1"
HELM_PROJECT="mysql-galera"
IMAGE_TAG = "8.0.39"
MYSQL_VERSION = "8.0.40"
WSREP_VERSION = "26.21"
MYSQL_ROOT_PASSWORD="Oohiechohr8xooTh"
MYSQL_USER="admin"
MYSQL_USER_PASSWORD="LohP4upho0oephah"
RELEASE_REPOSITORY="codership/mysql-galera"
TEST_REPOSITORY="codership/mysql-galera-test"
}

stages {
Expand All @@ -37,11 +40,11 @@ pipeline {
checkout scm
script {
currentBuild.description = "Branch: ${GIT_TARGET}"

if(env.REPOSITORY == "codership/mysql-galera-test") {
env.TAG = "develop"
env.TAG = env.MYSQL_VERSION
if (env.RELEASE == "true") {
env.REPOSITORY=env.RELEASE_REPOSITORY
} else {
env.TAG = env.IMAGE_TAG
env.REPOSITORY=env.TEST_REPOSITORY
}
}

Expand Down Expand Up @@ -84,6 +87,7 @@ pipeline {
stage('Docker Image') {
steps {
sh '''
MYSQL_RPM_VERSION="$MYSQL_VERSION-$WSREP_VERSION"
docker build \
--no-cache --pull \
--build-arg RH_VERSION=${RH_VERSION} \
Expand Down Expand Up @@ -239,7 +243,10 @@ pipeline {
post {
success {
build job: 'helm-release-job', wait: false,
parameters: [string(name: 'GIT_TARGET', value: env.GIT_COMMIT )]
parameters: [
string(name: 'GIT_TARGET', value: env.GIT_COMMIT ),
booleanParam( name: 'RELEASE', value: env.RELEASE)
]
}
aborted {
sh "kubectl -n ${HELM_PROJECT} describe pod ${HELM_PROJECT}-0"
Expand Down
16 changes: 5 additions & 11 deletions .jenkins/helm-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,14 @@
- build-discarder:
num-to-keep: 10
parameters:
- string:
name: MYSQL_RPM_VERSION
default: "8.0.39-26.20"
description: "MYSQL RPM version"
- choice:
name: REPOSITORY
choices:
- "codership/mysql-galera-test"
- "codership/mysql-galera"
description: "Devel or public repository"
- string:
name: GIT_TARGET
default: "develop"
default: "main"
description: "Branch, Tag or commit hash"
- bool:
name: RELEASE
default: false
description: "Push to release repository instead of test"
pipeline-scm:
scm:
- git:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=8.0.39
VERSION=8.0.40
2 changes: 1 addition & 1 deletion mysql-galera/compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ image
# Usage
Create `.env` file containing required parameters, e.g.:
```
NODE_IMAGE='codership/mysql-galera-test:8.0.34'
NODE_IMAGE='codership/mysql-galera-test:8.0.40'
RUN_AS=1000:100
MYSQL_USER='test'
Expand Down
4 changes: 2 additions & 2 deletions mysql-galera/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "8.0.39"
appVersion: "8.0.40"
2 changes: 1 addition & 1 deletion mysql-galera/helm/set_values.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x
#
REPOSITORY="codership/mysql-galera"
TAG="8.0.39"
TAG="8.0.40"
MYSQL_ROOT_PASSWORD="Oohiechohr8xooTh"
#
DBUSER="admin"
Expand Down

0 comments on commit 20117c2

Please sign in to comment.