From 9a7c35804c093a5e5f5a8bba3d5dfb383988edac Mon Sep 17 00:00:00 2001 From: Denis Rumyantsev Date: Fri, 1 Sep 2023 13:43:19 +0400 Subject: [PATCH] Remove RHEL from the agent CI (#4408) * remove rhel from ci * remove dockerfile * update config script --- .azure-pipelines/build-job.yml | 1 - .azure-pipelines/pipeline.yml | 49 +++++------------------ .vsts.ci.yml | 21 ++++------ .vsts.release.yml | 10 ----- images/centos7/Dockerfile | 40 ------------------- images/readme.md | 10 ++--- releaseNote.md | 6 +-- src/Misc/externals.sh | 1 - src/Misc/layoutroot/config.sh | 62 ++++++++++++++--------------- src/Test/L0/ConstantGenerationL0.cs | 1 - src/dev.sh | 10 ++--- 11 files changed, 59 insertions(+), 152 deletions(-) delete mode 100644 images/centos7/Dockerfile diff --git a/.azure-pipelines/build-job.yml b/.azure-pipelines/build-job.yml index e453ef0722..4c0d8b2f5c 100644 --- a/.azure-pipelines/build-job.yml +++ b/.azure-pipelines/build-job.yml @@ -24,7 +24,6 @@ parameters: - win - linux - linux-musl - - rhel.7.2 - osx - name: arch diff --git a/.azure-pipelines/pipeline.yml b/.azure-pipelines/pipeline.yml index 6299ae7555..a0a5a40be0 100644 --- a/.azure-pipelines/pipeline.yml +++ b/.azure-pipelines/pipeline.yml @@ -23,12 +23,6 @@ parameters: - name: branch type: string default: '' -- name: skipRhelRelease - type: boolean - default: true -- name: releaseRhelOnly - type: boolean - default: false - name: testProxyAgent type: boolean default: false @@ -52,9 +46,6 @@ parameters: - name: alpine_x64 type: boolean default: true -- name: rhel7_x64 - type: boolean - default: true - name: macOS_x64 type: boolean default: true @@ -64,8 +55,6 @@ parameters: resources: containers: - - container: centos7 - image: azpagentinfra/centos7:latest - container: alpine image: azpagentinfra/alpine:latest @@ -85,6 +74,7 @@ stages: variables: DisableDockerDetector: true nugetMultiFeedWarnLevel: none + timeoutInMinutes: 300 steps: - bash: | cd ./.azure-pipelines/scripts/ @@ -103,7 +93,7 @@ stages: displayName: Test Proxy Agent # Windows (x64) - - ${{ if and(parameters.win_x64, not(parameters.releaseRhelOnly)) }}: + - ${{ if parameters.win_x64 }}: - template: build-jobs.yml parameters: jobName: build_windows_x64 @@ -123,7 +113,7 @@ stages: buildAlternatePackage: ${{ parameters.buildAlternatePackage }} # Windows (x86) - - ${{ if and(parameters.win_x86, not(parameters.releaseRhelOnly)) }}: + - ${{ if parameters.win_x86 }}: - template: build-jobs.yml parameters: jobName: build_windows_x86 @@ -141,7 +131,7 @@ stages: buildAlternatePackage: ${{ parameters.buildAlternatePackage }} # Linux (x64) - - ${{ if and(parameters.linux_x64, not(parameters.releaseRhelOnly)) }}: + - ${{ if parameters.linux_x64 }}: - template: build-jobs.yml parameters: jobName: build_linux_x64 @@ -159,7 +149,7 @@ stages: buildAlternatePackage: ${{ parameters.buildAlternatePackage }} # Linux (ARM) - - ${{ if and(parameters.linux_arm, not(parameters.releaseRhelOnly)) }}: + - ${{ if parameters.linux_arm }}: - template: build-jobs.yml parameters: jobName: build_linux_arm @@ -178,7 +168,7 @@ stages: buildAlternatePackage: ${{ parameters.buildAlternatePackage }} # Linux (ARM64) - - ${{ if and(parameters.linux_arm64, not(parameters.releaseRhelOnly)) }}: + - ${{ if parameters.linux_arm64 }}: - template: build-jobs.yml parameters: jobName: build_linux_arm64 @@ -216,27 +206,8 @@ stages: publishArtifacts: ${{ parameters.publishArtifacts }} buildAlternatePackage: false - # RHEL7 (x64) - - ${{ if parameters.rhel7_x64 }}: - - template: build-jobs.yml - parameters: - jobName: build_rhel7_x64 - displayName: RHEL7 (x64) - pool: - vmImage: ubuntu-20.04 - container: centos7 - os: linux - arch: x64 - branch: ${{ parameters.branch }} - componentDetection: false - unitTests: ${{ parameters.test }} - functionalTests: ${{ parameters.test }} - sign: false - publishArtifacts: ${{ parameters.publishArtifacts }} - buildAlternatePackage: ${{ parameters.buildAlternatePackage }} - - # macOS x64 - - ${{ if and(parameters.macOS_x64, not(parameters.releaseRhelOnly)) }}: + # macOS (x64) + - ${{ if parameters.macOS_x64 }}: - template: build-jobs.yml parameters: jobName: build_osx @@ -253,12 +224,12 @@ stages: publishArtifacts: ${{ parameters.publishArtifacts }} buildAlternatePackage: ${{ parameters.buildAlternatePackage }} - # macOS arm64 + # macOS (ARM64) - ${{ if parameters.macOS_arm64 }}: - template: build-jobs.yml parameters: jobName: build_osx_arm64 - displayName: macOS (arm64) + displayName: macOS (ARM64) pool: vmImage: macOS-12 os: osx diff --git a/.vsts.ci.yml b/.vsts.ci.yml index 160ba5f21c..4eee337c43 100644 --- a/.vsts.ci.yml +++ b/.vsts.ci.yml @@ -1,4 +1,10 @@ parameters: +- name: testProxyAgent + type: boolean + displayName: Test Proxy Agent + default: true + +# Targets - name: win_x64 type: boolean displayName: Windows (x64) @@ -23,25 +29,14 @@ parameters: type: boolean displayName: Alpine (x64) default: true -- name: rhel7_x64 - type: boolean - displayName: RHEL 7 (x64) - default: false - name: macOS_x64 type: boolean displayName: macOS (x64) default: true - name: macOS_arm64 type: boolean - displayName: macOS (arm64) + displayName: macOS (ARM64) default: true -- name: skipRhelRelease - type: boolean - default: true -- name: testProxyAgent - type: boolean - default: true - displayName: Test Proxy Agent pr: branches: @@ -57,7 +52,6 @@ extends: componentDetection: ${{ eq(variables['Build.Reason'], 'PullRequest') }} publishArtifacts: ${{ ne(variables['Build.Reason'], 'PullRequest') }} buildAlternatePackage: false - skipRhelRelease: ${{ parameters.skipRhelRelease }} testProxyAgent: ${{ parameters.testProxyAgent }} win_x64: ${{ parameters.win_x64 }} win_x86: ${{ parameters.win_x86 }} @@ -65,6 +59,5 @@ extends: linux_arm: ${{ parameters.linux_arm }} linux_arm64: ${{ parameters.linux_arm64 }} alpine_x64: ${{ parameters.alpine_x64 }} - rhel7_x64: ${{ parameters.rhel7_x64 }} macOS_x64: ${{ parameters.macOS_x64 }} macOS_arm64: ${{ parameters.macOS_arm64 }} diff --git a/.vsts.release.yml b/.vsts.release.yml index fddf1fffa9..b2e07ba0cb 100644 --- a/.vsts.release.yml +++ b/.vsts.release.yml @@ -16,14 +16,6 @@ parameters: type: boolean default: false displayName: Build Stage Only -- name: skipRhelRelease - type: boolean - default: true - displayName: Skip RHEL Release -- name: releaseRhelOnly - type: boolean - default: false - displayName: Release RHEL Only - name: onlyGitHubRelease type: boolean @@ -49,8 +41,6 @@ extends: test: ${{ not(parameters.skipTests) }} sign: true publishArtifacts: true - skipRhelRelease: ${{ parameters.skipRhelRelease }} - releaseRhelOnly: ${{ parameters.releaseRhelOnly }} testProxyAgent: ${{ parameters.testProxyAgent }} preBuildStages: diff --git a/images/centos7/Dockerfile b/images/centos7/Dockerfile deleted file mode 100644 index 54d216ec38..0000000000 --- a/images/centos7/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM centos:centos7.9.2009 -RUN yum install -y \ - "perl(Time::HiRes)" \ - autoconf \ - cmake \ - cmake3 \ - devtoolset-2-toolchain \ - doxygen \ - expat-devel \ - gcc \ - gcc-c++ \ - libicu \ - unzip \ - gdb \ - gettext-devel \ - krb5-devel \ - libedit-devel \ - libidn-devel \ - libmetalink-devel \ - libnghttp2-devel \ - libssh2-devel \ - libunwind-devel \ - libuuid-devel \ - lttng-ust-devel \ - lzma \ - ncurses-devel \ - openssl-devel \ - perl-devel \ - python-argparse \ - python27 \ - readline-devel \ - swig \ - xz \ - zlib-devel \ - curl \ - git \ - openssl \ - && \ - yum clean all - diff --git a/images/readme.md b/images/readme.md index 964b2d7e59..36d622769f 100644 --- a/images/readme.md +++ b/images/readme.md @@ -1,4 +1,4 @@ -# Docker Images For Building Agent +# Docker Images for the Agent CI/CD Pipeline ## Docker Hub @@ -7,13 +7,11 @@ In order to publish these images, you need to be a member of the organization `a ## How to Build ```bash -docker build --tag azpagentinfra/alpine:latest ./images/alpine/ -docker build --tag azpagentinfra/centos7:latest ./images/centos7/ +docker build --tag "azpagentinfra/alpine:latest" ./images/alpine/ ``` -## How to Publish +## How to Push ```bash -docker push azpagentinfra/alpine:latest -docker push azpagentinfra/centos7:latest +docker push "azpagentinfra/alpine:latest" ``` diff --git a/releaseNote.md b/releaseNote.md index c8957303a0..a95e7c30c6 100644 --- a/releaseNote.md +++ b/releaseNote.md @@ -6,7 +6,7 @@ | Windows x64 | [vsts-agent-win-x64-.zip](https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-x64-.zip) | | | Windows x86 | [vsts-agent-win-x86-.zip](https://vstsagentpackage.azureedge.net/agent//vsts-agent-win-x86-.zip) | | | macOS x64 | [vsts-agent-osx-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-osx-x64-.tar.gz) | | -| macOS arm64 | [vsts-agent-osx-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-osx-arm64-.tar.gz) | | +| macOS ARM64 | [vsts-agent-osx-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-osx-arm64-.tar.gz) | | | Linux x64 | [vsts-agent-linux-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-linux-x64-.tar.gz) | | | Linux ARM | [vsts-agent-linux-arm-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-linux-arm-.tar.gz) | | | Linux ARM64 | [vsts-agent-linux-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//vsts-agent-linux-arm64-.tar.gz) | | @@ -35,7 +35,7 @@ C:\myagent> Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO ~/myagent$ tar xzf ~/Downloads/vsts-agent-osx-x64-.tar.gz ``` -## macOS arm64 +## macOS ARM64 ``` bash ~/$ mkdir myagent && cd myagent @@ -82,7 +82,7 @@ See [notes](docs/node6.md) on Node version support for more details. | Windows x64 | [pipelines-agent-win-x64-.zip](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x64-.zip) | | | Windows x86 | [pipelines-agent-win-x86-.zip](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-win-x86-.zip) | | | macOS x64 | [pipelines-agent-osx-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-osx-x64-.tar.gz) | | -| macOS arm64 | [pipelines-agent-osx-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-osx-x64-.tar.gz) | | +| macOS ARM64 | [pipelines-agent-osx-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-osx-x64-.tar.gz) | | | Linux x64 | [pipelines-agent-linux-x64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-linux-x64-.tar.gz) | | | Linux ARM | [pipelines-agent-linux-arm-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-linux-arm-.tar.gz) | | | Linux ARM64 | [pipelines-agent-linux-arm64-.tar.gz](https://vstsagentpackage.azureedge.net/agent//pipelines-agent-linux-arm64-.tar.gz) | | diff --git a/src/Misc/externals.sh b/src/Misc/externals.sh index 0a064428f8..395af43deb 100644 --- a/src/Misc/externals.sh +++ b/src/Misc/externals.sh @@ -198,7 +198,6 @@ else case $PACKAGERUNTIME in "linux-musl-x64") ARCH="linux-x64-musl";; "linux-x64") ARCH="linux-x64";; - "rhel.7.2-x64") ARCH="linux-x64";; "linux-arm") ARCH="linux-armv7l";; "linux-arm64") ARCH="linux-arm64";; "osx-x64") ARCH="darwin-x64";; diff --git a/src/Misc/layoutroot/config.sh b/src/Misc/layoutroot/config.sh index dd11a2e387..d65c925ffd 100755 --- a/src/Misc/layoutroot/config.sh +++ b/src/Misc/layoutroot/config.sh @@ -1,6 +1,6 @@ #!/bin/bash -user_id=`id -u` +user_id="$(id -u)" # we want to snapshot the environment of the config user if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then @@ -8,67 +8,67 @@ if [ $user_id -eq 0 -a -z "$AGENT_ALLOW_RUNASROOT" ]; then exit 1 fi -function detect_rhel6() -{ - if [ -e /etc/redhat-release ] - then - redhatRelease=$( /dev/null - if [ $? -ne 0 ] - then + if [ $? -ne 0 ]; then echo "Can not find 'ldd'. Please install 'ldd' and try again." exit 1 fi - ldd ./bin/libcoreclr.so | grep -E 'not found|No such' + ldd ./bin/libcoreclr.so | grep -E "not found|No such" if [ $? -eq 0 ]; then echo "Dependencies is missing for .NET Core 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep -E 'not found|No such' + ldd ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so | grep -E "not found|No such" if [ $? -eq 0 ]; then echo "Dependencies missing for .NET 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - ldd ./bin/libSystem.IO.Compression.Native.so | grep -E 'not found|No such' + ldd ./bin/libSystem.IO.Compression.Native.so | grep -E "not found|No such" if [ $? -eq 0 ]; then echo "Dependencies missing for .NET 6.0" echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi - if ! [ -x "$(command -v ldconfig)" ]; then - LDCONFIG_COMMAND="/sbin/ldconfig" - if ! [ -x "$LDCONFIG_COMMAND" ]; then - echo "Can not find 'ldconfig' in PATH and '/sbin/ldconfig' doesn't exists either. Please install 'ldconfig' and try again." + if [ -e /etc/alpine-release ]; then + if [ -z "$(apk info 2>&1 | grep icu-libs)" ]; then + echo "icu-libs are missing" + echo "Execute ./bin/installdependencies.sh to install any missing dependencies." exit 1 fi else - LDCONFIG_COMMAND="ldconfig" - fi + LDCONFIG="ldconfig" + if ! [ -x "$(command -v $LDCONFIG)" ]; then + LDCONFIG="/sbin/ldconfig" - libpath=${LD_LIBRARY_PATH:-} - $LDCONFIG_COMMAND -NXv ${libpath//:/} 2>&1 | grep libicu >/dev/null 2>&1 - if [ $? -ne 0 ]; then - echo "libicu's dependencies missing for .NET 6" - echo "Execute ./bin/installdependencies.sh to install any missing dependencies." - exit 1 + if ! [ -x "$LDCONFIG" ]; then + echo "Can not find 'ldconfig' in PATH and '/sbin/ldconfig' doesn't exists either. Please install 'ldconfig' and try again." + exit 1 + fi + fi + + libpath="${LD_LIBRARY_PATH:-}" + $LDCONFIG -NXv "${libpath//:/}" 2>&1 | grep libicu >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "libicu's dependencies missing for .NET 6" + echo "Execute ./bin/installdependencies.sh to install any missing dependencies." + exit 1 + fi fi fi diff --git a/src/Test/L0/ConstantGenerationL0.cs b/src/Test/L0/ConstantGenerationL0.cs index e454bd44f0..3fb16f4c27 100644 --- a/src/Test/L0/ConstantGenerationL0.cs +++ b/src/Test/L0/ConstantGenerationL0.cs @@ -21,7 +21,6 @@ public void BuildConstantGenerateSucceed() "linux-arm", "linux-arm64", "linux-musl-x64", - "rhel.7.2-x64", "osx-x64", "osx-arm64" }; diff --git a/src/dev.sh b/src/dev.sh index 369e82246b..657ed69c4d 100755 --- a/src/dev.sh +++ b/src/dev.sh @@ -65,11 +65,9 @@ function detect_platform_and_runtime_id () fi if [ -e /etc/redhat-release ]; then - local redhatRelease=$(