eiffel: Switch build job triggers to GitHub trigger 07/6407/10
authorFatih Degirmenci <fatih.degirmenci@est.tech>
Wed, 28 Oct 2020 08:40:20 +0000 (08:40 +0000)
committerFatih Degirmenci <fatih.degirmenci@est.tech>
Thu, 12 Nov 2020 13:09:50 +0000 (13:09 +0000)
The jobs were created to run periodically to settle the basics and
gather feedback from the projects.

ETOS project prefers the builds to be run upon merge of the commits
and this seems to be useful for other projects as well so the jobs
are modified to run based on GitHub triggers.

Jobs are renamed to reflect the fact as well.

Next change in the series enables posting comments back to PR if the
job is triggered due to merge of a PR.

Change-Id: I59a32c567def96550ee2297a985694f894339a85

21 files changed:
jjb/eiffel/eiffel-gerrit-herald.yaml
jjb/eiffel/eiffel-intelligence-frontend.yaml
jjb/eiffel/eiffel-intelligence.yaml
jjb/eiffel/eiffel-remrem-generate.yaml
jjb/eiffel/eiffel-remrem-publish.yaml
jjb/eiffel/etos-api.yaml
jjb/eiffel/etos-environment-provider-worker.yaml
jjb/eiffel/etos-environment-provider.yaml
jjb/eiffel/etos-suite-runner.yaml
jjb/eiffel/etos-suite-starter.yaml
jjb/eiffel/etos-test-runner-containers-base.yaml
jjb/eiffel/etos-test-runner-containers-go.yaml
jjb/eiffel/etos-test-runner-containers-python.yaml
jjb/eiffel/etos-test-runner-containers-rust.yaml
jjb/eiffel/global-eiffel-container-build-merge.yaml
jjb/eiffel/macros/eiffel-macros.yaml
jjb/eiffel/scripts/eiffel-build-periodic.sh [deleted file]
jjb/eiffel/scripts/eiffel-intelligence-container-build.sh [moved from jjb/eiffel/scripts/eiffel-intelligence-build-periodic.sh with 100% similarity]
jjb/eiffel/scripts/eiffel-intelligence-frontend-container-build.sh [moved from jjb/eiffel/scripts/eiffel-intelligence-frontend-build-periodic.sh with 100% similarity]
jjb/eiffel/scripts/eiffel-remrem-generate-container-build.sh [moved from jjb/eiffel/scripts/eiffel-remrem-generate-build-periodic.sh with 100% similarity]
jjb/eiffel/scripts/eiffel-remrem-publish-container-build.sh [moved from jjb/eiffel/scripts/eiffel-remrem-publish-build-periodic.sh with 100% similarity]

index 84aa46b3641e1dc1e4114519264bd01cf7583b54..f0d79684b6a0c16fa84259e67bbbb15eedd9a19e 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index c427ba0d8e8d29de6dd1b340ac07e0442e1808de..e50d69448c18411f8524276272da71f31970cc9b 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-intelligence-frontend-build-periodic-macro'
+          project-build-macro: 'eiffel-intelligence-frontend-container-build-macro'
           image-dockerfile: 'src/main/docker/Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index c4941c2ff1df4bb94679422b6e560022ba0c26a4..7f941960b275ba2ac17da853542764659870d26b 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-intelligence-build-periodic-macro'
+          project-build-macro: 'eiffel-intelligence-container-build-macro'
           image-dockerfile: 'src/main/docker/Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index 7a17547ade8773c32c9292678c0cd86d560f666d..54e080910ce65ea16bbaad326c0555ab51c6afe8 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-remrem-generate-build-periodic-macro'
+          project-build-macro: 'eiffel-remrem-generate-container-build-macro'
           image-dockerfile: 'src/main/docker/Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index d461769606ebb032f4e5da92dd9d11d6dbdf3815..1bcd7366b3266c340e3cc8438d0bb7859a49d871 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-remrem-publish-build-periodic-macro'
+          project-build-macro: 'eiffel-remrem-publish-container-build-macro'
           image-dockerfile: 'src/main/docker/Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index e02ae1b3164c8b7d6f9ee49a46c07f6c69b2da3e..95095d34166b65e53d3ceab6ce56c7ac3e719047 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index a2900fcfae8a8845822e48ad3c8009d131a27885..bd53d6c4f06e3afc63384f1cd537d4423d97fcce 100644 (file)
