Repository: osbuild/osbuild-composer
Pull request #968 (2020-09-04 08:28:12)

weldr: make URL mandatory part of a new source
Sources without URL are useless. Make it mandatory.

Fixes: https://github.com/osbuild/osbuild-composer/issues/951


Patch:
diff --git a/internal/weldr/api.go b/internal/weldr/api.go
index 299f2600e..a4be5ca3e 100644
--- a/internal/weldr/api.go
+++ b/internal/weldr/api.go
@@ -599,6 +599,8 @@ func (api *API) sourceNewHandler(writer http.ResponseWriter, request *http.Reque
 			err = errors_package.New("'name' field is missing from request")
 		} else if len(source.GetType()) == 0 {
 			err = errors_package.New("'type' field is missing from request")
+		} else if len(source.SourceConfig().URL) == 0 {
+			err = errors_package.New("'url' field is missing from request")
 		}
 	}
 
diff --git a/schutzbot/Jenkinsfile b/schutzbot/Jenkinsfile
index 9c0c595a8..d04338b9f 100644
--- a/schutzbot/Jenkinsfile
+++ b/schutzbot/Jenkinsfile
@@ -367,6 +367,148 @@ pipeline {
 
 }
 
+pipeline {
+    // test against RHEL nightly builds
+    agent none
+
+    // TODO: do we need to disable triggering via GitHub pull requests ???
+    triggers {
+        cron('@daily')
+    }
+
+    environment {
+        AWS_REGION = "us-east-2"
+        AWS_BUCKET = "imagebuilder-jenkins-testing-use2"
+    }
+
+    options {
+        timestamps()
+        ansiColor('xterm')
+        // Cancel the pipeline if it runs for more than three hours.
+        timeout(
+            time: 3,
+            unit: "HOURS"
+        )
+    }
+    stages {
+
+        stage("Prepare 🤔") {
+            agent { label "schutzbot" }
+            options {
+                // Don't checkout the git repository here. It just clogs
+                // up the Jenkins disk space and does nothing for us.
+                skipDefaultCheckout()
+            }
+            steps {
+                sh (
+                    label: "Get environment variables",
+                    script: "env | sort"
+                )
+                // don't build, use RPMs from the nightly trees
+                sh "schutzbot/prepare-rhel-nightly.sh"
+                stash (
+                    includes: 'osbuild-mock.repo',
+                    name: 'rhel8nightly'
+                )
+                stash (
+                    includes: 'rhel-8.json',
+                    name: 'rhel8json'
+                )
+                stash (
+                    includes: 'rhel-8-beta.json',
+                    name: 'rhel8betajson'
+                )
+                stash (
+                    includes: 'COMPOSE_ID',
+                    name: 'compose_id'
+                )
+            }
+        }
+
+        stage("Testing 🍌") {
+            parallel {
+
+                stage('EL8 Base') {
+                    agent { label "rhel8cloudbase && psi && x86_64" }
+                    environment {
+                        TEST_TYPE = "base"
+                    }
+                    steps {
+                        unstash 'rhel8nightly'
+                        unstash 'rhel8json'
+                        unstash 'rhel8betajson'
+                        run_tests('dummy-base')
+                    }
+                    post {
+                        always {
+                            preserve_logs('rhel8-base')
+                        }
+                    }
+                }
+                stage('EL8 Image') {
+                    agent { label "rhel8cloudbase && psi && x86_64" }
+                    environment {
+                        TEST_TYPE = "image"
+                        AWS_CREDS = credentials('aws-credentials-osbuildci')
+                        AZURE_CREDS = credentials('azure')
+                        OPENSTACK_CREDS = credentials("psi-openstack-creds")
+                        VCENTER_CREDS = credentials('vmware-vcenter-credentials')
+                    }
+                    steps {
+                        unstash 'rhel8nightly'
+                        unstash 'rhel8json'
+                        unstash 'rhel8betajson'
+                        run_tests('dummy-image')
+                    }
+                    post {
+                        always {
+                            preserve_logs('rhel8-image')
+                        }
+                    }
+                }
+                stage('EL8 Integration') {
+                    agent { label "rhel8cloudbase && psi && x86_64" }
+                    environment {
+                        TEST_TYPE = "integration"
+                        AWS_CREDS = credentials('aws-credentials-osbuildci')
+                    }
+                    steps {
+                        unstash 'rhel8nightly'
+                        unstash 'rhel8json'
+                        unstash 'rhel8betajson'
+                        run_tests('dummy-integration')
+                    }
+                    post {
+                        always {
+                            preserve_logs('rhel8-integration')
+                        }
+                    }
+                }
+
+            }
+        }
+    }
+
+//TODO: send messages via Email too
+// TODO: how do we make the contents of COMPOSE_ID available as env.COMPOSE_ID
+    post {
+        success {
+            node('schutzbot') {
+                script {
+                    telegramSend "💚 CI passed for ${env.COMPOSE_ID} see ${env.BUILD_URL}"
+                }
+            }
+        }
+        unsuccessful {
+            node('schutzbot') {
+                script {
+                    telegramSend "💣 CI failed for ${env.COMPOSE_ID} see ${env.BUILD_URL}"
+                }
+            }
+        }
+    }
+}
+
 // Set up a function to hold the steps needed to run the tests so we don't
 // need to copy/paste the same lines over and over above.
 void run_tests(test_type) {
diff --git a/schutzbot/deploy.sh b/schutzbot/deploy.sh
index 5f4d2995a..cb5eb1e4d 100755
--- a/schutzbot/deploy.sh
+++ b/schutzbot/deploy.sh
@@ -60,9 +60,21 @@ retry sudo dnf -y install osbuild-composer-tests
 # Set up a directory to hold repository overrides.
 sudo mkdir -p /etc/osbuild-composer/repositories
 
+# Override default osbuild-composer sources if local definition exists
+if [[ -f "rhel-8.json" ]]; then
+    sudo cp rhel-8.json /etc/osbuild-composer/repositories/
+fi
+
+if [[ -f "rhel-8-beta.json" ]]; then
+    sudo cp rhel-8-beta.json /etc/osbuild-composer/repositories/
+fi
+
 # Start services.
 sudo systemctl enable --now osbuild-composer.socket
 
 # Verify that the API is running.
 sudo composer-cli status show
 sudo composer-cli sources list
+for SOURCE in `sudo composer-cli sources list`; do
+    sudo composer-cli sources info $SOURCE
+done
diff --git a/schutzbot/prepare-rhel-nightly.sh b/schutzbot/prepare-rhel-nightly.sh
new file mode 100755
index 000000000..d28a8adcf
--- /dev/null
+++ b/schutzbot/prepare-rhel-nightly.sh
@@ -0,0 +1,54 @@
+#!/bin/bash
+set -euo pipefail
+
+# Colorful output.
+function greenprint {
+  echo -e "\033[1;32m${1}\033[0m"
+}
+
+ARCH=$(uname -m)
+
+curl -L http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8/COMPOSE_ID > COMPOSE_ID
+COMPOSE_ID=$(cat COMPOSE_ID)
+
+# Create a repository file for installing the osbuild-composer RPMs
+greenprint "📜 Generating dnf repository file"
+tee osbuild-mock.repo << EOF
+[rhel8-nightly-baseos]
+name=${COMPOSE_ID} BaseOS
+baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/${COMPOSE_ID}/compose/BaseOS/${ARCH}/os
+enabled=1
+gpgcheck=0
+# Default dnf repo priority is 99. Lower number means higher priority.
+priority=5
+
+[rhel8-nightly-appstream]
+name=${COMPOSE_ID} AppStream
+baseurl=http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/${COMPOSE_ID}/compose/AppStream/${ARCH}/os
+enabled=1
+gpgcheck=0
+# Default dnf repo priority is 99. Lower number means higher priority.
+priority=5
+EOF
+
+
+# Create an osbuild-composer JSON file for content consumption
+greenprint "📜 Generate osbuild-composer JSON source file"
+tee rhel-8.json << EOF
+{
+    "${ARCH}": [
+        {
+            "name": "baseos",
+            "baseurl": "http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/${COMPOSE_ID}/compose/BaseOS/${ARCH}/os",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF\n0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSSOXVjZIersdXyH3NvnLLLF\n0DNRB2ix3bXG9Rh/RXpFsNxDp2CEMdUvbYCzE79K1EnUTVh1L0Of023FtPSZXX0c\nu7Pb5DI5lX5YeoXO6RoodrIGYJsVBQWnrWw4xNTconUfNPk0EGZtEnzvH2zyPoJh\nXGF+Ncu9XwbalnYde10OCvSWAZ5zTCpoLMTvQjWpbCdWXJzCm6G+/hx9upke546H\n5IjtYm4dTIVTnc3wvDiODgBKRzOl9rEOCIgOuGtDxRxcQkjrC+xvg5Vkqn7vBUyW\n9pHedOU+PoF3DGOM+dqv+eNKBvh9YF9ugFAQBkcG7viZgvGEMGGUpzNgN7XnS1gj\n/DPo9mZESOYnKceve2tIC87p2hqjrxOHuI7fkZYeNIcAoa83rBltFXaBDYhWAKS1\nPcXS1/7JzP0ky7d0L6Xbu/If5kqWQpKwUInXtySRkuraVfuK3Bpa+X1XecWi24JY\nHVtlNX025xx1ewVzGNCTlWn1skQN2OOoQTV4C8/qFpTW6DTWYurd4+fE0OJFJZQF\nbuhfXYwmRlVOgN5i77NTI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IGAAZzUAl0GLHSevPbAREu4fDW4Y+ztOsAEQEA\nAYkCHwQYAQIACQUCWzLbdQIbDAAKCRD3b2bD1AgnkusfD/9U4sPtZfMw6cII167A\nXRZOO195G7oiAnBUw5AW6EK0SAHVZcuW0LMMXnGe9f4UsEUgCNwo5mvLWPxzKqFq\n6/G3kEZVFwZ0qrlLoJPeHNbOcfkeZ9NgD/OhzQmdylM0IwGM9DMrm2YS4EVsmm2b\n53qKIfIyysp1yAGcTnBwBbZ85osNBl2KRDIPhMs0bnmGB7IAvwlSb+xm6vWKECkO\nlwQDO5Kg8YZ8+Z3pn/oS688t/fPXvWLZYUqwR63oWfIaPJI7Ahv2jJmgw1ofL81r\n2CE3T/OydtUeGLzqWJAB8sbUgT3ug0cjtxsHuroQBSYBND3XDb/EQh5GeVVnGKKH\ngESLFAoweoNjDSXrlIu1gFjCDHF4CqBRmNYKrNQjLmhCrSfwkytXESJwlLzFKY8P\nK1yZyTpDC9YK0G7qgrk7EHmH9JAZTQ5V65pp0vR9KvqTU5ewkQDIljD2f3FIqo2B\nSKNCQE+N6NjWaTeNlU75m+yZocKObSPg0zS8FAuSJetNtzXA7ouqk34OoIMQj4gq\nUnh/i1FcZAd4U6Dtr9aRZ6PeLlm6MJ/h582L6fJLNEu136UWDtJj5eBYEzX13l+d\nSC4PEHx7ZZRwQKptl9NkinLZGJztg175paUu8C34sAv+SQnM20c0pdOXAq9GKKhi\nvt61kpkXoRGxjTlc6h+69aidSg==\n=ls8J\n-----END PGP PUBLIC KEY BLOCK-----\n"
+        },
+        {
+            "name": "appstream",
+            "baseurl": "http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/${COMPOSE_ID}/compose/AppStream/${ARCH}/os",
+            "gpgkey": "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\nmQINBErgSTsBEACh2A4b0O9t+vzC9VrVtL1AKvUWi9OPCjkvR7Xd8DtJxeeMZ5eF\n0HtzIG58qDRybwUe89FZprB1ffuUKzdE+HcL3FbNWSS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8P\nK1yZyTpDC9YK0G7qgrk7EHmH9JAZTQ5V65pp0vR9KvqTU5ewkQDIljD2f3FIqo2B\nSKNCQE+N6NjWaTeNlU75m+yZocKObSPg0zS8FAuSJetNtzXA7ouqk34OoIMQj4gq\nUnh/i1FcZAd4U6Dtr9aRZ6PeLlm6MJ/h582L6fJLNEu136UWDtJj5eBYEzX13l+d\nSC4PEHx7ZZRwQKptl9NkinLZGJztg175paUu8C34sAv+SQnM20c0pdOXAq9GKKhi\nvt61kpkXoRGxjTlc6h+69aidSg==\n=ls8J\n-----END PGP PUBLIC KEY BLOCK-----\n"
+        }
+    ]
+}
+EOF
+
+cp rhel-8.json rhel-8-beta.json


Test patch:
diff --git a/internal/weldr/api_test.go b/internal/weldr/api_test.go
index 3d973a4a8..31d3ed8dd 100644
--- a/internal/weldr/api_test.go
+++ b/internal/weldr/api_test.go
@@ -823,6 +823,9 @@ func TestSourcesNew(t *testing.T) {
 		// Bad JSON, missing quote after name
 		{"POST", "/api/v0/projects/source/new", `{"name: "fish","url": "https://download.opensuse.org/repositories/shells:/fish:/release:/3/Fedora_29/","type": "yum-baseurl","check_ssl": false,"check_gpg": false}`, http.StatusBadRequest, `{"errors": [{"id": "ProjectsError","msg": "Problem parsing POST body: invalid character 'f' after object key"}],"status":false}`},
 		{"POST", "/api/v0/projects/source/new", `{"name": "fish","url": "https://download.opensuse.org/repositories/shells:/fish:/release:/3/Fedora_29/","type": "yum-baseurl","check_ssl": false,"check_gpg": false}`, http.StatusOK, `{"status":true}`},
+		{"POST", "/api/v0/projects/source/new", `{"url": "https://download.opensuse.org/repositories/shells:/fish:/release:/3/Fedora_29/","type": "yum-baseurl","check_ssl": false,"check_gpg": false}`, http.StatusBadRequest, `{"errors": [{"id": "ProjectsError","msg": "Problem parsing POST body: 'name' field is missing from request"}],"status":false}`},
+		{"POST", "/api/v0/projects/source/new", `{"name": "fish", "type": "yum-baseurl","check_ssl": false,"check_gpg": false}`, http.StatusBadRequest, `{"errors": [{"id": "ProjectsError","msg": "Problem parsing POST body: 'url' field is missing from request"}],"status":false}`},
+		{"POST", "/api/v0/projects/source/new", `{"name": "fish", "url": "https://download.opensuse.org/repositories/shells:/fish:/release:/3/Fedora_29/","check_ssl": false,"check_gpg": false}`, http.StatusBadRequest, `{"errors": [{"id": "ProjectsError","msg": "Problem parsing POST body: 'type' field is missing from request"}],"status":false}`},
 	}
 
 	for _, c := range cases {