From: Eric Ball Date: Mon, 5 Feb 2024 23:07:53 +0000 (-0800) Subject: Chore: Upgrade global-jjb to v0.90.0 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=557258996f2edb1c30b01b932ae2f3052de7de20;p=ci-management.git Chore: Upgrade global-jjb to v0.90.0 For compatibility with JJB v6, some additional files needed to be escaped when read, and some inline scripts were moved to separate files. Change-Id: I6734e386e7256cc4d4bffd15cf4d390703eefe4b Signed-off-by: Eric Ball --- diff --git a/global-jjb b/global-jjb index d31ff46..5d33657 160000 --- a/global-jjb +++ b/global-jjb @@ -1 +1 @@ -Subproject commit d31ff4635d1dc4a6afe4cf3be622a219be5f1318 +Subproject commit 5d336574e77fb349ace15356ef8ffb816d463544 diff --git a/jjb/akraino-templates/akraino-jjb-kni.yaml b/jjb/akraino-templates/akraino-jjb-kni.yaml index 2e396bc..91e1a54 100644 --- a/jjb/akraino-templates/akraino-jjb-kni.yaml +++ b/jjb/akraino-templates/akraino-jjb-kni.yaml @@ -29,9 +29,9 @@ variable: "SETTINGS_FILE" - lf-infra-create-netrc: server-id: logs - - shell: !include-raw: + - shell: !include-raw-escape: - ../../global-jjb/shell/logs-deploy.sh - - shell: !include-raw: + - shell: !include-raw-escape: - ../../global-jjb/shell/logs-clear-credentials.sh - description-setter: regexp: "(^(Nexus|S3) build logs: .*)" diff --git a/jjb/akraino-templates/akraino-jjb-templates.yaml b/jjb/akraino-templates/akraino-jjb-templates.yaml index 4975463..b0c4d3e 100644 --- a/jjb/akraino-templates/akraino-jjb-templates.yaml +++ b/jjb/akraino-templates/akraino-jjb-templates.yaml @@ -258,7 +258,10 @@ sign-artifacts: "{sign-artifacts}" sign-dir: "$WORKSPACE/m2repo" sign-mode: serial - - lf-maven-stage + - lf-maven-stage: + mvn-global-settings: "global-settings" + mvn-settings: "" + mvn-staging-id: "" - lf-provide-maven-settings-cleanup publishers: diff --git a/jjb/akraino-templates/akraino-ta-common-macros.yaml b/jjb/akraino-templates/akraino-ta-common-macros.yaml index ca444f8..9ead2c4 100644 --- a/jjb/akraino-templates/akraino-ta-common-macros.yaml +++ b/jjb/akraino-templates/akraino-ta-common-macros.yaml @@ -178,13 +178,13 @@ properties-content: | ALT_NEXUS_URL= SERVER_ID= - - shell: !include-raw: + - shell: !include-raw-escape: # Ensure python-tools are installed in case job template does not # call the lf-infra-pre-build macro. - ../../global-jjb/shell/python-tools-install.sh - - shell: !include-raw: + - shell: !include-raw-escape: - ../shell/ta-rpm-deploy.sh - - shell: !include-raw: + - shell: !include-raw-escape: - ../../global-jjb/shell/logs-clear-credentials.sh - builder: @@ -198,13 +198,13 @@ variable: "SETTINGS_FILE" - lf-infra-create-netrc: server-id: images-snapshots - - shell: !include-raw: + - shell: !include-raw-escape: # Ensure python-tools are installed in case job template does not # call the lf-infra-pre-build macro. - ../../global-jjb/shell/python-tools-install.sh - - shell: !include-raw: + - shell: !include-raw-escape: - ../shell/ta-iso-deploy.sh - - shell: !include-raw: + - shell: !include-raw-escape: - ../../global-jjb/shell/logs-clear-credentials.sh - builder: @@ -268,44 +268,12 @@ - builder: name: ta-builder-install-docker builders: - - shell: |2- - #!/bin/bash -ex - if apt --version 2>1 >/dev/null; then - sudo chmod +r /boot/vmlinuz* - if ! docker --version 2>1 >/dev/null; then - sudo apt update - sudo apt install -y apt-transport-https ca-certificates curl software-properties-common rename - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository -y "deb http://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt update - sudo apt install -y docker-ce - fi - else - sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - sudo yum -y install docker-ce docker-ce-cli containerd.io - fi - sudo mkdir -p /etc/docker/ - echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json - sudo systemctl start docker - # Ugly hack to make docker usable for non-root - # (adding to the group would require re-login) - sudo chmod 777 /var/run/docker.sock + - shell: !include-raw-escape: ../shell/ta-install-docker.sh - builder: name: ta-builder-install-build-tools builders: - - shell: |2- - #!/bin/bash -ex - if apt --version 2>1 >/dev/null; then - if ! createrepo --version 2>1 >/dev/null; then - sudo apt update - sudo apt install -y createrepo libguestfs-tools jq libvirt-daemon-system - fi - else - sudo yum -y install createrepo libguestfs-tools-c jq - fi - sudo systemctl start libvirtd - systemctl status libvirtd + - shell: !include-raw-escape: ../shell/ta-install-build-tools.sh ########### # TRIGGER # diff --git a/jjb/shell/ta-install-build-tools.sh b/jjb/shell/ta-install-build-tools.sh new file mode 100644 index 0000000..80500c3 --- /dev/null +++ b/jjb/shell/ta-install-build-tools.sh @@ -0,0 +1,11 @@ +#!/bin/bash -ex +if apt --version 2>1 >/dev/null; then + if ! createrepo --version 2>1 >/dev/null; then + sudo apt update + sudo apt install -y createrepo libguestfs-tools jq libvirt-daemon-system + fi +else + sudo yum -y install createrepo libguestfs-tools-c jq +fi +sudo systemctl start libvirtd +systemctl status libvirtd diff --git a/jjb/shell/ta-install-docker.sh b/jjb/shell/ta-install-docker.sh new file mode 100644 index 0000000..c75536e --- /dev/null +++ b/jjb/shell/ta-install-docker.sh @@ -0,0 +1,21 @@ +#!/bin/bash -ex +if apt --version 2>1 >/dev/null; then + sudo chmod +r /boot/vmlinuz* + if ! docker --version 2>1 >/dev/null; then + sudo apt update + sudo apt install -y apt-transport-https ca-certificates curl software-properties-common rename + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository -y "deb http://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt update + sudo apt install -y docker-ce + fi +else + sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + sudo yum -y install docker-ce docker-ce-cli containerd.io +fi +sudo mkdir -p /etc/docker/ +echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json +sudo systemctl start docker +# Ugly hack to make docker usable for non-root +# (adding to the group would require re-login) +sudo chmod 777 /var/run/docker.sock