@@ -28,7 +28,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: 'etos-environment-provider'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'Dockerfile.workers'
           image-name: '{project}'
           image-tag: 'dev'
@@ -36,6 +36,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index 4ad0735a06e04cdc8ea56b4e11a99c82a6e91001..34a93c7f3db5a89deae95971bc20d0b591403a06 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index 6e4ceb5d9d0996b02f0494344c02a0fd2ad6c680..72cf15b9e8c266c429048f08a6cc871fb1395d2d 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index c4b6f4014a9e4ff383daf3d36e158f478214df5e..5e6ba2ba49856f802506b42db6eb3961db6c78eb 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: '{project}'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'Dockerfile'
           image-name: '{project}'
           image-tag: 'dev'
@@ -37,6 +37,6 @@
     distro: ubuntu2004
 
     jobs:
-      - '{project-name}-build-periodic-{distro}-{stream}'
+      - '{project-name}-build-merge-{distro}-{stream}'
 
 # vim: set ts=2 sw=2 expandtab:
index 4f16a6f69c270fa5581b86d32869fda37c799038..37eb8aa8c4b5da59ca32edd0da7d1eeacc9e712d 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: 'etos-test-runner-containers'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'base/Dockerfile'
           image-name: 'etos-base-test-runner'
           image-tag: 'dev'
index 86ff2300e6f5f1537edcc2e5df273fd0d857796c..ca662012eff1f140bcb60115999e06d4e51ffd7c 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: 'etos-test-runner-containers'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'go/Dockerfile'
           image-name: 'etos-go-test-runner'
           image-tag: 'dev'
index db334784cf86f4074a69467020b14d52d1e87a32..ba184b8d554da630cee1231c32f7c6fa11c9c280 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: 'etos-test-runner-containers'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'python/Dockerfile'
           image-name: 'etos-python-test-runner'
           image-tag: 'dev'
index 2fa7e12a5449235286332e710537752e00f8a12a..a47154a0f7cad60addda9d7bf7d92651cd585ff6 100644 (file)
@@ -29,7 +29,7 @@
       - 'master':
           branch: 'master'
           project-git-repo: 'etos-test-runner-containers'
-          project-build-macro: 'eiffel-build-periodic-macro'
+          project-build-macro: 'eiffel-global-container-build-macro'
           image-dockerfile: 'rust/Dockerfile'
           image-name: 'etos-rust-test-runner'
           image-tag: 'dev'
index 70596af7ebcb6383b80ed3c07565c3041aa0881a..04d46f433a8ba771b59a0b24ba52867f9bfdcc8d 100644 (file)
@@ -29,7 +29,9 @@
     properties:
       - logrotate
       - github:
-          url: '$GIT_BASE_HTTPS/{project-git-repo}'
+          # NOTE (fdegir): url is hardcoded here since env vars in job properties
+          # do not seem to be resolved correctly, causing job no to function properly
+          url: 'https://github.com/eiffel-community/{project-git-repo}'
 
     parameters:
       - project-parameters:
           name: GIT_BASE_HTTPS
           default: https://github.com/eiffel-community
           description: HTTPS URL of Project Repo on GitHub to clone repo.
-      - string:
-          name: GIT_BASE_SSH
-          default: git@github.com:eiffel-community
-          description: SSH URL of Project Repo on GitHub to clone repo.
       - string:
           name: IMAGE_DOCKERFILE
           default: '{image-dockerfile}'
@@ -78,7 +76,7 @@
 
     scm:
       - git:
-          url: '$GIT_BASE_HTTPS/{project-git-repo}.git'
+          url: 'https://github.com/eiffel-community/{project-git-repo}.git'
           branches:
             - '*/{branch}'
           refspec: ''
       - nordixinfra-harbor-creds-wrapper
       - mask-passwords
       - openstack:
-          single-use: True
+          single-use: true
 
     builders:
       - '{project-build-macro}'
index 994d4b16be9b446ed1ce117a6367b9d49cc5c5f9..6c339bfc1575c773f78829251b74cf7081b4eaae 100644 (file)
@@ -5,36 +5,28 @@
       - shell:
           !include-raw: ../scripts/eiffel-global-container-build.sh
 
