diff --git a/Jenkinsfile b/Jenkinsfile index 857ecd8..04053c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -38,7 +38,6 @@ // Initialize configuration lazyConfig( name: 'dummy-jenkins-pl', - sdir: 'lazy-ci', dists: ['ubuntu-16', 'centos-7'], labels: [ default: 'master', docker: 'docker', mac: 'mac', android: 'android', ] ) @@ -46,30 +45,40 @@ lazyStage { name = 'validate' tasks = [ - [ exec: { echo "This is my first task" }, ], - [ exec: { echo "This is my second task" }, inside: '*' ], - [ exec: "third.sh", inside: [ 'ubuntu-16', 'centos-7', ] ], - [ exec: [ "fourth-a.sh", "fourth-b.sh"], on: 'mac' ], - [ exec: [ "fourth-a.sh", "fourth-b.sh"], on: 'android' ], + [ run: { echo "This is my first task" }, ], + [ run: { echo "This is my second task" }, in: '*', on: 'docker' ], + [ run: "third.sh", in: [ 'ubuntu-16', 'centos-7'], on: 'docker',], + [ run: [ "fourth-a.sh", "fourth-b.sh"], on: 'mac' ], + [ run: [ "fourth-a.sh", "fourth-b.sh"], on: 'android' ], ] } lazyStage { name = 'test' tasks = [ - [ exec: { echo "This is my fith task" }, ], - [ exec: { echo "This is my sixth task" }, inside: '*' ], - [ exec: [ 'junit.sh', 'jmeter.sh', ], inside: '*', postout: { echo 'Archiving test reports' } ], + [ run: { echo "This is my fith task" }, ], + [ + run: { echo "This is my sixth task" }, + in: '*', on: 'docker' + ], + [ + run: [ 'junit.sh', 'jmeter.sh', ], + in: '*', on: 'docker', + post: { echo 'Archiving test reports' }, + ], ] } lazyStage { name = 'package' tasks = [ -// [ exec: { echo "Building packages"; echo "Archive packages"; }, on: 'windows', ] -// [ exec: { echo "Building packages"; echo "Archive packages"; }, on: 'mac', ] +// [ run: { echo "Building packages"; echo "Archive packages"; }, on: 'windows', ] +// [ run: { echo "Building packages"; echo "Archive packages"; }, on: 'mac', ] [ - exec: { echo "Building packages"; }, inside: [ 'ubuntu-16', 'centos-7', ], postout: { echo "Archiving packages" }, + run: { echo "Building packages"; }, + in: [ 'ubuntu-16', 'centos-7', ], + on: 'docker', + post: { echo "Archiving packages" }, ], ] } @@ -78,10 +87,11 @@ name = 'publish' tasks = [ [ - preout: { echo "Unarchiving packages" }, - exec: { echo "Creating repo with packages" }, - inside: [ 'ubuntu-16', 'centos-7', ], - postout: { echo "Publishing package repos" }, + pre: { echo "Unarchiving packages" }, + run: { echo "Creating repo with packages" }, + in: [ 'ubuntu-16', 'centos-7', ], + on: 'docker', + post: { echo "Publishing package repos" }, ], ] } diff --git a/lazy-ci/centos-7.Dockerfile b/lazy-ci/centos-7.Dockerfile deleted file mode 100644 index 80e3b72..0000000 --- a/lazy-ci/centos-7.Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Pull base image from official repo -FROM centos:centos7.4.1708 - -# Install all current updates -RUN yum -q clean expire-cache \ - && yum -y upgrade \ - && yum -q clean packages - -# Install common requirements -RUN yum -q clean expire-cache \ - && yum -y install \ - git \ - wget \ - unzip \ - && yum -q clean packages - -# Add user to build and package -ARG uid=1000 -ARG user=dummy -ARG gid=1000 -ARG group=dummy - -RUN groupadd -g "${gid}" "${group}" && useradd -ms /bin/bash -g "${group}" -u "${uid}" "${user}" diff --git a/lazy-ci/package/fpm.sh b/lazy-ci/package/fpm.sh deleted file mode 100755 index 66d72ed..0000000 --- a/lazy-ci/package/fpm.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazy-ci/publish/repo.sh b/lazy-ci/publish/repo.sh deleted file mode 100755 index 66d72ed..0000000 --- a/lazy-ci/publish/repo.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazy-ci/test/jmeter.sh b/lazy-ci/test/jmeter.sh deleted file mode 100755 index 66d72ed..0000000 --- a/lazy-ci/test/jmeter.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazy-ci/test/junit.sh b/lazy-ci/test/junit.sh deleted file mode 100755 index 66d72ed..0000000 --- a/lazy-ci/test/junit.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazy-ci/ubuntu-16.Dockerfile b/lazy-ci/ubuntu-16.Dockerfile deleted file mode 100644 index ed7b9c1..0000000 --- a/lazy-ci/ubuntu-16.Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# Pull base image from official repo -FROM ubuntu:16.04 - -# Install all current updates -RUN apt-get -y update \ - && apt-get -y dist-upgrade \ - && apt-get clean - -# Install common requirements -RUN apt-get -y update \ - && apt-get -y install \ - git \ - wget \ - unzip \ - && apt-get clean - -# Add user to build and package -ARG uid=1000 -ARG user=dummy -ARG gid=1000 -ARG group=dummy - -RUN groupadd -g "${gid}" "${group}" && useradd -ms /bin/bash -g "${group}" -u "${uid}" "${user}" diff --git a/lazy-ci/validate/fourth-a.sh b/lazy-ci/validate/fourth-a.sh deleted file mode 100755 index fdba0eb..0000000 --- a/lazy-ci/validate/fourth-a.sh +++ /dev/null @@ -1,19 +0,0 @@ -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazy-ci/validate/fourth-b.sh b/lazy-ci/validate/fourth-b.sh deleted file mode 100755 index fdba0eb..0000000 --- a/lazy-ci/validate/fourth-b.sh +++ /dev/null @@ -1,19 +0,0 @@ -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazy-ci/validate/third.sh b/lazy-ci/validate/third.sh deleted file mode 100755 index 66d72ed..0000000 --- a/lazy-ci/validate/third.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -# This work is protected under copyright law in the Kingdom of -# The Netherlands. The rules of the Berne Convention for the -# Protection of Literary and Artistic Works apply. -# Digital Me B.V. is the copyright owner. -# -# 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. - -echo "Start ${0} script..." -echo "Stop ${0} script..." diff --git a/lazyDir/centos-7.Dockerfile b/lazyDir/centos-7.Dockerfile new file mode 100644 index 0000000..80e3b72 --- /dev/null +++ b/lazyDir/centos-7.Dockerfile @@ -0,0 +1,23 @@ +# Pull base image from official repo +FROM centos:centos7.4.1708 + +# Install all current updates +RUN yum -q clean expire-cache \ + && yum -y upgrade \ + && yum -q clean packages + +# Install common requirements +RUN yum -q clean expire-cache \ + && yum -y install \ + git \ + wget \ + unzip \ + && yum -q clean packages + +# Add user to build and package +ARG uid=1000 +ARG user=dummy +ARG gid=1000 +ARG group=dummy + +RUN groupadd -g "${gid}" "${group}" && useradd -ms /bin/bash -g "${group}" -u "${uid}" "${user}" diff --git a/lazyDir/package/fpm.sh b/lazyDir/package/fpm.sh new file mode 100755 index 0000000..66d72ed --- /dev/null +++ b/lazyDir/package/fpm.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..." diff --git a/lazyDir/publish/repo.sh b/lazyDir/publish/repo.sh new file mode 100755 index 0000000..66d72ed --- /dev/null +++ b/lazyDir/publish/repo.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..." diff --git a/lazyDir/test/jmeter.sh b/lazyDir/test/jmeter.sh new file mode 100755 index 0000000..66d72ed --- /dev/null +++ b/lazyDir/test/jmeter.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..." diff --git a/lazyDir/test/junit.sh b/lazyDir/test/junit.sh new file mode 100755 index 0000000..66d72ed --- /dev/null +++ b/lazyDir/test/junit.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..." diff --git a/lazyDir/ubuntu-16.Dockerfile b/lazyDir/ubuntu-16.Dockerfile new file mode 100644 index 0000000..ed7b9c1 --- /dev/null +++ b/lazyDir/ubuntu-16.Dockerfile @@ -0,0 +1,23 @@ +# Pull base image from official repo +FROM ubuntu:16.04 + +# Install all current updates +RUN apt-get -y update \ + && apt-get -y dist-upgrade \ + && apt-get clean + +# Install common requirements +RUN apt-get -y update \ + && apt-get -y install \ + git \ + wget \ + unzip \ + && apt-get clean + +# Add user to build and package +ARG uid=1000 +ARG user=dummy +ARG gid=1000 +ARG group=dummy + +RUN groupadd -g "${gid}" "${group}" && useradd -ms /bin/bash -g "${group}" -u "${uid}" "${user}" diff --git a/lazyDir/validate/fourth-a.sh b/lazyDir/validate/fourth-a.sh new file mode 100755 index 0000000..fdba0eb --- /dev/null +++ b/lazyDir/validate/fourth-a.sh @@ -0,0 +1,19 @@ +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..." diff --git a/lazyDir/validate/fourth-b.sh b/lazyDir/validate/fourth-b.sh new file mode 100755 index 0000000..fdba0eb --- /dev/null +++ b/lazyDir/validate/fourth-b.sh @@ -0,0 +1,19 @@ +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..." diff --git a/lazyDir/validate/third.sh b/lazyDir/validate/third.sh new file mode 100755 index 0000000..66d72ed --- /dev/null +++ b/lazyDir/validate/third.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# This work is protected under copyright law in the Kingdom of +# The Netherlands. The rules of the Berne Convention for the +# Protection of Literary and Artistic Works apply. +# Digital Me B.V. is the copyright owner. +# +# 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. + +echo "Start ${0} script..." +echo "Stop ${0} script..."