Console Output

Started by user Emmanuel Warah

Replayed #98

08:06:01 Connecting to https://api.github.com using emmanueltrinitech/****** (staging-key1)

Obtained Jenkinsfile from ea5924d92689887fbfb6ad539ff14997ea68ef54

[Pipeline] Start of Pipeline

[Pipeline] node

Running on Jenkins in /var/lib/jenkins/workspace/Docker-Deploy_branch3

[Pipeline] {

[Pipeline] stage

[Pipeline] { (Declarative: Checkout SCM)

[Pipeline] checkout

The recommended git tool is: NONE

using credential staging-key1

 > git rev-parse –resolve-git-dir /var/lib/jenkins/workspace/Docker-Deploy_branch3/.git # timeout=10

Fetching changes from the remote Git repository

 > git config remote.origin.url https://github.com/trinitech/website1.git # timeout=10

Fetching without tags

Fetching upstream changes from https://github.com/trinitech/website1.git

 > git –version # timeout=10

 > git –version # ‘git version 1.8.3.1’

using GIT_ASKPASS to set credentials staging-key1

 > git fetch –no-tags –progress https://github.com/trinitech/website1.git +refs/heads/branch3:refs/remotes/origin/branch3 # timeout=10

Checking out Revision ea5924d92689887fbfb6ad539ff14997ea68ef54 (branch3)

 > git config core.sparsecheckout # timeout=10

 > git checkout -f ea5924d92689887fbfb6ad539ff14997ea68ef54 # timeout=10

Commit message: “Update Jenkinsfile”

 > git rev-list –no-walk ea5924d92689887fbfb6ad539ff14997ea68ef54 # timeout=10

[Pipeline] }

[Pipeline] // stage

[Pipeline] withEnv

[Pipeline] {

[Pipeline] stage

[Pipeline] { (Build)

[Pipeline] echo

Running build automation

[Pipeline] sh

+ ./gradlew build –no-daemon

To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.

Daemon will be stopped at the end of the build

> Task :Compile

Compiling the Code….

> Task :dependent

No Dependencies Required….

> Task :Testing

Testing …. PASS

> Task :Packaging

Code Packaged For Deployment

Payload @ trinitech-web/website1.zip

> Task :build

BUILD SUCCESSFUL in 4s

5 actionable tasks: 5 executed

[Pipeline] archiveArtifacts

Archiving artifacts

[Pipeline] }

[Pipeline] // stage

[Pipeline] stage

[Pipeline] { (Build Docker Image)

[Pipeline] script

[Pipeline] {

[Pipeline] warnError

[Pipeline] {

[Pipeline] isUnix

[Pipeline] withEnv

[Pipeline] {

[Pipeline] sh

+ docker build -t ewarah/website3 .

Sending build context to Docker daemon 1.175 MB

Step 1/30 : FROM centos:8

 —> 5d0da3dc9764

Step 2/30 : ENV container docker

 —> Using cache

 —> 84426c7b3743

Step 3/30 : RUN dnf -y install systemd && dnf clean all && (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); rm -f /lib/systemd/system/multi-user.target.wants/*;rm -f /etc/systemd/system/*.wants/*;rm -f /lib/systemd/system/local-fs.target.wants/*; rm -f /lib/systemd/system/sockets.target.wants/*udev*; rm -f /lib/systemd/system/sockets.target.wants/*initctl*; rm -f /lib/systemd/system/basic.target.wants/*;rm -f /lib/systemd/system/anaconda.target.wants/*;

 —> Using cache

 —> 0623a30bac1b

Step 4/30 : VOLUME /sys/fs/cgroup /tmp /run

 —> Using cache

 —> 93fbc187ba4b

Step 5/30 : RUN cd /etc/yum.repos.d/

 —> Using cache

 —> 28bbddd3c860

Step 6/30 : RUN sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*

 —> Using cache

 —> a85989d8a562

Step 7/30 : RUN sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g’ /etc/yum.repos.d/CentOS-*

 —> Using cache

 —> 7388f7894911

Step 8/30 : RUN yum -y install java

 —> Using cache

 —> f5ef6b153e59

Step 9/30 : CMD /bin/bash

 —> Using cache

 —> 8f68c887bee9

Step 10/30 : RUN yum -y install httpd httpd-tools

 —> Using cache

 —> 363333d4ef00

Step 11/30 : RUN yum -y install openssh-server

 —> Using cache

 —> 26d61372b6e2

Step 12/30 : RUN yum -y install passwd

 —> Using cache

 —> b75950e00c21

Step 13/30 : RUN yum -y install which

 —> Using cache

 —> b27b53e68bb4

Step 14/30 : RUN yum -y install zip

 —> Using cache

 —> 1141362dba98

Step 15/30 : RUN yum install sudo -y

 —> Using cache

 —> 5fde4e906397

Step 16/30 : RUN yum install ncurses -y

 —> Using cache

 —> e6400f2d676b

Step 17/30 : RUN yum install cockpit -y

 —> Using cache

 —> d0999cf16bc9

Step 18/30 : RUN echo root:school1 | chpasswd

 —> Using cache

 —> 1b3698a266fb

Step 19/30 : RUN useradd trinitechuser

 —> Using cache

 —> 263804310e7e

Step 20/30 : RUN echo trinitechuser:school1 | chpasswd

 —> Using cache

 —> 8cbb1a4613a2

Step 21/30 : RUN echo “trinitechuser ALL=(ALL) NOPASSWD: ALL” >> /etc/sudoers

 —> Using cache

 —> 6dbb98fae070

Step 22/30 : RUN yum clean all

 —> Using cache

 —> 4d70bc9656c4

Step 23/30 : EXPOSE 80

 —> Using cache

 —> b76074ddff11

Step 24/30 : EXPOSE 22

 —> Using cache

 —> 857a0d407a8c

Step 25/30 : WORKDIR /var/www/html/

 —> Using cache

 —> 3e2c07cd03e2

Step 26/30 : COPY ./trinitech-web/*.zip .

 —> Using cache

 —> 82632a9c0da3

Step 27/30 : RUN unzip *.zip

 —> Using cache

 —> 35dde4e7ce4e

Step 28/30 : RUN systemctl enable httpd.service

 —> Using cache

 —> c161629dc7d8

Step 29/30 : RUN systemctl enable sshd

 —> Using cache

 —> 5a6aa771d256

Step 30/30 : RUN systemctl enable cockpit.socket

 —> Using cache

 —> e8092e11e45b

Successfully built e8092e11e45b

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] }

[Pipeline] // warnError

[Pipeline] }

[Pipeline] // script

[Pipeline] }

[Pipeline] // stage

[Pipeline] stage

[Pipeline] { (Push Docker Image)

[Pipeline] script

[Pipeline] {

[Pipeline] warnError

[Pipeline] {

[Pipeline] withEnv

[Pipeline] {

[Pipeline] withDockerRegistry

$ docker login -u ewarah -p ******** https://registry.hub.docker.com

Login Succeeded

[Pipeline] {

[Pipeline] isUnix

[Pipeline] withEnv

[Pipeline] {

[Pipeline] sh

+ docker tag ewarah/website3 registry.hub.docker.com/ewarah/website3:99

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] isUnix

[Pipeline] withEnv

[Pipeline] {

[Pipeline] sh

+ docker push registry.hub.docker.com/ewarah/website3:99

The push refers to a repository [registry.hub.docker.com/ewarah/website3]

ee260ded2e58: Preparing

1be2cf0c1fed: Preparing

e3933150d0ce: Preparing

4d3748e9506a: Preparing

19ebbf036563: Preparing

ca368fa0afe9: Preparing

039e3643f57a: Preparing

e8584b5dde29: Preparing

444ad205dfc4: Preparing

8306c21eacc7: Preparing

b9bd5b8d5d83: Preparing

8a85eafa20fc: Preparing

d6ea71843412: Preparing

df238eeb1b51: Preparing

e27f84e03822: Preparing

9c5b6dd5d456: Preparing

44d5f5059302: Preparing

f7036b02b0e2: Preparing

ff12b5fa9ca1: Preparing

34eda7619b90: Preparing

c254176b0be1: Preparing

74ddd0ec08fa: Preparing

8a85eafa20fc: Waiting

d6ea71843412: Waiting

df238eeb1b51: Waiting

e27f84e03822: Waiting

9c5b6dd5d456: Waiting

44d5f5059302: Waiting

f7036b02b0e2: Waiting

ff12b5fa9ca1: Waiting

34eda7619b90: Waiting

c254176b0be1: Waiting

74ddd0ec08fa: Waiting

039e3643f57a: Waiting

e8584b5dde29: Waiting

444ad205dfc4: Waiting

8306c21eacc7: Waiting

b9bd5b8d5d83: Waiting

ca368fa0afe9: Waiting

1be2cf0c1fed: Layer already exists

4d3748e9506a: Layer already exists

19ebbf036563: Layer already exists

e3933150d0ce: Layer already exists

ee260ded2e58: Layer already exists

8306c21eacc7: Layer already exists

039e3643f57a: Layer already exists

e8584b5dde29: Layer already exists

444ad205dfc4: Layer already exists

ca368fa0afe9: Layer already exists

d6ea71843412: Layer already exists

b9bd5b8d5d83: Layer already exists

8a85eafa20fc: Layer already exists

44d5f5059302: Layer already exists

9c5b6dd5d456: Layer already exists

f7036b02b0e2: Layer already exists

e27f84e03822: Layer already exists

df238eeb1b51: Layer already exists

34eda7619b90: Layer already exists

ff12b5fa9ca1: Layer already exists

c254176b0be1: Layer already exists

74ddd0ec08fa: Layer already exists

99: digest: sha256:c1473279d9bd63bd213a4c3460dc4080cac59af5da97535377ab5031b6045c3f size: 4936

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] isUnix

[Pipeline] withEnv

[Pipeline] {

[Pipeline] sh

+ docker tag ewarah/website3 registry.hub.docker.com/ewarah/website3:latest

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] isUnix

[Pipeline] withEnv

[Pipeline] {

[Pipeline] sh

+ docker push registry.hub.docker.com/ewarah/website3:latest

The push refers to a repository [registry.hub.docker.com/ewarah/website3]

ee260ded2e58: Preparing

1be2cf0c1fed: Preparing

e3933150d0ce: Preparing

4d3748e9506a: Preparing

19ebbf036563: Preparing

ca368fa0afe9: Preparing

039e3643f57a: Preparing

e8584b5dde29: Preparing

444ad205dfc4: Preparing

8306c21eacc7: Preparing

b9bd5b8d5d83: Preparing

8a85eafa20fc: Preparing

d6ea71843412: Preparing

df238eeb1b51: Preparing

e27f84e03822: Preparing

9c5b6dd5d456: Preparing

44d5f5059302: Preparing

f7036b02b0e2: Preparing

ff12b5fa9ca1: Preparing

34eda7619b90: Preparing

c254176b0be1: Preparing

74ddd0ec08fa: Preparing

ca368fa0afe9: Waiting

039e3643f57a: Waiting

e8584b5dde29: Waiting

444ad205dfc4: Waiting

8306c21eacc7: Waiting

b9bd5b8d5d83: Waiting

8a85eafa20fc: Waiting

d6ea71843412: Waiting

df238eeb1b51: Waiting

e27f84e03822: Waiting

9c5b6dd5d456: Waiting

c254176b0be1: Waiting

74ddd0ec08fa: Waiting

ff12b5fa9ca1: Waiting

44d5f5059302: Waiting

f7036b02b0e2: Waiting

34eda7619b90: Waiting

e3933150d0ce: Layer already exists

4d3748e9506a: Layer already exists

1be2cf0c1fed: Layer already exists

19ebbf036563: Layer already exists

ee260ded2e58: Layer already exists

ca368fa0afe9: Layer already exists

039e3643f57a: Layer already exists

e8584b5dde29: Layer already exists

444ad205dfc4: Layer already exists

8a85eafa20fc: Layer already exists

df238eeb1b51: Layer already exists

b9bd5b8d5d83: Layer already exists

d6ea71843412: Layer already exists

8306c21eacc7: Layer already exists

9c5b6dd5d456: Layer already exists

44d5f5059302: Layer already exists

e27f84e03822: Layer already exists

f7036b02b0e2: Layer already exists

ff12b5fa9ca1: Layer already exists

c254176b0be1: Layer already exists

74ddd0ec08fa: Layer already exists

34eda7619b90: Layer already exists

latest: digest: sha256:c1473279d9bd63bd213a4c3460dc4080cac59af5da97535377ab5031b6045c3f size: 4936

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] }

[Pipeline] // withDockerRegistry

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] }

[Pipeline] // warnError

[Pipeline] }

[Pipeline] // script

[Pipeline] }

[Pipeline] // stage

[Pipeline] stage

[Pipeline] { (DeployToProduction)

[Pipeline] input

Deploy to Production?

Proceed or Abort

Approved by Emmanuel Warah

[Pipeline] milestone

Trying to pass milestone 1

[Pipeline] withCredentials

Masking supported pattern matches of $USERPASS

[Pipeline] {

[Pipeline] script

[Pipeline] {

[Pipeline] sh

Warning: A secret was passed to “sh” using Groovy String interpolation, which is insecure.

                Affected argument(s) used the following variable(s): [USERPASS]

                See https://jenkins.io/redirect/groovy-string-interpolation for details.

+ sshpass -p **** -v ssh -o StrictHostKeyChecking=no root@108.18.216.210 ‘docker pull ewarah/website3:99’

SSHPASS searching for password prompt using match “assword”

SSHPASS read: root@108.18.216.210’s password:

SSHPASS detected prompt. Sending password.

SSHPASS read:

Trying to pull repository docker.io/ewarah/website3 …

99: Pulling from docker.io/ewarah/website3

Digest: sha256:c1473279d9bd63bd213a4c3460dc4080cac59af5da97535377ab5031b6045c3f

Status: Downloaded newer image for docker.io/ewarah/website3:99

[Pipeline] sh

Warning: A secret was passed to “sh” using Groovy String interpolation, which is insecure.

                Affected argument(s) used the following variable(s): [USERPASS]

                See https://jenkins.io/redirect/groovy-string-interpolation for details.

+ sshpass -p **** -v ssh -o StrictHostKeyChecking=no root@108.18.216.210 ‘docker stop website3’

SSHPASS searching for password prompt using match “assword”

SSHPASS read: root@108.18.216.210’s password:

SSHPASS detected prompt. Sending password.

SSHPASS read:

website3

[Pipeline] sh

Warning: A secret was passed to “sh” using Groovy String interpolation, which is insecure.

                Affected argument(s) used the following variable(s): [USERPASS]

                See https://jenkins.io/redirect/groovy-string-interpolation for details.

+ sshpass -p **** -v ssh -o StrictHostKeyChecking=no root@108.18.216.210 ‘docker rm website3’

SSHPASS searching for password prompt using match “assword”

SSHPASS read: root@108.18.216.210’s password:

SSHPASS detected prompt. Sending password.

SSHPASS read:

website3

[Pipeline] sh

Warning: A secret was passed to “sh” using Groovy String interpolation, which is insecure.

                Affected argument(s) used the following variable(s): [USERPASS]

                See https://jenkins.io/redirect/groovy-string-interpolation for details.

+ sshpass -p **** -v ssh -o StrictHostKeyChecking=no root@108.18.216.210 ‘docker run -tid -p 6322:22 -p 6183:80 -p 9197:9090 -p 8189:8080 –name=website3 –privileged –tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro  –restart always ewarah/website3:99 /usr/sbin/init’

SSHPASS searching for password prompt using match “assword”

SSHPASS read: root@108.18.216.210’s password:

SSHPASS detected prompt. Sending password.

SSHPASS read:

40c35a1236053573ee5be9718de32d162d2b137ab8b209131648b7bf9a10944a

[Pipeline] }

[Pipeline] // script

[Pipeline] }

[Pipeline] // withCredentials

[Pipeline] }

[Pipeline] // stage

[Pipeline] }

[Pipeline] // withEnv

[Pipeline] }

[Pipeline] // node

[Pipeline] End of Pipeline

Could not update commit status, please check if your scan credentials belong to a member of the organization or a collaborator of the repository and repo:status scope is selected

GitHub has been notified of this commit’s build result

Finished: SUCCESS