Create periodic build jobs for initial list of Eiffel projects 58/6158/4
authorFatih Degirmenci <fatih.degirmenci@est.tech>
Mon, 5 Oct 2020 07:49:52 +0000 (07:49 +0000)
committerFatih Degirmenci <fatih.degirmenci@est.tech>
Mon, 5 Oct 2020 08:12:22 +0000 (08:12 +0000)
Periodic build jobs are created for
- eiffel-gerrit-herald
- eiffel-intelligence
- eiffel-intelligence-frontend
- eiffel-remrem-generate
- eiffel-remrem-publish

In addition to creating jobs, few bugs are fixed and eiffel macros
are moved to global eiffel build job.

Change-Id: I07c96ec95f52d459fac8368875d413b89c9cf224

jjb/eiffel/eiffel-gerrit-herald.yaml [new file with mode: 0644]
jjb/eiffel/eiffel-intelligence-frontend.yaml [new file with mode: 0644]
jjb/eiffel/eiffel-intelligence.yaml [new file with mode: 0644]
jjb/eiffel/eiffel-playground.yaml
jjb/eiffel/eiffel-remrem-generate.yaml [new file with mode: 0644]
jjb/eiffel/eiffel-remrem-publish.yaml [new file with mode: 0644]
jjb/eiffel/global-eiffel-container-build.yaml
jjb/eiffel/macros/eiffel-macros.yaml [deleted file]
jjb/eiffel/scripts/eiffel-container-build-tag-push.sh

diff --git a/jjb/eiffel/eiffel-gerrit-herald.yaml b/jjb/eiffel/eiffel-gerrit-herald.yaml
new file mode 100644 (file)
index 0000000..2a165df
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+
+- project:
+    name: eiffel-gerrit-herald
+
+    project: eiffel-gerrit-herald
+
+    project-name: eiffel-gerrit-herald
+
+
+    stream:
+      - 'master':
+          branch: 'master'
+          project-build-root: './'
+
+    distro: ubuntu2004
+
+    jobs:
+      - '{project-name}-build-{distro}-{stream}-periodic'
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/eiffel/eiffel-intelligence-frontend.yaml b/jjb/eiffel/eiffel-intelligence-frontend.yaml
new file mode 100644 (file)
index 0000000..71c4517
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+
+- project:
+    name: eiffel-intelligence-frontend
+
+    project: eiffel-intelligence-frontend
+
+    project-name: eiffel-intelligence-frontend
+
+
+    stream:
+      - 'master':
+          branch: 'master'
+          project-build-root: 'src/main/docker'
+
+    distro: ubuntu2004
+
+    jobs:
+      - '{project-name}-build-{distro}-{stream}-periodic'
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/eiffel/eiffel-intelligence.yaml b/jjb/eiffel/eiffel-intelligence.yaml
new file mode 100644 (file)
index 0000000..eb15f2d
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+
+- project:
+    name: eiffel-intelligence
+
+    project: eiffel-intelligence
+
+    project-name: eiffel-intelligence
+
+
+    stream:
+      - 'master':
+          branch: 'master'
+          project-build-root: 'src/main/docker'
+
+    distro: ubuntu2004
+
+    jobs:
+      - '{project-name}-build-{distro}-{stream}-periodic'
+
+# vim: set ts=2 sw=2 expandtab:
index d0635bccd7c37c98b8c50fb2230060199964fb13..2798afcb5fa8849eaff3f5f8624ce1b323cb85d2 100644 (file)
 
     project-name: eiffel-playground
 
-    project-build-root: './'
 
     stream:
       - 'master':
           branch: 'master'
+          project-build-root: './'
 
     distro: ubuntu2004
 
diff --git a/jjb/eiffel/eiffel-remrem-generate.yaml b/jjb/eiffel/eiffel-remrem-generate.yaml
new file mode 100644 (file)
index 0000000..bde59a0
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+
+- project:
+    name: eiffel-remrem-generate
+
+    project: eiffel-remrem-generate
+
+    project-name: eiffel-remrem-generate
+
+
+    stream:
+      - 'master':
+          branch: 'master'
+          project-build-root: 'service/src/main/docker'
+
+    distro: ubuntu2004
+
+    jobs:
+      - '{project-name}-build-{distro}-{stream}-periodic'
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/jjb/eiffel/eiffel-remrem-publish.yaml b/jjb/eiffel/eiffel-remrem-publish.yaml
new file mode 100644 (file)
index 0000000..f809292
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2020 Nordix Foundation.
+# ================================================================================
+# 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=========================================================
+
+- project:
+    name: eiffel-remrem-publish
+
+    project: eiffel-remrem-publish
+
+    project-name: eiffel-remrem-publish
+
+
+    stream:
+      - 'master':
+          branch: 'master'
+          project-build-root: 'publish-service/src/main/docker'
+
+    distro: ubuntu2004
+
+    jobs:
+      - '{project-name}-build-{distro}-{stream}-periodic'
+
+# vim: set ts=2 sw=2 expandtab:
index 00f704d4ed3c53014c7eb98f6cc961134581869f..9c01b26b93484ff37781547618aff1ef28363164 100644 (file)
       - project-parameters:
           project: '{project}'
           branch: '{branch}'