-# NOTE (fdegir): below macros will potentially be removed or renamed
-# once the above macro is taken into use
 - builder:
-    name: 'eiffel-build-periodic-macro'
+    name: 'eiffel-intelligence-container-build-macro'
     builders:
       - shell:
-          !include-raw: ../scripts/eiffel-build-periodic.sh
+          !include-raw: ../scripts/eiffel-intelligence-container-build.sh
 
 - builder:
-    name: 'eiffel-intelligence-build-periodic-macro'
+    name: 'eiffel-intelligence-frontend-container-build-macro'
     builders:
       - shell:
-          !include-raw: ../scripts/eiffel-intelligence-build-periodic.sh
+          !include-raw: ../scripts/eiffel-intelligence-frontend-container-build.sh
 
 - builder:
-    name: 'eiffel-intelligence-frontend-build-periodic-macro'
+    name: 'eiffel-remrem-generate-container-build-macro'
     builders:
       - shell:
-          !include-raw: ../scripts/eiffel-intelligence-frontend-build-periodic.sh
+          !include-raw: ../scripts/eiffel-remrem-generate-container-build.sh
 
 - builder:
-    name: 'eiffel-remrem-generate-build-periodic-macro'
+    name: 'eiffel-remrem-publish-container-build-macro'
     builders:
       - shell:
-          !include-raw: ../scripts/eiffel-remrem-generate-build-periodic.sh
-
-- builder:
-    name: 'eiffel-remrem-publish-build-periodic-macro'
-    builders:
-      - shell:
-          !include-raw: ../scripts/eiffel-remrem-publish-build-periodic.sh
+          !include-raw: ../scripts/eiffel-remrem-publish-container-build.sh
 
 # vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/eiffel/scripts/eiffel-build-periodic.sh b/jjb/eiffel/scripts/eiffel-build-periodic.sh
deleted file mode 100644 (file)
index 7f9e6a3..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-# ============LICENSE_START=======================================================
-#  Copyright (C) 2020 The Nordix Foundation. All rights reserved.
-# ================================================================================
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# SPDX-License-Identifier: Apache-2.0
-# ============LICENSE_END=========================================================
-
-set -o errexit
-set -o pipefail
-set -o nounset
-
-# navigate to root of the git clone
-cd "$WORKSPACE"
-
-# the Dockerfile to use for building the container image
-IMAGE_DOCKERFILE="${IMAGE_DOCKERFILE:?IMAGE_DOCKERFILE is unset!}"
-
-# the name of the container image
-IMAGE_NAME="${IMAGE_NAME:?IMAGE_NAME is unset!}"
-
-# the tag to apply to the container image
-IMAGE_TAG="${IMAGE_TAG:-latest}"
-
-# set image name
-IMAGE_NAME_TAG="$NORDIX_REGISTRY/$HARBOR_EIFFEL_PROJECT/$IMAGE_NAME:$IMAGE_TAG"
-
-# set the build command so we can log it to console
-PODMAN_BUILD_CMD="podman build --file $IMAGE_DOCKERFILE --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME_TAG ."
-
-echo "Info  : Building the container image with the command"
-echo "        $PODMAN_BUILD_CMD"
-echo "----------------------------------------------------------------"
-$PODMAN_BUILD_CMD
-echo "----------------------------------------------------------------"
-echo "Info  : Build successful! List of container images is"
-echo "----------------------------------------------------------------"
-podman images --log-level $PODMAN_LOG_LEVEL
-echo "----------------------------------------------------------------"
-echo "Info  : Logging in to registry.nordix.org and pushing the image"
-echo "----------------------------------------------------------------"
-podman login --log-level "$PODMAN_LOG_LEVEL" "$NORDIX_REGISTRY" --username "$HARBOR_USERNAME" --password "$HARBOR_PASSWORD"
-podman push --log-level "$PODMAN_LOG_LEVEL" "$IMAGE_NAME_TAG"
-podman logout --log-level "$PODMAN_LOG_LEVEL" "$NORDIX_REGISTRY"
-echo "----------------------------------------------------------------"
-echo "Info  : Done!"
-
-# vim: set ts=2 sw=2 expandtab: