From a580a9a0017f253eb730838640bf974ff534ed5e Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 14 Oct 2020 07:39:26 +0000 Subject: [PATCH] eiffel: Create periodic build jobs for initial set of etos repos This change creates periodic build jobs for initial set of etos repos to start phase 2 of Eiffel Community Infra & CI/CD work. Change-Id: I7e36fdd35273a3e8972227d988526ee7e49e0325 --- jjb/eiffel/eiffel-gerrit-herald.yaml | 4 ++ jjb/eiffel/eiffel-intelligence-frontend.yaml | 4 ++ jjb/eiffel/eiffel-intelligence.yaml | 4 ++ jjb/eiffel/eiffel-playground.yaml | 4 ++ jjb/eiffel/eiffel-remrem-generate.yaml | 4 ++ jjb/eiffel/eiffel-remrem-publish.yaml | 4 ++ jjb/eiffel/etos-api.yaml | 42 +++++++++++++++++++ .../etos-environment-provider-worker.yaml | 41 ++++++++++++++++++ jjb/eiffel/etos-environment-provider.yaml | 42 +++++++++++++++++++ jjb/eiffel/etos-suite-runner.yaml | 42 +++++++++++++++++++ jjb/eiffel/etos-suite-starter.yaml | 42 +++++++++++++++++++ jjb/eiffel/global-eiffel-container-build.yaml | 14 ++++++- jjb/eiffel/scripts/eiffel-build-periodic.sh | 14 +++++-- .../eiffel-intelligence-build-periodic.sh | 14 +++++-- ...el-intelligence-frontend-build-periodic.sh | 14 +++++-- .../eiffel-remrem-generate-build-periodic.sh | 14 +++++-- .../eiffel-remrem-publish-build-periodic.sh | 14 +++++-- 17 files changed, 296 insertions(+), 21 deletions(-) create mode 100644 jjb/eiffel/etos-api.yaml create mode 100644 jjb/eiffel/etos-environment-provider-worker.yaml create mode 100644 jjb/eiffel/etos-environment-provider.yaml create mode 100644 jjb/eiffel/etos-suite-runner.yaml create mode 100644 jjb/eiffel/etos-suite-starter.yaml diff --git a/jjb/eiffel/eiffel-gerrit-herald.yaml b/jjb/eiffel/eiffel-gerrit-herald.yaml index 33e2a67c5..84aa46b36 100644 --- a/jjb/eiffel/eiffel-gerrit-herald.yaml +++ b/jjb/eiffel/eiffel-gerrit-herald.yaml @@ -28,7 +28,11 @@ stream: - 'master': branch: 'master' + project-git-repo: '{project}' project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile' + image-name: '{project}' + image-tag: 'dev' distro: ubuntu2004 diff --git a/jjb/eiffel/eiffel-intelligence-frontend.yaml b/jjb/eiffel/eiffel-intelligence-frontend.yaml index 6058d51a2..c427ba0d8 100644 --- a/jjb/eiffel/eiffel-intelligence-frontend.yaml +++ b/jjb/eiffel/eiffel-intelligence-frontend.yaml @@ -28,7 +28,11 @@ stream: - 'master': branch: 'master' + project-git-repo: '{project}' project-build-macro: 'eiffel-intelligence-frontend-build-periodic-macro' + image-dockerfile: 'src/main/docker/Dockerfile' + image-name: '{project}' + image-tag: 'dev' distro: ubuntu2004 diff --git a/jjb/eiffel/eiffel-intelligence.yaml b/jjb/eiffel/eiffel-intelligence.yaml index 8d7d7e006..c4941c2ff 100644 --- a/jjb/eiffel/eiffel-intelligence.yaml +++ b/jjb/eiffel/eiffel-intelligence.yaml @@ -28,7 +28,11 @@ stream: - 'master': branch: 'master' + project-git-repo: '{project}' project-build-macro: 'eiffel-intelligence-build-periodic-macro' + image-dockerfile: 'src/main/docker/Dockerfile' + image-name: '{project}' + image-tag: 'dev' distro: ubuntu2004 diff --git a/jjb/eiffel/eiffel-playground.yaml b/jjb/eiffel/eiffel-playground.yaml index 501ace72e..65959b84e 100644 --- a/jjb/eiffel/eiffel-playground.yaml +++ b/jjb/eiffel/eiffel-playground.yaml @@ -28,7 +28,11 @@ stream: - 'master': branch: 'master' + project-git-repo: '{project}' project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile' + image-name: '{project}' + image-tag: 'dev' distro: ubuntu2004 diff --git a/jjb/eiffel/eiffel-remrem-generate.yaml b/jjb/eiffel/eiffel-remrem-generate.yaml index c4189701d..7a17547ad 100644 --- a/jjb/eiffel/eiffel-remrem-generate.yaml +++ b/jjb/eiffel/eiffel-remrem-generate.yaml @@ -28,7 +28,11 @@ stream: - 'master': branch: 'master' + project-git-repo: '{project}' project-build-macro: 'eiffel-remrem-generate-build-periodic-macro' + image-dockerfile: 'src/main/docker/Dockerfile' + image-name: '{project}' + image-tag: 'dev' distro: ubuntu2004 diff --git a/jjb/eiffel/eiffel-remrem-publish.yaml b/jjb/eiffel/eiffel-remrem-publish.yaml index 7ac5b94f9..d46176960 100644 --- a/jjb/eiffel/eiffel-remrem-publish.yaml +++ b/jjb/eiffel/eiffel-remrem-publish.yaml @@ -28,7 +28,11 @@ stream: - 'master': branch: 'master' + project-git-repo: '{project}' project-build-macro: 'eiffel-remrem-publish-build-periodic-macro' + image-dockerfile: 'src/main/docker/Dockerfile' + image-name: '{project}' + image-tag: 'dev' distro: ubuntu2004 diff --git a/jjb/eiffel/etos-api.yaml b/jjb/eiffel/etos-api.yaml new file mode 100644 index 000000000..e02ae1b31 --- /dev/null +++ b/jjb/eiffel/etos-api.yaml @@ -0,0 +1,42 @@ +--- +# ============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: etos-api + + project: etos-api + + project-name: etos-api + + + stream: + - 'master': + branch: 'master' + project-git-repo: '{project}' + project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile' + image-name: '{project}' + image-tag: 'dev' + + distro: ubuntu2004 + + jobs: + - '{project-name}-build-periodic-{distro}-{stream}' + +# vim: set ts=2 sw=2 expandtab: diff --git a/jjb/eiffel/etos-environment-provider-worker.yaml b/jjb/eiffel/etos-environment-provider-worker.yaml new file mode 100644 index 000000000..288846f7b --- /dev/null +++ b/jjb/eiffel/etos-environment-provider-worker.yaml @@ -0,0 +1,41 @@ +--- +# ============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: etos-environment-provider-worker + + project: etos-environment-provider-worker + + project-name: etos-environment-provider-worker + + stream: + - 'master': + branch: 'master' + project-git-repo: 'eiffel-environment-provider' + project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile.worker' + image-name: '{project}' + image-tag: 'dev' + + distro: ubuntu2004 + + jobs: + - '{project-name}-build-periodic-{distro}-{stream}' + +# vim: set ts=2 sw=2 expandtab: diff --git a/jjb/eiffel/etos-environment-provider.yaml b/jjb/eiffel/etos-environment-provider.yaml new file mode 100644 index 000000000..4ad0735a0 --- /dev/null +++ b/jjb/eiffel/etos-environment-provider.yaml @@ -0,0 +1,42 @@ +--- +# ============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: etos-environment-provider + + project: etos-environment-provider + + project-name: etos-environment-provider + + + stream: + - 'master': + branch: 'master' + project-git-repo: '{project}' + project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile' + image-name: '{project}' + image-tag: 'dev' + + distro: ubuntu2004 + + jobs: + - '{project-name}-build-periodic-{distro}-{stream}' + +# vim: set ts=2 sw=2 expandtab: diff --git a/jjb/eiffel/etos-suite-runner.yaml b/jjb/eiffel/etos-suite-runner.yaml new file mode 100644 index 000000000..6e4ceb5d9 --- /dev/null +++ b/jjb/eiffel/etos-suite-runner.yaml @@ -0,0 +1,42 @@ +--- +# ============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: etos-suite-runner + + project: etos-suite-runner + + project-name: etos-suite-runner + + + stream: + - 'master': + branch: 'master' + project-git-repo: '{project}' + project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile' + image-name: '{project}' + image-tag: 'dev' + + distro: ubuntu2004 + + jobs: + - '{project-name}-build-periodic-{distro}-{stream}' + +# vim: set ts=2 sw=2 expandtab: diff --git a/jjb/eiffel/etos-suite-starter.yaml b/jjb/eiffel/etos-suite-starter.yaml new file mode 100644 index 000000000..c4b6f4014 --- /dev/null +++ b/jjb/eiffel/etos-suite-starter.yaml @@ -0,0 +1,42 @@ +--- +# ============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: etos-suite-starter + + project: etos-suite-starter + + project-name: etos-suite-starter + + + stream: + - 'master': + branch: 'master' + project-git-repo: '{project}' + project-build-macro: 'eiffel-build-periodic-macro' + image-dockerfile: 'Dockerfile' + image-name: '{project}' + image-tag: 'dev' + + distro: ubuntu2004 + + jobs: + - '{project-name}-build-periodic-{distro}-{stream}' + +# 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 044a8e6e5..a531f26c7 100644 --- a/jjb/eiffel/global-eiffel-container-build.yaml +++ b/jjb/eiffel/global-eiffel-container-build.yaml @@ -41,6 +41,18 @@ 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}' + description: Dockerfile to use for building the container image + - string: + name: IMAGE_NAME + default: '{image-name}' + description: Name of the container image + - string: + name: IMAGE_TAG + default: '{image-tag}' + description: Tag to apply to the container image - choice: name: HARBOR_EIFFEL_PROJECT choices: @@ -64,7 +76,7 @@ scm: - git: - url: 'https://github.com/eiffel-community/$PROJECT.git' + url: 'https://github.com/eiffel-community/{project-git-repo}.git' branches: - '*/{branch}' refspec: '' diff --git a/jjb/eiffel/scripts/eiffel-build-periodic.sh b/jjb/eiffel/scripts/eiffel-build-periodic.sh index c989fa355..7f9e6a3c6 100644 --- a/jjb/eiffel/scripts/eiffel-build-periodic.sh +++ b/jjb/eiffel/scripts/eiffel-build-periodic.sh @@ -25,14 +25,20 @@ set -o nounset # navigate to root of the git clone cd "$WORKSPACE" -# the image tagged with latest for the timebeing since we are building from the tip of master branch -IMAGE_TAG="latest" +# 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/$PROJECT:$IMAGE_TAG" +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 --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME_TAG ." +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" diff --git a/jjb/eiffel/scripts/eiffel-intelligence-build-periodic.sh b/jjb/eiffel/scripts/eiffel-intelligence-build-periodic.sh index 6a68ea94a..72eb9149f 100644 --- a/jjb/eiffel/scripts/eiffel-intelligence-build-periodic.sh +++ b/jjb/eiffel/scripts/eiffel-intelligence-build-periodic.sh @@ -51,14 +51,20 @@ echo "Info : Build successful! Artifact is available as" ls -al $PROJECT_WAR_FILE echo "----------------------------------------------------------------" -# the image tagged with latest for the timebeing since we are building from the tip of master branch -IMAGE_TAG="latest" +# 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/$PROJECT:$IMAGE_TAG" +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 --build-arg URL=$PROJECT_WAR_FILE --file src/main/docker/Dockerfile --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME_TAG ." +PODMAN_BUILD_CMD="podman build --build-arg URL=$PROJECT_WAR_FILE --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" diff --git a/jjb/eiffel/scripts/eiffel-intelligence-frontend-build-periodic.sh b/jjb/eiffel/scripts/eiffel-intelligence-frontend-build-periodic.sh index 6a68ea94a..72eb9149f 100644 --- a/jjb/eiffel/scripts/eiffel-intelligence-frontend-build-periodic.sh +++ b/jjb/eiffel/scripts/eiffel-intelligence-frontend-build-periodic.sh @@ -51,14 +51,20 @@ echo "Info : Build successful! Artifact is available as" ls -al $PROJECT_WAR_FILE echo "----------------------------------------------------------------" -# the image tagged with latest for the timebeing since we are building from the tip of master branch -IMAGE_TAG="latest" +# 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/$PROJECT:$IMAGE_TAG" +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 --build-arg URL=$PROJECT_WAR_FILE --file src/main/docker/Dockerfile --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME_TAG ." +PODMAN_BUILD_CMD="podman build --build-arg URL=$PROJECT_WAR_FILE --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" diff --git a/jjb/eiffel/scripts/eiffel-remrem-generate-build-periodic.sh b/jjb/eiffel/scripts/eiffel-remrem-generate-build-periodic.sh index b7cf3e2a9..a867dd937 100644 --- a/jjb/eiffel/scripts/eiffel-remrem-generate-build-periodic.sh +++ b/jjb/eiffel/scripts/eiffel-remrem-generate-build-periodic.sh @@ -52,14 +52,20 @@ echo "Info : Build successful! Artifact is available as" ls -al $PROJECT_WAR_FILE echo "----------------------------------------------------------------" -# the image tagged with latest for the timebeing since we are building from the tip of master branch -IMAGE_TAG="latest" +# 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/$PROJECT:$IMAGE_TAG" +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 --build-arg URL=$PROJECT_WAR_FILE --file src/main/docker/Dockerfile --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME_TAG ." +PODMAN_BUILD_CMD="podman build --build-arg URL=$PROJECT_WAR_FILE --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" diff --git a/jjb/eiffel/scripts/eiffel-remrem-publish-build-periodic.sh b/jjb/eiffel/scripts/eiffel-remrem-publish-build-periodic.sh index c79d25439..8023014a9 100644 --- a/jjb/eiffel/scripts/eiffel-remrem-publish-build-periodic.sh +++ b/jjb/eiffel/scripts/eiffel-remrem-publish-build-periodic.sh @@ -52,14 +52,20 @@ echo "Info : Build successful! Artifact is available as" ls -al $PROJECT_WAR_FILE echo "----------------------------------------------------------------" -# the image tagged with latest for the timebeing since we are building from the tip of master branch -IMAGE_TAG="latest" +# 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/$PROJECT:$IMAGE_TAG" +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 --build-arg URL=$PROJECT_WAR_FILE --file src/main/docker/Dockerfile --log-level $PODMAN_LOG_LEVEL --tag $IMAGE_NAME_TAG ." +PODMAN_BUILD_CMD="podman build --build-arg URL=$PROJECT_WAR_FILE --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" -- 2.25.1