-      - eiffel-parameters
+      - string:
+          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: PROJECT_BUILD_ROOT
+          default: '{project-build-root}'
+          description: Dockerfiles are located in different paths so this sets the path to navigate in the clone.
+      - choice:
+          name: HARBOR_EIFFEL_PROJECT
+          choices:
+            - eiffel
+            - eiffel-playground
+          description: Project to push container images to. Default is eiffel. eiffel-playground is for development purposes.
+      - choice:
+          name: PODMAN_LOG_LEVEL
+          choices:
+            - error
+            - debug
+            - info
+            - warn
+            - fatal
+            - panic
+          description: Podman log level to use. Default is error.
+      - string:
+          name: NORDIX_REGISTRY
+          default: 'registry.nordix.org'
+          description: Nordix container image registry.
 
     scm:
-      - git-scm-github:
-          branch: '$BRANCH'
+      - git:
+          url: 'https://github.com/eiffel-community/$PROJECT.git'
+          branches:
+            - '*/{branch}'
           refspec: ''
-          wipe_workspace: true
-          clean_before: false
-          base_dir: '$WORKSPACE'
+          timeout: 15
+          per-build-tag: false
+          skip-tag: true
+          shallow-clone: false
+          use-author: false
+          ignore-notify: false
+          wipe-workspace: true
+          prune: false
+          clean:
+            after: false
+            before: false
+          choosing-strategy: 'default'
+          basedir: '$WORKSPACE'
+
 
     triggers:
       - pollscm:
@@ -50,6 +94,9 @@
     wrappers:
       - build-timeout:
           timeout: 10
+      - mask-passwords
+      - openstack:
+          single-use: True
 
     builders:
       - shell:
diff --git a/jjb/eiffel/macros/eiffel-macros.yaml b/jjb/eiffel/macros/eiffel-macros.yaml
deleted file mode 100644 (file)
index de0a9a3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
----
-# common parameters for all eiffel projects
-- parameter:
-    name: eiffel-parameters
-    parameters:
-      - string:
-          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: PROJECT_BUILD_ROOT
-          default: '{project-build-root}'
-          description: Dockerfiles are located in different paths so this sets the path to navigate in the clone.
-      - choice:
-          name: PODMAN_LOG_LEVEL
-          choices:
-            - error
-            - debug
-            - info
-            - warn
-            - fatal
-            - panic
-          default: info
-          description: Podman log level to use. Default is error.
-
-# vim: set ts=2 sw=2 expandtab:
index 7970084c7d5200ef070872e6d2a3ca9a6a48a330..b2ea4b377e2aa1330515a52e6ff9b62c60628561 100644 (file)
@@ -29,7 +29,7 @@ cd "$WORKSPACE/$PROJECT_BUILD_ROOT"
 IMAGE_TAG="latest"
 
 # set image name
-IMAGE_NAME="$NORDIX_REGISTRY/$PROJECT/$PROJECT:$IMAGE_TAG"
+IMAGE_NAME_TAG="$NORDIX_REGISTRY/$HARBOR_EIFFEL_PROJECT/$PROJECT:$IMAGE_TAG"
 
 # set the build command so we can log it to console
 PODMAN_BUILD_CMD="podman build --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME ."
@@ -37,7 +37,7 @@ PODMAN_BUILD_CMD="podman build --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME .
 echo "Info  : Building the container image with the command"
 echo "        $PODMAN_BUILD_CMD"
 echo "----------------------------------------------------------------"
-"$PODMAN_BUILD_CMD"
+$PODMAN_BUILD_CMD
 echo "----------------------------------------------------------------"
 echo "Info  : Build successful! List of container images is"
 echo "----------------------------------------------------------------"
@@ -46,7 +46,7 @@ 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"
+podman push --log-level "$PODMAN_LOG_LEVEL" "$IMAGE_NAME_TAG"
 podman logout --log-level "$PODMAN_LOG_LEVEL" "$NORDIX_REGISTRY"
 echo "----------------------------------------------------------------"
 echo "Info  : Done!"