78 lines
3.0 KiB
YAML
78 lines
3.0 KiB
YAML
# SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel <sarah.vaupel@uniworx.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
pool: 'Prod Private Agent Pool'
|
|
|
|
jobs:
|
|
- job: BuildImages
|
|
container:
|
|
image: devfra.azurecr.io/de.fraport.build/tools:1.1.0
|
|
endpoint: devfra
|
|
steps:
|
|
- checkout: self
|
|
- task: Docker@2
|
|
name: dockerLoginDevFra
|
|
displayName: Docker Login to devfra
|
|
inputs:
|
|
command: login
|
|
containerRegistry: devFra
|
|
- task: Bash@3
|
|
name: dockerBuildFrontend
|
|
displayName: Build frontend image
|
|
inputs:
|
|
command: build
|
|
Dockerfile: docker/frontend/Dockerfile
|
|
buildContext: .
|
|
tags: |
|
|
$(Build.BuildNumber)
|
|
frontend
|
|
arguments: |
|
|
cp docker/backend/Dockerfile .
|
|
docker build \
|
|
--build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/npm \
|
|
--build-arg FROM_TAG=node-20 \
|
|
--build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \
|
|
--build-arg HTTP_PROXY=http://proxy.frankfurt-airport.de:8080 \
|
|
--build-arg NO_PROXY='localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io' \
|
|
--build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \
|
|
--build-arg PROJECT_DIR=/fradrive \
|
|
.
|
|
- task: Bash@3
|
|
displayName: Build backend image
|
|
inputs:
|
|
targetType: inline
|
|
script: |
|
|
cp docker/backend/Dockerfile .
|
|
docker build \
|
|
--build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/haskell \
|
|
--build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \
|
|
--build-arg HTTP_PROXY=http://proxy.frankfurt-airport.de:8080 \
|
|
--build-arg NO_PROXY='localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io' \
|
|
--build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \
|
|
--build-arg PROJECT_DIR=/fradrive \
|
|
.
|
|
# - task: Docker@2
|
|
# name: dockerBuild
|
|
# displayName: Backend image build test
|
|
# inputs:
|
|
# command: build
|
|
# Dockerfile: docker/backend/Dockerfile
|
|
# buildContext: .
|
|
# tags: |
|
|
# $(Build.BuildNumber)
|
|
# backend
|
|
# arguments: |
|
|
# --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080
|
|
# --build-arg HTTP_PROXY=http://proxy.frankfurt-airport.de:8080
|
|
# --build-arg NO_PROXY='localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io'
|
|
# --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/haskell
|
|
# --build-arg MOUNT_DIR=$(Build.Repository.LocalPath)
|
|
# --build-arg PROJECT_DIR=/fradrive
|
|
# # -v $(Build.Repository.LocalPath):/mnt/fradrive # supported in podman build, but not in docker build
|
|
- task: Docker@2
|
|
name: dockerLogoutDevFra
|
|
displayName: Docker Logout from devfra
|
|
inputs:
|
|
command: logout
|
|
containerRegistry: devFra |