зеркало из https://github.com/Azure/ARO-RP.git
Removed unused code
This commit is contained in:
Родитель
4f2f249d4d
Коммит
6062210b3d
|
@ -1,79 +0,0 @@
|
|||
# ./templates/e2e-pipeline-template.yml
|
||||
parameters:
|
||||
- name: rpImageACR
|
||||
type: string
|
||||
- name: acrCredentialsJSON
|
||||
type: string
|
||||
|
||||
steps:
|
||||
# Step 1: Authenticate to ACR and Install Docker Compose
|
||||
- task: AzureCLI@2
|
||||
displayName: 'Authenticate to ACR and Install Docker Compose'
|
||||
inputs:
|
||||
azureSubscription: 'ado-pipeline-dev-image-push' # service connection
|
||||
scriptType: bash
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
set -xe
|
||||
# Ensure RP_IMAGE_ACR is correctly passed as a parameter
|
||||
if [ -z "${{ parameters.rpImageACR }}" ]; then
|
||||
echo "Error: RP_IMAGE_ACR is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ACR_FQDN="${{ parameters.rpImageACR }}"
|
||||
REGISTRY_NAME=$(echo $ACR_FQDN | cut -d'.' -f1)
|
||||
|
||||
# Install Docker Compose
|
||||
echo "Installing Docker and Docker Compose Plugin..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl gnupg
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||
$(. /etc/os-release && echo \"$VERSION_CODENAME\") stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
|
||||
# Login to ACR
|
||||
az acr login --name $REGISTRY_NAME
|
||||
|
||||
# Step 2: Pull the RP Docker image
|
||||
- script: |
|
||||
if [ -z "${{ parameters.rpImageACR }}" ]; then
|
||||
echo "Error: RP_IMAGE_ACR is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export RP_IMAGE_ACR=${{ parameters.rpImageACR }}
|
||||
export VERSION=$(Build.BuildId)
|
||||
|
||||
# Construct the RP image path correctly
|
||||
if [[ "${RP_IMAGE_ACR}" == */aro ]]; then
|
||||
RP_IMAGE="${RP_IMAGE_ACR}:${VERSION}"
|
||||
else
|
||||
RP_IMAGE="${RP_IMAGE_ACR}/aro:${VERSION}"
|
||||
fi
|
||||
|
||||
echo "Pulling RP image: $RP_IMAGE"
|
||||
docker pull $RP_IMAGE || { echo "Error: RP image $RP_IMAGE not found."; exit 1; }
|
||||
displayName: Pull RP Docker Image
|
||||
|
||||
# Step 3: Pull the E2E Docker image
|
||||
- script: |
|
||||
if [ -z "${{ parameters.rpImageACR }}" ]; then
|
||||
echo "Error: RP_IMAGE_ACR is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export VERSION=$(Build.BuildId)
|
||||
export E2E_IMAGE=${{ parameters.rpImageACR }}/e2e:${VERSION}
|
||||
|
||||
echo "Pulling E2E image: $E2E_IMAGE"
|
||||
docker pull $E2E_IMAGE || { echo "Error: E2E image $E2E_IMAGE not found."; exit 1; }
|
||||
displayName: Pull E2E Docker Image
|
|
@ -10,7 +10,7 @@ services:
|
|||
volumes:
|
||||
- ${PWD}/secrets:/secrets:z
|
||||
devices:
|
||||
- /dev/net/tun
|
||||
- /dev/net/tun # required to modify VPN on host
|
||||
entrypoint: "openvpn"
|
||||
command: ["/secrets/vpn-eastus.ovpn"]
|
||||
ports:
|
||||
|
|
Загрузка…
Ссылка в новой задаче