From 077de1a46f41676cab04c35d836b09cddc939c9d Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Mon, 5 Oct 2020 07:49:52 +0000 Subject: [PATCH] Create periodic build jobs for initial list of Eiffel projects 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 | 38 ++++++++++++ jjb/eiffel/eiffel-intelligence-frontend.yaml | 38 ++++++++++++ jjb/eiffel/eiffel-intelligence.yaml | 38 ++++++++++++ jjb/eiffel/eiffel-playground.yaml | 2 +- jjb/eiffel/eiffel-remrem-generate.yaml | 38 ++++++++++++ jjb/eiffel/eiffel-remrem-publish.yaml | 38 ++++++++++++ jjb/eiffel/global-eiffel-container-build.yaml | 59 +++++++++++++++++-- jjb/eiffel/macros/eiffel-macros.yaml | 30 ---------- .../eiffel-container-build-tag-push.sh | 6 +- 9 files changed, 247 insertions(+), 40 deletions(-) create mode 100644 jjb/eiffel/eiffel-gerrit-herald.yaml create mode 100644 jjb/eiffel/eiffel-intelligence-frontend.yaml create mode 100644 jjb/eiffel/eiffel-intelligence.yaml create mode 100644 jjb/eiffel/eiffel-remrem-generate.yaml create mode 100644 jjb/eiffel/eiffel-remrem-publish.yaml delete mode 100644 jjb/eiffel/macros/eiffel-macros.yaml diff --git a/jjb/eiffel/eiffel-gerrit-herald.yaml b/jjb/eiffel/eiffel-gerrit-herald.yaml new file mode 100644 index 000000000..2a165df2b --- /dev/null +++ b/jjb/eiffel/eiffel-gerrit-herald.yaml @@ -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 index 000000000..71c45177c --- /dev/null +++ b/jjb/eiffel/eiffel-intelligence-frontend.yaml @@ -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 index 000000000..eb15f2d62 --- /dev/null +++ b/jjb/eiffel/eiffel-intelligence.yaml @@ -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: diff --git a/jjb/eiffel/eiffel-playground.yaml b/jjb/eiffel/eiffel-playground.yaml index d0635bccd..2798afcb5 100644 --- a/jjb/eiffel/eiffel-playground.yaml +++ b/jjb/eiffel/eiffel-playground.yaml @@ -24,11 +24,11 @@ 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 index 000000000..bde59a06b --- /dev/null +++ b/jjb/eiffel/eiffel-remrem-generate.yaml @@ -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 index 000000000..f80929227 --- /dev/null +++ b/jjb/eiffel/eiffel-remrem-publish.yaml @@ -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: diff --git a/jjb/eiffel/global-eiffel-container-build.yaml b/jjb/eiffel/global-eiffel-container-build.yaml index 00f704d4e..9c01b26b9 100644 --- a/jjb/eiffel/global-eiffel-container-build.yaml +++ b/jjb/eiffel/global-eiffel-container-build.yaml @@ -33,15 +33,59 @@ - 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 index de0a9a3c4..000000000 --- a/jjb/eiffel/macros/eiffel-macros.yaml +++ /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: diff --git a/jjb/eiffel/scripts/eiffel-container-build-tag-push.sh b/jjb/eiffel/scripts/eiffel-container-build-tag-push.sh index 7970084c7..b2ea4b377 100644 --- a/jjb/eiffel/scripts/eiffel-container-build-tag-push.sh +++ b/jjb/eiffel/scripts/eiffel-container-build-tag-push.sh @@ -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!" -- 2.25.1