sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #06018
[Merge] ~ack/maas-ci/+git/maas-ci-internal:drop-machine-list-spike into ~maas-committers/maas-ci/+git/maas-ci-internal:main
Alberto Donato has proposed merging ~ack/maas-ci/+git/maas-ci-internal:drop-machine-list-spike into ~maas-committers/maas-ci/+git/maas-ci-internal:main.
Commit message:
drop machine list spike jobs, make a generic job to rebase branches
Requested reviews:
MAAS Committers (maas-committers)
For more details, see:
https://code.launchpad.net/~ack/maas-ci/+git/maas-ci-internal/+merge/438989
--
Your team MAAS Committers is requested to review the proposed merge of ~ack/maas-ci/+git/maas-ci-internal:drop-machine-list-spike into ~maas-committers/maas-ci/+git/maas-ci-internal:main.
diff --git a/Makefile b/Makefile
index 65f382f..beaf66e 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ jenkins-jobs: $(VIRTUALENV)/.dev-bin
$(VIRTUALENV):
- python3 -m venv $(VIRTUALENV)
+ python3 -m venv --clear $(VIRTUALENV)
$(VIRTUALENV)/.dev-bin:
$(MAKE) py-dep
diff --git a/jobs/build-env-maas.yaml b/jobs/build-env-maas.yaml
index eb465f5..705bbe2 100644
--- a/jobs/build-env-maas.yaml
+++ b/jobs/build-env-maas.yaml
@@ -11,7 +11,6 @@
- 3.1
- 3.0
- 2.9
- - machine-list-spike
jobs:
- "build-env-{target}-{series}-{ubuntu}":
lp-branch: "{series}"
diff --git a/jobs/is-maas-fast-yet.yaml b/jobs/is-maas-fast-yet.yaml
index 9e12247..2ad4613 100644
--- a/jobs/is-maas-fast-yet.yaml
+++ b/jobs/is-maas-fast-yet.yaml
@@ -10,8 +10,6 @@
- 3.3
- 3.2
- 3.1
- - machine-list-spike:
- build-freq: 'H H(3-6) * * *'
os:
- 20.04
- 22.04
@@ -24,10 +22,6 @@
os: 22.04
- series: 3.1
os: 22.04
- - series: machine-list-spike
- os: 20.04
- - series: machine-list-spike
- machines: 10
jobs:
- '{name}-tester-{os}-{series}-{machines}'
views:
diff --git a/jobs/maas-sampledata-dump.yaml b/jobs/maas-sampledata-dump.yaml
index 1b51d73..343bbde 100644
--- a/jobs/maas-sampledata-dump.yaml
+++ b/jobs/maas-sampledata-dump.yaml
@@ -10,8 +10,6 @@
- 3.3
- 3.2
- 3.1
- - machine-list-spike:
- build-freq: 'H H(3-4) * * *'
os:
- 22.04
- 20.04
@@ -24,10 +22,6 @@
os: 22.04
- series: 3.1
os: 22.04
- - series: machine-list-spike
- os: 20.04
- - series: machine-list-spike
- machines: 10
jobs:
- '{name}-dumper-{os}-{series}-{machines}'
views:
diff --git a/jobs/machine-list-spike.yaml b/jobs/machine-list-spike.yaml
deleted file mode 100644
index 7f8dcc0..0000000
--- a/jobs/machine-list-spike.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-- project:
- name: machine-list-spike
- jobs:
- - machine-list-spike
-
-- job-template:
- name: machine-list-spike
- triggers:
- - timed: '@daily'
- dsl: !include-jinja2: machine-list-spike.groovy
diff --git a/jobs/machine-list-spike.groovy b/jobs/rebase-branch.groovy
similarity index 83%
rename from jobs/machine-list-spike.groovy
rename to jobs/rebase-branch.groovy
index ef20170..ec7b971 100644
--- a/jobs/machine-list-spike.groovy
+++ b/jobs/rebase-branch.groovy
@@ -1,7 +1,7 @@
pipeline {
agent {
docker {
- image 'build-env-maas-master:{{ series }}'
+ image 'ubuntu:{{ series }}'
registryUrl '{{ docker_registry }}'
registryCredentialsId '{{ docker_registry_cred }}'
args '-u 0:0'
@@ -10,23 +10,26 @@ pipeline {
}
stages {
- stage('Rebase branch') {
+ stage('Setup') {
steps {
cleanWs()
sh '''
if [ ! -z \$http_proxy ]; then
echo "Acquire::http::proxy \\"\$http_proxy\\"\\;" > /etc/apt/apt.conf.d/launchpad-ci-proxy
echo "Acquire::https::proxy \\"\$http_proxy\\"\\;" >> /etc/apt/apt.conf.d/launchpad-ci-proxy
- fi
+ fi
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt -y install git
'''
-
+ }
+ }
+ stage('Rebase branch') {
+ steps {
withCredentials([file(credentialsId: 'lp-lander-sshkey', variable: 'SSHKEY')]) {
withEnv(["GIT_SSH_COMMAND=ssh -i $SSHKEY -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"]) {
- lock(resource: "maas-machine-list-spike") {
+ lock(resource: "rebase-branch") {
sh '''
mkdir -p /run/build
cd /run/build
@@ -34,10 +37,10 @@ pipeline {
git config --global user.email 'maas-lander@xxxxxxxxxxxxx'
git config --global safe.directory /run/build/repo
- git clone --branch machine-list-spike git+ssh://maas-lander@xxxxxxxxxxxxxxxxx/~maas-committers/maas repo
+ git clone --branch "$LP_BRANCH_SRC" "git+ssh://maas-lander@xxxxxxxxxxxxxxxxx/$LP_REPO" repo
cd repo
- git rebase origin/master
- git push --force origin machine-list-spike
+ git rebase "origin/$LP_BRANCH_DEST"
+ git push --force origin "$LP_BRANCH_SRC"
'''
}
}
@@ -45,9 +48,4 @@ pipeline {
}
}
}
- post {
- failure {
- mattermostSend (color: 'red', message: "[${env.JOB_NAME} #${env.BUILD_NUMBER}](${env.BUILD_URL}) :fire: Failed to rebase branch machine-list-spike on master")
- }
- }
}
diff --git a/jobs/rebase-branch.yaml b/jobs/rebase-branch.yaml
new file mode 100644
index 0000000..ceee654
--- /dev/null
+++ b/jobs/rebase-branch.yaml
@@ -0,0 +1,19 @@
+- project:
+ name: rebase-branch
+ jobs:
+ - rebase-branch
+
+- job-template:
+ name: rebase-branch
+ project-type: pipeline
+ parameters:
+ - string:
+ name: LP_REPO
+ description: 'Git repository to work on.'
+ - string:
+ name: LP_BRANCH_SRC
+ description: 'Git branch to rebase.'
+ - string:
+ name: LP_BRANCH_DEST
+ description: 'Git branch to rebase onto.'
+ dsl: !include-jinja2: rebase-branch.groovy
Follow ups