Skip to content

Commit

Permalink
prep jenkins jobs for our 1.25 release (#997)
Browse files Browse the repository at this point in the history
* update enum description and default golang version

* bump validate jobs to 1.25

* update vault-spec to setup vault per docs (s/percona/mysql)

* apparently create_refs needs a qualified refs prefix: https://docs.github.com/en/rest/git/refs#create-a-reference

* add validation job with kube-ovn as the cni

* workaround test_ceph for lp:1929537

* ceph-fs needs more fire
  • Loading branch information
kwmonroe authored Aug 29, 2022
1 parent c3ecb86 commit f8c284f
Show file tree
Hide file tree
Showing 18 changed files with 156 additions and 55 deletions.
8 changes: 4 additions & 4 deletions cilib/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# Next MAJOR.MINOR
# This controls whether or not we publish pre-release snaps in our channels.
# Typically, this is K8S_STABLE_VERSION +1. However, when prepping the next
# stable release, this will be +2. For example, 1.23 is currently stable and
# we're working on the 1.24 GA. Set this value to '1.25' sometime between the
# final RC and GA so we don't get pre-release builds (e.g. 1.24.1-alpha.0) in
# our 1.24 tracks.
# stable release, this will be +2. For example, 1.24 is currently stable and
# we're working on the 1.25 GA. Set this value to '1.26' sometime between the
# final RC and GA so we don't get pre-release builds (e.g. 1.25.1-alpha.0) in
# our 1.25 tracks.
K8S_NEXT_VERSION = "1.26"

# Lowest K8S SEMVER to process, this is usually stable - 3
Expand Down
2 changes: 1 addition & 1 deletion cilib/github_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def create_ref(self, sha, tag=None, branch=None):
"""Create git reference."""
one_and_only_one = any((tag, branch)) and not all((tag, branch))
assert one_and_only_one, "Either tag or branch should be defined"
ref = f"tags/{tag}" if tag else f"heads/{branch}"
ref = f"refs/tags/{tag}" if tag else f"refs/heads/{branch}"
resp = self.session.post(
self._GITREFS_API.format(**self._render),
headers={"Accept": "application/vnd.github+json"},
Expand Down
2 changes: 1 addition & 1 deletion cilib/service/snap.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def sync_from_upstream(self):
"patches": [],
"go_version": enums.K8S_GO_MAP.get(
f"{k8s_major_minor.major}.{k8s_major_minor.minor}",
"go/1.17/stable",
"go/1.19/stable",
),
}

Expand Down
4 changes: 3 additions & 1 deletion jobs/integration/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2430,11 +2430,13 @@ async def test_ceph(model, tools):
await validate_storage_class(model, "cephfs", "Ceph")
# cleanup
log("removing ceph applications")
# LP:1929537 get ceph-fs outta there with fire.
# NB: can't use destroy() here because it doesn't support --force.
tasks = {
model.applications["ceph-fs"].units[0].machine.destroy(force=True),
model.applications["ceph-mon"].destroy(),
model.applications["ceph-osd"].destroy(),
}
tasks.add(model.applications["ceph-fs"].destroy())
(done1, _) = await asyncio.wait(tasks)
for task in done1:
# read and ignore any exception so that it doesn't get raised
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate-offline/spec.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plan:
- &BASE_JOB
env:
- SNAP_VERSION=1.24/edge
- SNAP_VERSION=1.25/edge
- JUJU_DEPLOY_BUNDLE=charmed-kubernetes
- JUJU_DEPLOY_CHANNEL=edge
- JUJU_CLOUD=aws/us-east-1
Expand Down
83 changes: 58 additions & 25 deletions jobs/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- 1.22/edge
Expand Down Expand Up @@ -146,6 +147,7 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- 1.22/edge
Expand Down Expand Up @@ -323,16 +325,16 @@
values:
- runner-validate
- axis:
type: user-defined
name: snap_version
values:
- 1.24/edge
- 1.23/edge
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- axis:
type: user-defined
name: series
values:
- focal
type: user-defined
name: series
values:
- focal
builders:
- set-env:
JOB_SPEC_DIR: "jobs/validate"
Expand Down Expand Up @@ -364,16 +366,16 @@
values:
- runner-validate
- axis:
type: user-defined
name: snap_version
values:
- 1.24/edge
- 1.23/edge
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- axis:
type: user-defined
name: series
values:
- focal
type: user-defined
name: series
values:
- focal
builders:
- set-env:
JOB_SPEC_DIR: "jobs/validate"
Expand Down Expand Up @@ -410,8 +412,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand Down Expand Up @@ -460,8 +462,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand Down Expand Up @@ -501,8 +503,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand Down Expand Up @@ -542,8 +544,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand Down Expand Up @@ -583,8 +585,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand Down Expand Up @@ -624,8 +626,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand All @@ -638,6 +640,37 @@
COMMAND: |
bash jobs/validate/multus-spec $snap_version $series
- job:
name: 'validate-ck-ovn'
node: runner-validate
description: |
Validates CK edge with the kube-ovn edge charm for the latest release.
project-type: freestyle
scm:
- k8s-jenkins-jenkaas
wrappers:
- default-job-wrapper
- ci-creds
properties:
- block-on-infra
- build-discarder:
num-to-keep: 3
parameters:
- string:
name: SNAP_VERSION
default: 1.25/edge
- string:
name: SERIES
default: jammy
triggers:
- timed: "@weekly"
builders:
- set-env:
JOB_SPEC_DIR: "jobs/validate"
- run-venv:
COMMAND: |
bash jobs/validate/ovn-spec
- job:
name: 'validate-ck-sriov'
node: runner-validate
Expand Down Expand Up @@ -665,8 +698,8 @@
type: user-defined
name: snap_version
values:
- 1.25/edge
- 1.24/edge
- 1.23/edge
- axis:
type: user-defined
name: series
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/aws-iam-spec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function test::execute
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/calico-spec
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function juju::deploy
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/ck-s390-spec
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function ci::cleanup::before
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/localhost-spec
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function ci::cleanup::before
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/multus-spec
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function ci::cleanup::before
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/nvidia-spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ EOF
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
58 changes: 58 additions & 0 deletions jobs/validate/ovn-spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash
# shellcheck disable=SC2034,SC1090

set -x

###############################################################################
# INITIALIZE
###############################################################################
: "${WORKSPACE:=$(pwd)}"

. "$WORKSPACE/ci.bash"
. "$WORKSPACE/juju.bash"

###############################################################################
# FUNCTION OVERRIDES
###############################################################################
function juju::deploy::overlay
{
cat <<EOF > overlay.yaml
series: $SERIES
applications:
kubernetes-control-plane:
channel: $JUJU_DEPLOY_CHANNEL
options:
channel: $SNAP_VERSION
allow-privileged: "true"
kubernetes-worker:
channel: $JUJU_DEPLOY_CHANNEL
options:
channel: $SNAP_VERSION
calico: null
kube-ovn:
charm: kube-ovn
channel: $JUJU_DEPLOY_CHANNEL
relations:
- [kube-ovn:cni, kubernetes-control-plane:cni]
- [kube-ovn:cni, kubernetes-worker:cni]
EOF
}

###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${SNAP_VERSION}
SERIES=${SERIES}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=edge
JUJU_CLOUD=vsphere/Boston
JUJU_CONTROLLER=validate-$(identifier::short)
JUJU_MODEL=validate-ovn
ARCH=amd64
JOB_NAME_CUSTOM="validate-ck-ovn-$SERIES-$SNAP_VERSION"
JOB_ID=$(identifier)

###############################################################################
# START
###############################################################################
ci::run
2 changes: 1 addition & 1 deletion jobs/validate/spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ EOF
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/sriov-spec
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function ci::cleanup::before
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/tigera-ee-spec
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function juju::deploy
###############################################################################
# ENV
###############################################################################
SNAP_VERSION=${1:-1.24/edge}
SNAP_VERSION=${1:-1.25/edge}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=kubernetes-tigera-secure-ee
JUJU_DEPLOY_CHANNEL=${3:-edge}
Expand Down
2 changes: 1 addition & 1 deletion jobs/validate/upgrade-spec
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function test::execute
export CHARM_CHANNEL_UPGRADE_TO=latest/edge
export SNAP_CHANNEL_UPGRADE_TO=latest/edge

SNAP_VERSION=${1:-1.23/stable}
SNAP_VERSION=${1:-1.24/stable}
SERIES=${2:-focal}
JUJU_DEPLOY_BUNDLE=charmed-kubernetes
JUJU_DEPLOY_CHANNEL=${3:-stable}
Expand Down
Loading

0 comments on commit f8c284f

Please sign in to comment.