From d8c88d167f22938bb618b238303a90e1c6fdedf0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 6 Dec 2024 17:03:50 +0100 Subject: [PATCH 001/355] build(Makefile): revisit stop targets --- Makefile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index cd008f20f..ae6e257e4 100644 --- a/Makefile +++ b/Makefile @@ -369,16 +369,21 @@ psql: --ensure-develop stop: rm -rf develop .PHONY: stop-% -# HELP(stop-{database,memcached,minio,backend,frontend,hoogle}): stop all currently running develop instances of a given type -stop-%: +# HELP(stop-SERVICE): stop all currently running develop instances of a given service (i.e. backend,frontend,uniworxdb,hoogle,postgres,...) +# HELP(stop-JOB): stop all currently running develop instances of a given job (i.e. compile,start,test,lint) +stop-compile: CF_PREFIX=compile- +stop-start: CF_PREFIX=start- +stop-test: CF_PREFIX=test- +stop-lint: CF_PREFIX=lint- +stop-%: --stop; +--stop: $(SET_DEVELOP) - rm -rf $(DEVELOP)/$* -stop-container-by-file: - rm $(CONTAINER_FILE) -stop-container-by-id: - $(CONTAINER_COMMAND) stop $(CONTAINER_ID) -# CONTAINER_ID=`grep 'CONTAINER_ID=' $(CONTAINER_FILE) | sed 's/CONTAINER_ID=//'` ; \ -# $(MAKE) stop-container-by-id CONTAINER_ID=$${CONTAINER_ID} +ifdef CF_PREFIX + rm -rf $(DEVELOP)/$(CF_PREFIX)* +endif +ifdef SERVICE_VARIANT + rm -rf $(DEVELOP)/*-$(SERVICE_VARIANT) +endif .PHONY: new-develop # HELP: instantiate new development bundle, i.e. create new directory under develop/ From 2033976381b031deaca090269add602a7eb9c491 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 14:40:51 +0100 Subject: [PATCH 002/355] build(docker/backend): add texlive-base and more tex runtime dependencies --- docker/backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index ca5d79eca..160623630 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -10,7 +10,8 @@ RUN apt-get -y update && apt-get -y install locales locales-all # run-time dependencies for uniworx binary RUN apt-get -y update && apt-get -y install fonts-roboto -RUN apt-get -y update && apt-get -y install texlive-luatex +RUN apt-get -y update && apt-get -y install pdftk +RUN apt-get -y update && apt-get -y install texlive-base luatex ENV LANG=en_US.UTF-8 From 3946090dab7e7d56e07553349d93d4e74b0247fd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 14:59:45 +0100 Subject: [PATCH 003/355] build(docker/backend): add debug print for apt sources info --- docker/backend/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 160623630..3d9c19eed 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,5 +1,8 @@ FROM docker.io/ubuntu:latest +# DEBUG: list apt sources +RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* + # compile-time dependencies RUN apt-get -y update && apt-get -y install inotify-tools RUN apt-get -y update && apt-get -y install haskell-stack git From 09f22e52c79e022ba47e6b4276300bc986d0ca2b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:00:19 +0100 Subject: [PATCH 004/355] build(docker/backend): remove unused dependency --- docker/backend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 3d9c19eed..3a9af4d4a 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -4,7 +4,6 @@ FROM docker.io/ubuntu:latest RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* # compile-time dependencies -RUN apt-get -y update && apt-get -y install inotify-tools RUN apt-get -y update && apt-get -y install haskell-stack git RUN apt-get -y update && apt-get -y install alex g++ happy libghc-zlib-dev libpq-dev libsodium-dev pkg-config RUN apt-get -y update && apt-get -y install llvm From d0cd45e60e94c56670b5f9cff6968840f50ae461 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:01:19 +0100 Subject: [PATCH 005/355] build(docker/backend): add temporary tools FROM for pipeline test --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 3a9af4d4a..79d9d004a 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/ubuntu:latest +FROM devfra.azurecr.io/de.fraport.build/tools:1.1.0 # DEBUG: list apt sources RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* From f47cb172300013dcdf87e6b7feb53317a2cbabe4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:12:31 +0100 Subject: [PATCH 006/355] build(docker/backend): remove locales (and thus tzdata) installs for testing purposes --- docker/backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 79d9d004a..730d5a240 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -7,8 +7,8 @@ RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* RUN apt-get -y update && apt-get -y install haskell-stack git RUN apt-get -y update && apt-get -y install alex g++ happy libghc-zlib-dev libpq-dev libsodium-dev pkg-config RUN apt-get -y update && apt-get -y install llvm -RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata -RUN apt-get -y update && apt-get -y install locales locales-all +# RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata +# RUN apt-get -y update && apt-get -y install locales locales-all # run-time dependencies for uniworx binary RUN apt-get -y update && apt-get -y install fonts-roboto From ebae2b386e2e68737c12f671fde53320ce260103 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:18:00 +0100 Subject: [PATCH 007/355] build(docker/backend): remove test-only dependencies temporarily --- docker/backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 730d5a240..e74f98966 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -4,9 +4,9 @@ FROM devfra.azurecr.io/de.fraport.build/tools:1.1.0 RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* # compile-time dependencies -RUN apt-get -y update && apt-get -y install haskell-stack git -RUN apt-get -y update && apt-get -y install alex g++ happy libghc-zlib-dev libpq-dev libsodium-dev pkg-config +RUN apt-get -y update && apt-get -y install haskell-stack RUN apt-get -y update && apt-get -y install llvm +RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config # RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata # RUN apt-get -y update && apt-get -y install locales locales-all From 13ec339f9b3ec662577e1aeea017870428c7dfc1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:22:35 +0100 Subject: [PATCH 008/355] build(docker/backend): tmp-remove deps --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index e74f98966..84c7e539f 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -6,7 +6,7 @@ RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* # compile-time dependencies RUN apt-get -y update && apt-get -y install haskell-stack RUN apt-get -y update && apt-get -y install llvm -RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config +# RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config # RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata # RUN apt-get -y update && apt-get -y install locales locales-all From a2bdd4bbb8a34576b46a06dc78c881b77f442033 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:27:15 +0100 Subject: [PATCH 009/355] build(docker/backend): remove unused dependency --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 84c7e539f..3bb2444b5 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get -y update && apt-get -y install llvm # run-time dependencies for uniworx binary RUN apt-get -y update && apt-get -y install fonts-roboto -RUN apt-get -y update && apt-get -y install pdftk +# RUN apt-get -y update && apt-get -y install pdftk RUN apt-get -y update && apt-get -y install texlive-base luatex ENV LANG=en_US.UTF-8 From 16001df5bec67ab71f91fe104db6f53e14710018 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:33:29 +0100 Subject: [PATCH 010/355] build(docker/backend): tmp-remove more deps --- docker/backend/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 3bb2444b5..ad3170f49 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -3,6 +3,8 @@ FROM devfra.azurecr.io/de.fraport.build/tools:1.1.0 # DEBUG: list apt sources RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* +ENV LANG=en_US.UTF-8 + # compile-time dependencies RUN apt-get -y update && apt-get -y install haskell-stack RUN apt-get -y update && apt-get -y install llvm @@ -11,11 +13,9 @@ RUN apt-get -y update && apt-get -y install llvm # RUN apt-get -y update && apt-get -y install locales locales-all # run-time dependencies for uniworx binary -RUN apt-get -y update && apt-get -y install fonts-roboto +# RUN apt-get -y update && apt-get -y install fonts-roboto # RUN apt-get -y update && apt-get -y install pdftk -RUN apt-get -y update && apt-get -y install texlive-base luatex - -ENV LANG=en_US.UTF-8 +# RUN apt-get -y update && apt-get -y install texlive-base luatex # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. From 2b91095391e2f19e8c92f228dd85034cb9e079cf Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 15:44:37 +0100 Subject: [PATCH 011/355] ci(azure-pipelines): add PROJECT_DIR and MOUNT_DIR build-args --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 581e555da..2a67c6026 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -41,6 +41,8 @@ jobs: --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 PROJECT_DIR=. + --build-arg MOUNT_DIR=. # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 3b4b1f2fa9000e36e3782d838c75d4422f6cc5a9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 10 Dec 2024 16:08:31 +0100 Subject: [PATCH 012/355] ci(azure-pipelines): tweak PROJECT_DIR and MOUNT_DIR --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2a67c6026..574c669e1 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -41,8 +41,8 @@ jobs: --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 PROJECT_DIR=. - --build-arg MOUNT_DIR=. + --build-arg PROJECT_DIR=/fradrive + --build-arg MOUNT_DIR=/mnt/fradrive # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 1ab8a93b53c4e6d739c74849a239cacd0e5e9a7b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Dec 2024 01:02:45 +0100 Subject: [PATCH 013/355] refactor: backport saltine (0.2.0.0->0.1.1.1) for compatibility with proper lts-18.0 stack snapshot image --- src/Crypto/Saltine/Instances.hs | 77 +++ src/Handler/Utils/Memcached.hs | 12 +- src/Model/Tokens/Upload.hs | 9 +- src/Utils.hs | 8 +- .../Backend/Persistent/Memcached.hs | 6 +- stack.yaml | 2 +- stack.yaml.lock | 570 +++++++++--------- 7 files changed, 381 insertions(+), 303 deletions(-) create mode 100644 src/Crypto/Saltine/Instances.hs diff --git a/src/Crypto/Saltine/Instances.hs b/src/Crypto/Saltine/Instances.hs new file mode 100644 index 000000000..e4b812212 --- /dev/null +++ b/src/Crypto/Saltine/Instances.hs @@ -0,0 +1,77 @@ +{-# LANGUAGE BangPatterns #-} +{-# OPTIONS_GHC -Wwarn #-} + +-- SPDX-FileCopyrightText: 2024 Sarah Vaupel +-- +-- SPDX-License-Identifier: AGPL-3.0-or-later + +-- | Missing instances for saltine@0.1.1.1, backported from saltine@0.2.0.0 +module Crypto.Saltine.Instances () where + +import ClassyPrelude hiding (compare) + +import Crypto.Saltine.Class +import Crypto.Saltine.Core.Auth hiding (Key) +import Crypto.Saltine.Core.SecretBox +import Crypto.Saltine.Core.Hash +import Crypto.Saltine.Internal.ByteSizes (shorthashKey) + +import Data.ByteString.Unsafe +import Foreign.C +import Foreign.Marshal.Alloc (mallocBytes) +import Foreign.Ptr +import System.IO.Unsafe + +import qualified Data.ByteString as S +import qualified Data.ByteString.Char8 as S8 +import Data.Maybe (fromJust) + + +-- | Used for our `Show` instances +nullShKey :: ShorthashKey +nullShKey = fromJust . decode $ S8.replicate shorthashKey '\NUL' + +-- | Extremely unsafe function, use with utmost care! Builds a new +-- ByteString using a ccall which is given access to the raw underlying +-- pointer. Overwrites are UNCHECKED and 'unsafePerformIO' is used so +-- it's difficult to predict the timing of the 'ByteString' creation. +buildUnsafeByteString :: Int -> (Ptr CChar -> IO b) -> (b, ByteString) +buildUnsafeByteString n = unsafePerformIO . buildUnsafeByteString' n + +-- | Slightly safer cousin to 'buildUnsafeByteString' that remains in the +-- 'IO' monad. +buildUnsafeByteString' :: Int -> (Ptr CChar -> IO b) -> IO (b, ByteString) +buildUnsafeByteString' n k = do + ph <- mallocBytes n + bs <- unsafePackMallocCStringLen (ph, n) + out <- unsafeUseAsCString bs k + return (out, bs) + +-- | Convenience function for accessing constant C strings +constByteStrings :: [ByteString] -> ([CStringLen] -> IO b) -> IO b +constByteStrings = + foldr (\v kk -> \k -> (unsafeUseAsCStringLen v) (\a -> kk (\as -> k (a:as)))) ($ []) + +-- | bin2hex conversion for showing various binary types +foreign import ccall unsafe "sodium_bin2hex" + c_sodium_bin2hex + :: Ptr CChar -- Target zone + -> CInt -- Max. length of target string (must be min. bin_len * 2 + 1) + -> Ptr CChar -- Source + -> CInt -- Source length + -> IO (Ptr CChar) + +bin2hex :: ByteString -> String +bin2hex bs = let tlen = S.length bs * 2 + 1 in + S8.unpack . S8.init . snd . buildUnsafeByteString tlen $ \t -> + constByteStrings [bs] $ \[(pbs, _)] -> + c_sodium_bin2hex t (fromIntegral tlen) pbs (fromIntegral $ S.length bs) + +instance Show Key where + show k = "SecretBox.Key {hashesTo = \"" <> (bin2hex . shorthash nullShKey $ encode k) <> "}\"" + +instance Show Nonce where + show k = "SecretBox.Nonce " <> bin2hex (encode k) + +instance Show Authenticator where + show k = "Sign.Authenticator " <> bin2hex (encode k) \ No newline at end of file diff --git a/src/Handler/Utils/Memcached.hs b/src/Handler/Utils/Memcached.hs index 706a56024..091e88418 100644 --- a/src/Handler/Utils/Memcached.hs +++ b/src/Handler/Utils/Memcached.hs @@ -1,4 +1,4 @@ --- SPDX-FileCopyrightText: 2022 Gregor Kleen +-- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen -- -- SPDX-License-Identifier: AGPL-3.0-or-later @@ -60,7 +60,7 @@ import System.IO.Unsafe (unsafePerformIO) import Control.Concurrent.STM.Delay import qualified Crypto.Saltine.Class as Saltine -import qualified Crypto.Saltine.Internal.SecretBox as Saltine +import qualified Crypto.Saltine.Internal.ByteSizes as Saltine import qualified Crypto.Saltine.Core.AEAD as AEAD import qualified Control.Monad.State.Class as State @@ -130,15 +130,15 @@ putMemcachedValue MemcachedValue{..} = do getMemcachedValue, getMemcachedValueNoExpiry :: Binary.Get MemcachedValue getMemcachedValue = do Binary.lookAhead . Binary.label "length check" $ do - void . Binary.getByteString $ Saltine.secretbox_noncebytes + 4 + Saltine.secretbox_macbytes - mNonce <- Binary.label "nonce" $ Binary.getByteString Saltine.secretbox_noncebytes >>= hoistMaybe . Saltine.decode + void . Binary.getByteString $ Saltine.secretBoxNonce + 4 + Saltine.secretBoxMac + mNonce <- Binary.label "nonce" $ Binary.getByteString Saltine.secretBoxNonce >>= hoistMaybe . Saltine.decode mExpiry <- getExpiry mCiphertext <- Binary.label "ciphertext" $ toStrict <$> Binary.getRemainingLazyByteString return MemcachedValue{..} getMemcachedValueNoExpiry = do Binary.lookAhead . Binary.label "length check" $ do - void . Binary.getByteString $ Saltine.secretbox_noncebytes + 4 + Saltine.secretbox_macbytes - mNonce <- Binary.label "nonce" $ Binary.getByteString Saltine.secretbox_noncebytes >>= hoistMaybe . Saltine.decode + void . Binary.getByteString $ Saltine.secretBoxNonce + 4 + Saltine.secretBoxMac + mNonce <- Binary.label "nonce" $ Binary.getByteString Saltine.secretBoxNonce >>= hoistMaybe . Saltine.decode let mExpiry = Nothing mCiphertext <- Binary.label "ciphertext" $ toStrict <$> Binary.getRemainingLazyByteString return MemcachedValue{..} diff --git a/src/Model/Tokens/Upload.hs b/src/Model/Tokens/Upload.hs index 199a08d6f..8aa289083 100644 --- a/src/Model/Tokens/Upload.hs +++ b/src/Model/Tokens/Upload.hs @@ -1,4 +1,4 @@ --- SPDX-FileCopyrightText: 2022 Gregor Kleen +-- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen -- -- SPDX-License-Identifier: AGPL-3.0-or-later @@ -33,10 +33,11 @@ import Utils.PathPiece import qualified Data.HashMap.Strict as HashMap +import Crypto.Saltine.Instances () import qualified Crypto.Saltine.Core.SecretBox as SecretBox import qualified Data.ByteString.Base64.URL as Base64 import qualified Crypto.Saltine.Class as Saltine -import qualified Crypto.Saltine.Internal.SecretBox as Saltine +import qualified Crypto.Saltine.Internal.ByteSizes as Saltine import qualified Data.ByteString as BS @@ -91,9 +92,9 @@ instance ToJSON UploadTokenStateHashState where instance FromJSON UploadTokenStateHashState where parseJSON = JSON.withText "UploadTokenStateHashState" $ \t -> do decoded <- either (const $ fail "Invalid base64") return . Base64.decode $ encodeUtf8 t - unless (BS.length decoded >= Saltine.secretbox_noncebytes + Saltine.secretbox_macbytes) $ + unless (BS.length decoded >= Saltine.secretBoxNonce + Saltine.secretBoxMac) $ fail "Too short" - let (nonceBS, utsHashStateState) = BS.splitAt Saltine.secretbox_noncebytes decoded + let (nonceBS, utsHashStateState) = BS.splitAt Saltine.secretBoxNonce decoded utsHashStateNonce <- maybe (fail "Invalid nonce") return $ Saltine.decode nonceBS return UploadTokenStateHashState{..} diff --git a/src/Utils.hs b/src/Utils.hs index c47f29992..616aefc05 100644 --- a/src/Utils.hs +++ b/src/Utils.hs @@ -1,4 +1,4 @@ --- SPDX-FileCopyrightText: 2022-23 Gregor Kleen ,Sarah Vaupel ,Sarah Vaupel ,Steffen Jost ,Winnie Ros ,Steffen Jost +-- SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen ,Sarah Vaupel ,Sarah Vaupel ,Steffen Jost ,Winnie Ros ,Steffen Jost -- -- SPDX-License-Identifier: AGPL-3.0-or-later @@ -96,11 +96,11 @@ import qualified Data.Yaml as Yaml import Data.Universe -import qualified Crypto.Saltine.Internal.SecretBox as Saltine import qualified Data.ByteString.Base64.URL as Base64 import qualified Crypto.Saltine.Core.SecretBox as SecretBox import qualified Crypto.Saltine.Core.Auth as Auth import qualified Crypto.Saltine.Class as Saltine +import qualified Crypto.Saltine.Internal.ByteSizes as Saltine import qualified Crypto.Data.PKCS7 as PKCS7 import Crypto.MAC.KMAC (KMAC, HashSHAKE) import qualified Crypto.MAC.KMAC as KMAC @@ -1569,9 +1569,9 @@ encodedSecretBoxOpen' sKey chunked = do let unchunked = stripAll chunked decoded <- either (throwError . EncodedSecretBoxInvalidBase64) return . Base64.decode $ encodeUtf8 unchunked - unless (BS.length decoded >= Saltine.secretbox_noncebytes + Saltine.secretbox_macbytes) $ + unless (BS.length decoded >= Saltine.secretBoxNonce + Saltine.secretBoxMac) $ throwError EncodedSecretBoxCiphertextTooShort - let (nonceBS, encrypted) = BS.splitAt Saltine.secretbox_noncebytes decoded + let (nonceBS, encrypted) = BS.splitAt Saltine.secretBoxNonce decoded nonce <- maybe (throwError EncodedSecretBoxCouldNotDecodeNonce) return $ Saltine.decode nonceBS padded <- maybe (throwError EncodedSecretBoxCouldNotOpenSecretBox) return $ SecretBox.secretboxOpen sKey nonce encrypted diff --git a/src/Web/ServerSession/Backend/Persistent/Memcached.hs b/src/Web/ServerSession/Backend/Persistent/Memcached.hs index 7c090772e..41d88c89b 100644 --- a/src/Web/ServerSession/Backend/Persistent/Memcached.hs +++ b/src/Web/ServerSession/Backend/Persistent/Memcached.hs @@ -25,7 +25,7 @@ import qualified Data.Binary as Binary import qualified Database.Memcached.Binary.IO as Memcached import qualified Crypto.Saltine.Class as Saltine -import qualified Crypto.Saltine.Internal.SecretBox as Saltine +import qualified Crypto.Saltine.Internal.ByteSizes as Saltine import qualified Crypto.Saltine.Core.AEAD as AEAD import qualified Data.ByteString as BS @@ -119,9 +119,9 @@ instance (IsSessionData sess, Binary (Decomposed sess)) => Storage (MemcachedSql getSession MemcachedSqlStorage{..} sessId = exceptT (maybe (return Nothing) throwM) (return . Just) $ do encSession <- catchIfExceptT (const Nothing) Memcached.isKeyNotFound . liftIO . fmap LBS.toStrict $ Memcached.getAndTouch_ expiry (memcachedSqlSessionId # sessId) mcdSqlMemcached - guardExceptT (BS.length encSession >= Saltine.secretbox_noncebytes + Saltine.secretbox_macbytes) $ + guardExceptT (BS.length encSession >= Saltine.secretBoxNonce + Saltine.secretBoxMac) $ Just MemcachedSqlStorageAEADCiphertextTooShort - let (nonceBS, encrypted) = BS.splitAt Saltine.secretbox_noncebytes encSession + let (nonceBS, encrypted) = BS.splitAt Saltine.secretBoxNonce encSession encSessId = LBS.toStrict $ Binary.encode sessId nonce <- maybeTExceptT (Just MemcachedSqlStorageAEADCouldNotDecodeNonce) . hoistMaybe $ Saltine.decode nonceBS decrypted <- maybeTExceptT (Just MemcachedSqlStorageAEADCouldNotOpenAEAD) . hoistMaybe $ AEAD.aeadOpen mcdSqlMemcachedKey nonce encrypted encSessId diff --git a/stack.yaml b/stack.yaml index c881ba7b1..aaba0bfd0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -119,7 +119,7 @@ extra-deps: # - process-extras-0.7.4@sha256:4e79289131415796c181889c4a226ebab7fc3b0d27b164f65e1aad123ae9b9e3,1759 # - ListLike-4.7.4@sha256:613b2967df738010e8f6f6b7c47d615f6fe42081f68eba7f946d5de7552aa8a4,3778 - - saltine-0.2.0.0@sha256:2232a285ef326b0942bbcbfa6f465933a020f27e19552213e688fe371d66dddd,5198 + - saltine-0.1.1.1@sha256:6f30609a5d4d7e406d5f6fc8f3eb28efcc226d25bee8cea2b248f2b525aba71b,3221 - persistent-postgresql-2.13.0.3@sha256:43384bf8ed9c931c673e6abb763c8811113d1b7004095faaae1eb42e2cd52d8f,3601 resolver: lts-18.0 diff --git a/stack.yaml.lock b/stack.yaml.lock index e7f29eab1..d6dd90433 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -5,539 +5,539 @@ packages: - completed: - commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 - git: https://gitea.uniworx.systems/haskell/encoding.git name: encoding - pantry-tree: - sha256: fec12328951021bb4d9326ae0b35f0c459e65f28442366efd4366cd1e18abe19 - size: 5723 version: 0.8.2 - original: - commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 git: https://gitea.uniworx.systems/haskell/encoding.git + pantry-tree: + size: 5723 + sha256: fec12328951021bb4d9326ae0b35f0c459e65f28442366efd4366cd1e18abe19 + commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 + original: + git: https://gitea.uniworx.systems/haskell/encoding.git + commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 - completed: - commit: b7071df50bad3a251a544b984e4bf98fa09b8fae - git: https://gitea.uniworx.systems/haskell/memcached-binary.git name: memcached-binary - pantry-tree: - sha256: 0da0539b7b9a56d03a116dcd666bc1bbbef085659910420849484d1418aa0857 - size: 1277 version: 0.2.0 - original: - commit: b7071df50bad3a251a544b984e4bf98fa09b8fae git: https://gitea.uniworx.systems/haskell/memcached-binary.git + pantry-tree: + size: 1277 + sha256: 0da0539b7b9a56d03a116dcd666bc1bbbef085659910420849484d1418aa0857 + commit: b7071df50bad3a251a544b984e4bf98fa09b8fae + original: + git: https://gitea.uniworx.systems/haskell/memcached-binary.git + commit: b7071df50bad3a251a544b984e4bf98fa09b8fae - completed: - commit: cbea6159c2975d42f948525e03e12fc390da53c5 - git: https://gitea.uniworx.systems/haskell/conduit-resumablesink.git name: conduit-resumablesink - pantry-tree: - sha256: 0cccf4684bbd84f81d2d3d53dd81c46cb103b5322f1d8e89e9b222211281e1b7 - size: 394 version: '0.3' - original: - commit: cbea6159c2975d42f948525e03e12fc390da53c5 git: https://gitea.uniworx.systems/haskell/conduit-resumablesink.git + pantry-tree: + size: 394 + sha256: 0cccf4684bbd84f81d2d3d53dd81c46cb103b5322f1d8e89e9b222211281e1b7 + commit: cbea6159c2975d42f948525e03e12fc390da53c5 + original: + git: https://gitea.uniworx.systems/haskell/conduit-resumablesink.git + commit: cbea6159c2975d42f948525e03e12fc390da53c5 - completed: - commit: 5aa1f3b009253b02c4822005ac59ee208a10a347 - git: https://github.com/jtdaugherty/HaskellNet.git name: HaskellNet - pantry-tree: - sha256: 921b437ef18ccb04f889301c407263d6b5b72c5864803a000b1e61328988ce70 - size: 4011 version: 0.5.1 - original: - commit: 5aa1f3b009253b02c4822005ac59ee208a10a347 git: https://github.com/jtdaugherty/HaskellNet.git + pantry-tree: + size: 4011 + sha256: 921b437ef18ccb04f889301c407263d6b5b72c5864803a000b1e61328988ce70 + commit: 5aa1f3b009253b02c4822005ac59ee208a10a347 + original: + git: https://github.com/jtdaugherty/HaskellNet.git + commit: 5aa1f3b009253b02c4822005ac59ee208a10a347 - completed: - commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 - git: https://gitea.uniworx.systems/haskell/HaskellNet-SSL.git name: HaskellNet-SSL - pantry-tree: - sha256: 95dcec22fdb8af986e59f0f60aa76d4a48f34a546dca799bd571e1d183f773e0 - size: 841 version: 0.3.4.1 - original: - commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 git: https://gitea.uniworx.systems/haskell/HaskellNet-SSL.git + pantry-tree: + size: 841 + sha256: 95dcec22fdb8af986e59f0f60aa76d4a48f34a546dca799bd571e1d183f773e0 + commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 + original: + git: https://gitea.uniworx.systems/haskell/HaskellNet-SSL.git + commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 - completed: - commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 - git: https://gitea.uniworx.systems/haskell/ldap-client.git name: ldap-client - pantry-tree: - sha256: 3fa8f102427b437b2baaec15cf884e88b47a1621b1c3fd4d8919f0263fde8656 - size: 6176 version: 0.4.0 - original: - commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 git: https://gitea.uniworx.systems/haskell/ldap-client.git + pantry-tree: + size: 6176 + sha256: 3fa8f102427b437b2baaec15cf884e88b47a1621b1c3fd4d8919f0263fde8656 + commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 + original: + git: https://gitea.uniworx.systems/haskell/ldap-client.git + commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 - completed: - commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 - git: https://gitea.uniworx.systems/haskell/serversession.git + subdir: serversession name: serversession - pantry-tree: - sha256: 83ac78a987399db3da62f84bbd335fead11aadebd57251d0688127fca984db23 - size: 545 - subdir: serversession version: 1.0.2 - original: - commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 git: https://gitea.uniworx.systems/haskell/serversession.git + pantry-tree: + size: 545 + sha256: 83ac78a987399db3da62f84bbd335fead11aadebd57251d0688127fca984db23 + commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 + original: subdir: serversession -- completed: - commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 git: https://gitea.uniworx.systems/haskell/serversession.git + commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 +- completed: + subdir: serversession-backend-acid-state name: serversession-backend-acid-state - pantry-tree: - sha256: 4804260c6245c12e1728c78dd33bf16e95b7f2b69b38b6900a4e65b1ef3e04b7 - size: 544 - subdir: serversession-backend-acid-state version: 1.0.4 - original: - commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 git: https://gitea.uniworx.systems/haskell/serversession.git + pantry-tree: + size: 544 + sha256: 4804260c6245c12e1728c78dd33bf16e95b7f2b69b38b6900a4e65b1ef3e04b7 + commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 + original: subdir: serversession-backend-acid-state + git: https://gitea.uniworx.systems/haskell/serversession.git + commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 - completed: - commit: dc928c3a456074b8777603bea20e81937321777f - git: https://gitea.uniworx.systems/haskell/xss-sanitize.git name: xss-sanitize - pantry-tree: - sha256: f567a1c834448daaa164f2029fad164e6c8df2d4c92b51f811bae19cc0c95975 - size: 750 version: 0.3.6 - original: - commit: dc928c3a456074b8777603bea20e81937321777f git: https://gitea.uniworx.systems/haskell/xss-sanitize.git + pantry-tree: + size: 750 + sha256: f567a1c834448daaa164f2029fad164e6c8df2d4c92b51f811bae19cc0c95975 + commit: dc928c3a456074b8777603bea20e81937321777f + original: + git: https://gitea.uniworx.systems/haskell/xss-sanitize.git + commit: dc928c3a456074b8777603bea20e81937321777f - completed: - commit: f8170266ab25b533576e96715bedffc5aa4f19fa - git: https://gitea.uniworx.systems/haskell/colonnade.git + subdir: colonnade name: colonnade - pantry-tree: - sha256: 392393652cc0f354d351482557b9385c8e6122e706359b030373656565f2e045 - size: 481 - subdir: colonnade version: 1.2.0.2 - original: - commit: f8170266ab25b533576e96715bedffc5aa4f19fa git: https://gitea.uniworx.systems/haskell/colonnade.git + pantry-tree: + size: 481 + sha256: 392393652cc0f354d351482557b9385c8e6122e706359b030373656565f2e045 + commit: f8170266ab25b533576e96715bedffc5aa4f19fa + original: subdir: colonnade + git: https://gitea.uniworx.systems/haskell/colonnade.git + commit: f8170266ab25b533576e96715bedffc5aa4f19fa - completed: - commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 - git: https://gitea.uniworx.systems/haskell/minio-hs.git name: minio-hs - pantry-tree: - sha256: c5faff15fa22a7a63f45cd903c9bd11ae03f422c26f24750f5c44cb4d0db70fc - size: 4560 version: 1.5.2 - original: - commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 git: https://gitea.uniworx.systems/haskell/minio-hs.git + pantry-tree: + size: 4560 + sha256: c5faff15fa22a7a63f45cd903c9bd11ae03f422c26f24750f5c44cb4d0db70fc + commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 + original: + git: https://gitea.uniworx.systems/haskell/minio-hs.git + commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 - completed: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitea.uniworx.systems/haskell/cryptoids.git + subdir: cryptoids-class name: cryptoids-class + version: 0.0.0 + git: https://gitea.uniworx.systems/haskell/cryptoids.git pantry-tree: - sha256: 30466648d273ffb1d580b7961188d67a0bedb3703d6d5f8cca3c15a45295f203 size: 412 - subdir: cryptoids-class - version: 0.0.0 + sha256: 30466648d273ffb1d580b7961188d67a0bedb3703d6d5f8cca3c15a45295f203 + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 original: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: cryptoids-class -- completed: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 +- completed: + subdir: cryptoids-types name: cryptoids-types + version: 1.0.0 + git: https://gitea.uniworx.systems/haskell/cryptoids.git pantry-tree: - sha256: 824ac5c55c2ad553bd401bb5a99731bbdccc828ecc5d71f174e9375c4e03c46e size: 320 - subdir: cryptoids-types - version: 1.0.0 + sha256: 824ac5c55c2ad553bd401bb5a99731bbdccc828ecc5d71f174e9375c4e03c46e + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 original: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: cryptoids-types -- completed: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 +- completed: + subdir: cryptoids name: cryptoids - pantry-tree: - sha256: b1f49dde76ff7e78b76e7f2f3b3f76c55e5e61555d1df5415ad3b6eb80dda2cb - size: 566 - subdir: cryptoids version: 0.5.1.0 - original: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + pantry-tree: + size: 566 + sha256: b1f49dde76ff7e78b76e7f2f3b3f76c55e5e61555d1df5415ad3b6eb80dda2cb + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 + original: subdir: cryptoids -- completed: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 +- completed: + subdir: filepath-crypto name: filepath-crypto - pantry-tree: - sha256: 9c31a2ffb2b1c86f9ba34eb83529c7a5a7dc68a49f89813c9b553427474654d9 - size: 676 - subdir: filepath-crypto version: 0.1.0.0 - original: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + pantry-tree: + size: 676 + sha256: 9c31a2ffb2b1c86f9ba34eb83529c7a5a7dc68a49f89813c9b553427474654d9 + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 + original: subdir: filepath-crypto -- completed: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 +- completed: + subdir: uuid-crypto name: uuid-crypto - pantry-tree: - sha256: 852e59807df1f2cf4b5a3748c46fa149d15a78651c93addfe5fc31d2d94c47f4 - size: 417 - subdir: uuid-crypto version: 1.4.0.0 - original: - commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 git: https://gitea.uniworx.systems/haskell/cryptoids.git + pantry-tree: + size: 417 + sha256: 852e59807df1f2cf4b5a3748c46fa149d15a78651c93addfe5fc31d2d94c47f4 + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 + original: subdir: uuid-crypto + git: https://gitea.uniworx.systems/haskell/cryptoids.git + commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - completed: - commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d - git: https://github.com/gkleen/FastCDC.git + subdir: gearhash name: gearhash - pantry-tree: - sha256: 89c58554f6780bff2a2cab86e94d2f562eea34e8025a9925bfdc25b56c925d3e - size: 551 - subdir: gearhash version: 1.0.0 - original: - commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d git: https://github.com/gkleen/FastCDC.git + pantry-tree: + size: 551 + sha256: 89c58554f6780bff2a2cab86e94d2f562eea34e8025a9925bfdc25b56c925d3e + commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d + original: subdir: gearhash -- completed: - commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d git: https://github.com/gkleen/FastCDC.git + commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d +- completed: + subdir: fastcdc name: fastcdc - pantry-tree: - sha256: aa588b55c7c9c079e39569489a8089ec312f0538d02cf0e1fffe2f0e058566b8 - size: 292 - subdir: fastcdc version: 0.0.0 - original: - commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d git: https://github.com/gkleen/FastCDC.git + pantry-tree: + size: 292 + sha256: aa588b55c7c9c079e39569489a8089ec312f0538d02cf0e1fffe2f0e058566b8 + commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d + original: subdir: fastcdc + git: https://github.com/gkleen/FastCDC.git + commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d - completed: - commit: 843683d024f767de236f74d24a3348f69181a720 - git: https://gitea.uniworx.systems/haskell/zip-stream.git name: zip-stream - pantry-tree: - sha256: 0da8bc38d73034962d2e2d1a7586b6dee848a629319fce9cbbf578348c61118c - size: 812 version: 0.2.0.1 - original: - commit: 843683d024f767de236f74d24a3348f69181a720 git: https://gitea.uniworx.systems/haskell/zip-stream.git + pantry-tree: + size: 812 + sha256: 0da8bc38d73034962d2e2d1a7586b6dee848a629319fce9cbbf578348c61118c + commit: 843683d024f767de236f74d24a3348f69181a720 + original: + git: https://gitea.uniworx.systems/haskell/zip-stream.git + commit: 843683d024f767de236f74d24a3348f69181a720 - completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitea.uniworx.systems/haskell/yesod.git + subdir: yesod-core name: yesod-core - pantry-tree: - sha256: 08c8da10b32c8d9f784238fd87232bf90b752e82f81ef2c52c62210f9aadda9a - size: 5954 - subdir: yesod-core version: 1.6.20.2 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 5954 + sha256: 08c8da10b32c8d9f784238fd87232bf90b752e82f81ef2c52c62210f9aadda9a + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-core -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-static name: yesod-static - pantry-tree: - sha256: 32c1608243a5309005ce11e2aa379ac1d6f8c380c529785eb510770118f3da06 - size: 2949 - subdir: yesod-static version: 1.6.1.0 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 2949 + sha256: 32c1608243a5309005ce11e2aa379ac1d6f8c380c529785eb510770118f3da06 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-static -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-persistent name: yesod-persistent - pantry-tree: - sha256: 3778ef2964e1a3890afc22cc9124eacb40e64b62bed4983a85d3b99897f54c5c - size: 497 - subdir: yesod-persistent version: 1.6.0.7 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 497 + sha256: 3778ef2964e1a3890afc22cc9124eacb40e64b62bed4983a85d3b99897f54c5c + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-persistent -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-newsfeed name: yesod-newsfeed - pantry-tree: - sha256: 53ebad62655863a657dcf749ffd3de46f6af90dd71f55bc4d50805ac48ddb099 - size: 488 - subdir: yesod-newsfeed version: 1.7.0.0 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 488 + sha256: 53ebad62655863a657dcf749ffd3de46f6af90dd71f55bc4d50805ac48ddb099 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-newsfeed -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-form name: yesod-form - pantry-tree: - sha256: 260b7f16a8e1d58da137eb91aeed3a11ccbe59ba3e614457a635b9dc3e71426f - size: 1914 - subdir: yesod-form version: 1.7.0 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 1914 + sha256: 260b7f16a8e1d58da137eb91aeed3a11ccbe59ba3e614457a635b9dc3e71426f + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-form -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-form-multi name: yesod-form-multi - pantry-tree: - sha256: b21fc50db43733dfe6e285345856610ba4feb83329e9cf953bf8047ba18ecbd6 - size: 328 - subdir: yesod-form-multi version: 1.7.0.2 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 328 + sha256: b21fc50db43733dfe6e285345856610ba4feb83329e9cf953bf8047ba18ecbd6 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-form-multi -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-auth name: yesod-auth - pantry-tree: - sha256: d335b940a207f8155f421b7146746a72d20db6ad54412154f2c829a59bf21e08 - size: 1212 - subdir: yesod-auth version: 1.6.10.3 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 1212 + sha256: d335b940a207f8155f421b7146746a72d20db6ad54412154f2c829a59bf21e08 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-auth -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-auth-oauth name: yesod-auth-oauth - pantry-tree: - sha256: 39d2f7d5d1abb3a2953858c5f23880e60ecfcdad0549ddc2570204f9c47649f4 - size: 321 - subdir: yesod-auth-oauth version: 1.6.0.3 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 321 + sha256: 39d2f7d5d1abb3a2953858c5f23880e60ecfcdad0549ddc2570204f9c47649f4 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-auth-oauth -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-sitemap name: yesod-sitemap - pantry-tree: - sha256: 971f48af7011ff7816872d067e5de9cadafdd371bdf209170b77df36001abd27 - size: 314 - subdir: yesod-sitemap version: 1.6.0 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 314 + sha256: 971f48af7011ff7816872d067e5de9cadafdd371bdf209170b77df36001abd27 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-sitemap -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-test name: yesod-test - pantry-tree: - sha256: 3d5022e8e3f8e77abcf075c42cf49efaa26f4951159bbb5ab50b69fdfeacb7c1 - size: 563 - subdir: yesod-test version: 1.6.12 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 563 + sha256: 3d5022e8e3f8e77abcf075c42cf49efaa26f4951159bbb5ab50b69fdfeacb7c1 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-test -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-bin name: yesod-bin - pantry-tree: - sha256: 422d7816965b79826c6c24582d76dadbacd1bfb3e9a8f31208867cd788f2a5b8 - size: 1295 - subdir: yesod-bin version: 1.6.1 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 1295 + sha256: 422d7816965b79826c6c24582d76dadbacd1bfb3e9a8f31208867cd788f2a5b8 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-bin -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod name: yesod - pantry-tree: - sha256: cb53ef3f2036185d2b4752d6fbc5d78470b4504e646e7eb4dd2397f2599daf42 - size: 666 - subdir: yesod version: 1.6.1.1 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 666 + sha256: cb53ef3f2036185d2b4752d6fbc5d78470b4504e646e7eb4dd2397f2599daf42 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-eventsource name: yesod-eventsource - pantry-tree: - sha256: 6d393201852cd024e377159ba836398e24d191563e08165430113d3c1384aff2 - size: 324 - subdir: yesod-eventsource version: 1.6.0.1 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 324 + sha256: 6d393201852cd024e377159ba836398e24d191563e08165430113d3c1384aff2 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-eventsource -- completed: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 +- completed: + subdir: yesod-websockets name: yesod-websockets - pantry-tree: - sha256: 02df6117e9b74a77879ea750130ba2d8ad8d3c99e14ca678320cb578984301e5 - size: 485 - subdir: yesod-websockets version: 0.3.0.3 - original: - commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 git: https://gitea.uniworx.systems/haskell/yesod.git + pantry-tree: + size: 485 + sha256: 02df6117e9b74a77879ea750130ba2d8ad8d3c99e14ca678320cb578984301e5 + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 + original: subdir: yesod-websockets + git: https://gitea.uniworx.systems/haskell/yesod.git + commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - completed: - commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f - git: https://gitea.uniworx.systems/haskell/cryptonite.git name: cryptonite - pantry-tree: - sha256: 19e49259fa5e3c257495d72b3c7c3c49537aeafd508c780c2430ddca2ef71a91 - size: 25056 version: '0.29' - original: - commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f git: https://gitea.uniworx.systems/haskell/cryptonite.git + pantry-tree: + size: 25056 + sha256: 19e49259fa5e3c257495d72b3c7c3c49537aeafd508c780c2430ddca2ef71a91 + commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f + original: + git: https://gitea.uniworx.systems/haskell/cryptonite.git + commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f - completed: - commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 - git: https://gitea.uniworx.systems/haskell/esqueleto.git name: esqueleto - pantry-tree: - sha256: 8a93dc98eb4529ff64aa5bcdaa3c00dcdf0378033ad675864e2b0fc3d869d947 - size: 5633 version: 3.5.4.0 - original: - commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 git: https://gitea.uniworx.systems/haskell/esqueleto.git + pantry-tree: + size: 5633 + sha256: 8a93dc98eb4529ff64aa5bcdaa3c00dcdf0378033ad675864e2b0fc3d869d947 + commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 + original: + git: https://gitea.uniworx.systems/haskell/esqueleto.git + commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 - completed: hackage: classy-prelude-yesod-1.5.0@sha256:8f7e183bdfd6d2ea9674284c4f285294ab086aff60d9be4e5d7d2f3c1a2b05b7,1330 pantry-tree: - sha256: ae84d4cc0e1daf985db6cdcf2ac92319531b8e60f547183cc46480d00aafbe20 size: 330 + sha256: ae84d4cc0e1daf985db6cdcf2ac92319531b8e60f547183cc46480d00aafbe20 original: hackage: classy-prelude-yesod-1.5.0@sha256:8f7e183bdfd6d2ea9674284c4f285294ab086aff60d9be4e5d7d2f3c1a2b05b7,1330 - completed: hackage: acid-state-0.16.0.1@sha256:d43f6ee0b23338758156c500290c4405d769abefeb98e9bc112780dae09ece6f,6207 pantry-tree: - sha256: d57bcb2ad5e01fe7424abbcf9e58cf943027b5c4a8496d93625c57b6e1272274 size: 13678 + sha256: d57bcb2ad5e01fe7424abbcf9e58cf943027b5c4a8496d93625c57b6e1272274 original: hackage: acid-state-0.16.0.1@sha256:d43f6ee0b23338758156c500290c4405d769abefeb98e9bc112780dae09ece6f,6207 - completed: hackage: normaldistribution-1.1.0.3@sha256:2615b784c4112cbf6ffa0e2b55b76790290a9b9dff18a05d8c89aa374b213477,2160 pantry-tree: - sha256: 856818862d12df8b030fa9cfef2c4ffa604d06f0eb057498db245dfffcd60e3c size: 269 + sha256: 856818862d12df8b030fa9cfef2c4ffa604d06f0eb057498db245dfffcd60e3c original: hackage: normaldistribution-1.1.0.3@sha256:2615b784c4112cbf6ffa0e2b55b76790290a9b9dff18a05d8c89aa374b213477,2160 - completed: hackage: pkcs7-1.0.0.1@sha256:b26e5181868667abbde3ce17f9a61cf705eb695da073cdf82e1f9dfd6cc11176,3594 pantry-tree: - sha256: ab3c2d2880179a945ab3122c51d1657ab4a7a628292b646e047cd32b0751a80c size: 316 + sha256: ab3c2d2880179a945ab3122c51d1657ab4a7a628292b646e047cd32b0751a80c original: hackage: pkcs7-1.0.0.1@sha256:b26e5181868667abbde3ce17f9a61cf705eb695da073cdf82e1f9dfd6cc11176,3594 - completed: hackage: system-locale-0.3.0.0@sha256:13b3982403d8ac8cc6138e68802be8d8e7cf7ebc4cbc7e47e99e3c0dd1be066a,1529 pantry-tree: - sha256: 3b22af3e6315835bf614a0d30381ec7e47aca147b59ba601aeaa26f1fdc19373 size: 446 + sha256: 3b22af3e6315835bf614a0d30381ec7e47aca147b59ba601aeaa26f1fdc19373 original: hackage: system-locale-0.3.0.0@sha256:13b3982403d8ac8cc6138e68802be8d8e7cf7ebc4cbc7e47e99e3c0dd1be066a,1529 - completed: hackage: token-bucket-0.1.0.1@sha256:d8e85f2fc373939975e7ace7907baee177531ab6e43df94e330a2357e64a2d11,1899 pantry-tree: - sha256: b0b4a08ea1bf76bd108310f64d7f80e0f30b61ddc3d71f6cab7bdce329d2c1fa size: 399 + sha256: b0b4a08ea1bf76bd108310f64d7f80e0f30b61ddc3d71f6cab7bdce329d2c1fa original: hackage: token-bucket-0.1.0.1@sha256:d8e85f2fc373939975e7ace7907baee177531ab6e43df94e330a2357e64a2d11,1899 - completed: hackage: tz-0.1.3.5@sha256:fb17ca50a7d943e511c0ca70342dc83f66aa2532de2745632f1f5f9b1ad783c4,5086 pantry-tree: - sha256: 6482698ea1b1a93bd684fca35836b35e8cdf53fe51b0fa6b215afa7da1f983a6 size: 1179 + sha256: 6482698ea1b1a93bd684fca35836b35e8cdf53fe51b0fa6b215afa7da1f983a6 original: hackage: tz-0.1.3.5@sha256:fb17ca50a7d943e511c0ca70342dc83f66aa2532de2745632f1f5f9b1ad783c4,5086 - completed: hackage: unidecode-0.1.0.4@sha256:99581ee1ea334a4596a09ae3642e007808457c66893b587e965b31f15cbf8c4d,1144 pantry-tree: - sha256: 4959068a0caf410dd4b8046f0b0138e3cf6471abb0cc865c9993db3b2930d283 size: 492 + sha256: 4959068a0caf410dd4b8046f0b0138e3cf6471abb0cc865c9993db3b2930d283 original: hackage: unidecode-0.1.0.4@sha256:99581ee1ea334a4596a09ae3642e007808457c66893b587e965b31f15cbf8c4d,1144 - completed: hackage: hlint-test-0.1.0.0@sha256:e427c0593433205fc629fb05b74c6b1deb1de72d1571f26142de008f0d5ee7a9,1814 pantry-tree: - sha256: 347eac6c8a3c02fc0101444d6526b57b3c27785809149b12f90d8db57c721fea size: 442 + sha256: 347eac6c8a3c02fc0101444d6526b57b3c27785809149b12f90d8db57c721fea original: hackage: hlint-test-0.1.0.0@sha256:e427c0593433205fc629fb05b74c6b1deb1de72d1571f26142de008f0d5ee7a9,1814 - completed: hackage: servant-quickcheck-0.0.10.0@sha256:1d5849d703c2487752f8fc7391cca7c998ee24f54ca0bb72d238bf99b64ac667,3755 pantry-tree: - sha256: 37dab60111c71d011fc4964e9a8b4b05ac544bc0ba8155e895518680066c2adb size: 976 + sha256: 37dab60111c71d011fc4964e9a8b4b05ac544bc0ba8155e895518680066c2adb original: hackage: servant-quickcheck-0.0.10.0@sha256:1d5849d703c2487752f8fc7391cca7c998ee24f54ca0bb72d238bf99b64ac667,3755 - completed: hackage: servant-flatten-0.2@sha256:276896f7c5cdec5b8f8493f6205fded0cc602d050b58fdb09a6d7c85c3bb0837,1234 pantry-tree: - sha256: 04f12c7bef2c3f9a25d94eb9489752ed498db8e243069fe95838dbb51df1dcb3 size: 325 + sha256: 04f12c7bef2c3f9a25d94eb9489752ed498db8e243069fe95838dbb51df1dcb3 original: hackage: servant-flatten-0.2@sha256:276896f7c5cdec5b8f8493f6205fded0cc602d050b58fdb09a6d7c85c3bb0837,1234 - completed: hackage: network-arbitrary-0.7.0.0@sha256:0cd381c80ae20c16048936edcdb018b1d9fbe2b6ac8c44e908df403a5c6d7cd5,2520 pantry-tree: - sha256: a40b62eddfb12cfec753a10836a4ef5fe8ec94d7478e6957e1fe5729017928fb size: 912 + sha256: a40b62eddfb12cfec753a10836a4ef5fe8ec94d7478e6957e1fe5729017928fb original: hackage: network-arbitrary-0.7.0.0@sha256:0cd381c80ae20c16048936edcdb018b1d9fbe2b6ac8c44e908df403a5c6d7cd5,2520 - completed: - hackage: saltine-0.2.0.0@sha256:2232a285ef326b0942bbcbfa6f465933a020f27e19552213e688fe371d66dddd,5198 + hackage: saltine-0.1.1.1@sha256:6f30609a5d4d7e406d5f6fc8f3eb28efcc226d25bee8cea2b248f2b525aba71b,3221 pantry-tree: - sha256: fdf4397f4b1ed7975f38d0b463eb6c9d206d0c85d157c41c19983e80b2005763 - size: 5016 + size: 2048 + sha256: ca0ee9387a95500a6417598650f4361f6b4077fd18c8c6414e271c7b32850d03 original: - hackage: saltine-0.2.0.0@sha256:2232a285ef326b0942bbcbfa6f465933a020f27e19552213e688fe371d66dddd,5198 + hackage: saltine-0.1.1.1@sha256:6f30609a5d4d7e406d5f6fc8f3eb28efcc226d25bee8cea2b248f2b525aba71b,3221 - completed: hackage: persistent-postgresql-2.13.0.3@sha256:43384bf8ed9c931c673e6abb763c8811113d1b7004095faaae1eb42e2cd52d8f,3601 pantry-tree: - sha256: 2d647a17372e42bc54331cfb35f5a55a71e6854dac8299b7ed6a1c69ae12734d size: 1059 + sha256: 2d647a17372e42bc54331cfb35f5a55a71e6854dac8299b7ed6a1c69ae12734d original: hackage: persistent-postgresql-2.13.0.3@sha256:43384bf8ed9c931c673e6abb763c8811113d1b7004095faaae1eb42e2cd52d8f,3601 snapshots: - completed: - sha256: c632012da648385b9fa3c29f4e0afd56ead299f1c5528ee789058be410e883c0 size: 585393 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/0.yaml + sha256: c632012da648385b9fa3c29f4e0afd56ead299f1c5528ee789058be410e883c0 original: lts-18.0 From 84a5cb37d998bfab7d19a0b9ef988bb39ac7f742 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Dec 2024 01:07:52 +0100 Subject: [PATCH 014/355] build(docker/backend): switch to official stack snapshot image --- docker/backend/Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index ad3170f49..ec87803de 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,13 +1,12 @@ -FROM devfra.azurecr.io/de.fraport.build/tools:1.1.0 +FROM docker.io/fpco/stack-build:lts-18.0 -# DEBUG: list apt sources -RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* +# add public key for nvidia cuda repositories +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC ENV LANG=en_US.UTF-8 # compile-time dependencies -RUN apt-get -y update && apt-get -y install haskell-stack -RUN apt-get -y update && apt-get -y install llvm +# RUN apt-get -y update && apt-get -y install llvm # RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config # RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata # RUN apt-get -y update && apt-get -y install locales locales-all From b068e46480d132575a79ec5a895ed4c55bb299da Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Dec 2024 01:28:26 +0100 Subject: [PATCH 015/355] build(Makefile): use YESOD_IP_FROM_HEADER to fix reverse-proxy issues --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ae6e257e4..e85fd602b 100644 --- a/Makefile +++ b/Makefile @@ -259,6 +259,7 @@ endif # HELP(start-backend): start development instance --start-backend: + export YESOD_IP_FROM_HEADER=true; \ export DEV_PORT_HTTP=`cat $(CONTAINER_FILE) | grep 'DEV_PORT_HTTP=' | sed 's/DEV_PORT_HTTP=//'`; \ export DEV_PORT_HTTPS=`cat $(CONTAINER_FILE) | grep 'DEV_PORT_HTTPS=' | sed 's/DEV_PORT_HTTPS=//'`; \ export HOST=127.0.0.1 ; \ @@ -275,7 +276,7 @@ endif export RIBBON=$${RIBBON:-$${HOST:-localhost}} ; \ export APPROOT=$${APPROOT:-http://localhost:$${DEV_PORT_HTTP}} ; \ export AVSPASS=$${AVSPASS:-nopasswordset} ; \ - stack $(STACK_CORES) exec --local-bin-path $$(pwd)/bin --copy-bins -- yesod devel -n -p "$${DEV_PORT_HTTP}" -q "$${DEV_PORT_HTTPS}" + stack $(STACK_CORES) exec --local-bin-path $$(pwd)/bin --copy-bins -- yesod devel -p "$${DEV_PORT_HTTP}" -q "$${DEV_PORT_HTTPS}" # HELP(compile-backend): compile backend binaries --compile-backend: stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins From 376c88e724b5e0866b4d3616686cc5e4ae4ee407 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Dec 2024 14:03:49 +0100 Subject: [PATCH 016/355] build(docker/backend): use BaseImage; add dependencies --- docker/backend/Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index ec87803de..91c7d301a 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,20 +1,18 @@ -FROM docker.io/fpco/stack-build:lts-18.0 +FROM devfra.azurecr.io/de.fraport.build/haskell:8.10.4 -# add public key for nvidia cuda repositories -RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC - -ENV LANG=en_US.UTF-8 +ENV LANG=de_DE.UTF-8 # compile-time dependencies +RUN apt-get -y update && apt-get install -y libpq-dev libsodium-dev # RUN apt-get -y update && apt-get -y install llvm # RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config # RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata -# RUN apt-get -y update && apt-get -y install locales locales-all +RUN apt-get -y update && apt-get install -y --no-install-recommends locales locales-all # run-time dependencies for uniworx binary -# RUN apt-get -y update && apt-get -y install fonts-roboto +RUN apt-get -y update && apt-get -y install fonts-roboto # RUN apt-get -y update && apt-get -y install pdftk -# RUN apt-get -y update && apt-get -y install texlive-base luatex +RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. From 6ddfbe959e83e4d9c8e298029ccf309e8dbeffad Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Dec 2024 14:22:22 +0100 Subject: [PATCH 017/355] ci(docker/backend): prepare Dockerfiles for separate image artifact push step --- docker/backend/Dockerfile | 16 +--------------- docker/haskell/Dockerfile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 docker/haskell/Dockerfile diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 91c7d301a..6d7ecacf0 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,18 +1,4 @@ -FROM devfra.azurecr.io/de.fraport.build/haskell:8.10.4 - -ENV LANG=de_DE.UTF-8 - -# compile-time dependencies -RUN apt-get -y update && apt-get install -y libpq-dev libsodium-dev -# RUN apt-get -y update && apt-get -y install llvm -# RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config -# RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata -RUN apt-get -y update && apt-get install -y --no-install-recommends locales locales-all - -# run-time dependencies for uniworx binary -RUN apt-get -y update && apt-get -y install fonts-roboto -# RUN apt-get -y update && apt-get -y install pdftk -RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english +FROM fradrive/backend:8.10.4 # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. diff --git a/docker/haskell/Dockerfile b/docker/haskell/Dockerfile new file mode 100644 index 000000000..301a262fa --- /dev/null +++ b/docker/haskell/Dockerfile @@ -0,0 +1,17 @@ +FROM devfra.azurecr.io/de.fraport.build/haskell:8.10.4 + +USER root + +# ENV LANG=de_DE.UTF-8 + +# compile-time dependencies +RUN apt-get -y update && apt-get install -y libpq-dev libsodium-dev +# RUN apt-get -y update && apt-get -y install llvm +# RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config +# RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata +RUN apt-get -y update && apt-get install -y --no-install-recommends locales locales-all + +# run-time dependencies for uniworx binary +RUN apt-get -y update && apt-get -y install fonts-roboto +# RUN apt-get -y update && apt-get -y install pdftk +RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english \ No newline at end of file From 82ed04008a7ba645c149ff39ba49853ae7b99fb1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Dec 2024 16:03:27 +0100 Subject: [PATCH 018/355] ci(docker/haskell): do not use root --- docker/haskell/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker/haskell/Dockerfile b/docker/haskell/Dockerfile index 301a262fa..30d12ef50 100644 --- a/docker/haskell/Dockerfile +++ b/docker/haskell/Dockerfile @@ -1,7 +1,5 @@ FROM devfra.azurecr.io/de.fraport.build/haskell:8.10.4 -USER root - # ENV LANG=de_DE.UTF-8 # compile-time dependencies From db9481cffb27763cfd1b652c46c6158c8e3d3ca4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 15:39:12 +0100 Subject: [PATCH 019/355] build(docker/backend): make FROM image and tag configurable by build-arg use docker.io haskell image per default as build-arg, and later use fraport-internal args for pipeline --- docker/backend/Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 6d7ecacf0..586cb701e 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,4 +1,20 @@ -FROM fradrive/backend:8.10.4 +ARG FROM_IMG=docker.io/library/haskell +ARG FROM_TAG=8.10.4 +FROM ${HASKELL_IMG}:${FROM_TAG} + +ENV LANG=de_DE.UTF-8 + +# compile-time dependencies +RUN apt-get -y update && apt-get install -y libpq-dev libsodium-dev +# RUN apt-get -y update && apt-get -y install llvm +# RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config +# RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata +RUN apt-get -y update && apt-get install -y --no-install-recommends locales locales-all + +# run-time dependencies for uniworx binary +RUN apt-get -y update && apt-get -y install fonts-roboto +# RUN apt-get -y update && apt-get -y install pdftk +RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. From 5bb77d8b2ba1826c7860006c9ab3f4666281f732 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 15:40:18 +0100 Subject: [PATCH 020/355] chore(docker): remove obsolote image definitions --- docker/haskell/Dockerfile | 15 --------------- docker/podman/Dockerfile | 33 --------------------------------- 2 files changed, 48 deletions(-) delete mode 100644 docker/haskell/Dockerfile delete mode 100644 docker/podman/Dockerfile diff --git a/docker/haskell/Dockerfile b/docker/haskell/Dockerfile deleted file mode 100644 index 30d12ef50..000000000 --- a/docker/haskell/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM devfra.azurecr.io/de.fraport.build/haskell:8.10.4 - -# ENV LANG=de_DE.UTF-8 - -# compile-time dependencies -RUN apt-get -y update && apt-get install -y libpq-dev libsodium-dev -# RUN apt-get -y update && apt-get -y install llvm -# RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config -# RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata -RUN apt-get -y update && apt-get install -y --no-install-recommends locales locales-all - -# run-time dependencies for uniworx binary -RUN apt-get -y update && apt-get -y install fonts-roboto -# RUN apt-get -y update && apt-get -y install pdftk -RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english \ No newline at end of file diff --git a/docker/podman/Dockerfile b/docker/podman/Dockerfile deleted file mode 100644 index e7a950419..000000000 --- a/docker/podman/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -# Debian-based podman daemon image for building docker images -# inside docker containers (e.g. gitlab runners). -# -# Yoinked with love from: -# https://www.redhat.com/sysadmin/podman-inside-container - -FROM debian:12.5 - -RUN apt-get -y update - -RUN apt-get -y install make podman podman-compose fuse-overlayfs - -RUN useradd podman; \ -echo podman:10000:5000 > /etc/subuid; \ -echo podman:10000:5000 > /etc/subgid; - -VOLUME /var/lib/containers -VOLUME /home/podman/.local/share/containers - -ADD https://raw.githubusercontent.com/containers/image_build/main/podman/containers.conf /etc/containers/containers.conf -ADD https://raw.githubusercontent.com/containers/image_build/main/podman/podman-containers.conf /home/podman/.config/containers/containers.conf - -RUN chown podman:podman -R /home/podman - -# chmod containers.conf and adjust storage.conf to enable Fuse storage. -# RUN chmod 644 /etc/containers/containers.conf; sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' /etc/containers/containers.conf -# RUN echo -e '[storage]\ndriver="zfs"\nmount_program="zfs"\nadditionalimage=/var/lib/shared\nmountopt="nodev,fsync=0"' >> /etc/containers/containers.conf -RUN chmod 644 /etc/containers/containers.conf -RUN echo '[storage]\ndriver="overlay"\n[storage.options.overlay]\nforce_mask="private"\nmount_program="/usr/bin/fuse-overlayfs"\nmountopt="nodev"' >> /etc/containers/containers.conf -RUN mkdir -p /root/.config/containers/ && echo '[storage]\ndriver="overlay"\n[storage.options.overlay]\nforce_mask="private"\nmount_program="/usr/bin/fuse-overlayfs"\nmountopt="nodev"' > /root/.config/containers/storage.conf -RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers /var/lib/shared/vfs-images /var/lib/shared/vfs-layers; touch /var/lib/shared/overlay-images/images.lock; touch /var/lib/shared/overlay-layers/layers.lock; touch /var/lib/shared/vfs-images/images.lock; touch /var/lib/shared/vfs-layers/layers.lock - -ENV _CONTAINERS_USERNS_CONFIGURED="" \ No newline at end of file From ef669aeb06cb00c25a7ae305d08ecc61d222171c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 15:42:48 +0100 Subject: [PATCH 021/355] ci(azure-pipelines): supply fraport-internal haskell image url as build-arg --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 574c669e1..b1220b5d0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -41,6 +41,7 @@ jobs: --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 PROJECT_DIR=/fradrive --build-arg MOUNT_DIR=/mnt/fradrive # - job: BuildKitTest From 4fbf0ba72db1a38d6e2007b407af43af9d954bad Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 15:50:30 +0100 Subject: [PATCH 022/355] build(docker/backend): fix typo --- docker/backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 586cb701e..447bd2891 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,6 +1,7 @@ ARG FROM_IMG=docker.io/library/haskell ARG FROM_TAG=8.10.4 -FROM ${HASKELL_IMG}:${FROM_TAG} + +FROM ${FROM_IMG}:${FROM_TAG} ENV LANG=de_DE.UTF-8 From 98880f67eee8d6b3e6aa99d6dd63d476b72aea47 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 16:07:19 +0100 Subject: [PATCH 023/355] ci(azure-pipelines): use correct local-repository path --- azure-pipelines.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b1220b5d0..542114d40 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,8 +42,7 @@ jobs: --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 PROJECT_DIR=/fradrive - --build-arg MOUNT_DIR=/mnt/fradrive + --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 6acaa3f796ffe54e019d54cee8f22ae37e1a687d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 16:19:58 +0100 Subject: [PATCH 024/355] ci(azure-pipelines): use Pipeline.Workspace instead of Build.Repository.LocalPath --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 542114d40..cb5bdb04b 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,7 +42,7 @@ jobs: --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 MOUNT_DIR=$(Pipeline.Workspace) # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 4669a47d9b2bd56c17d0f72d84701219f794cf09 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 16:28:41 +0100 Subject: [PATCH 025/355] build(docker/backend): copy complete directory to PROJECT_DIR --- docker/backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 447bd2891..241b33df1 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -22,8 +22,8 @@ RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-lu ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive -RUN mkdir -p "${PROJECT_DIR}" -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi +# RUN mkdir -p "${PROJECT_DIR}" +RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp "${MOUNT_DIR}" "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" ENV STACK_ROOT="${PROJECT_DIR}/.stack" From 0b9e55cfeaa147b78a01a72df282f67f6170760d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Dec 2024 16:59:26 +0100 Subject: [PATCH 026/355] ci(azure-pipelines): use /work/1 as mount-dir; copy repository recursively again --- azure-pipelines.yaml | 2 +- docker/backend/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index cb5bdb04b..0bdf92483 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,7 +42,7 @@ jobs: --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=$(Pipeline.Workspace) + --build-arg MOUNT_DIR=/work/1 # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 241b33df1..447bd2891 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -22,8 +22,8 @@ RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-lu ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive -# RUN mkdir -p "${PROJECT_DIR}" -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp "${MOUNT_DIR}" "${PROJECT_DIR}" ; fi +RUN mkdir -p "${PROJECT_DIR}" +RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" ENV STACK_ROOT="${PROJECT_DIR}/.stack" From 9aa1de6a4aac7c4031f79d5d477fad14138a40cf Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 9 Jan 2025 16:24:07 +0100 Subject: [PATCH 027/355] ci(azure-pipelines): change mount dir to work dir as reported from previous runs --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0bdf92483..7a3128161 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,7 +42,7 @@ jobs: --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=/work/1 + --build-arg MOUNT_DIR=/agent/_work/1/s/ # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 19cc34d21fad8df226c17ab192f5e45f8d2de18c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 9 Jan 2025 16:29:32 +0100 Subject: [PATCH 028/355] ci(azure-pipelines): tweak mount dir --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7a3128161..29c95209d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,7 +42,7 @@ jobs: --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=/agent/_work/1/s/ + --build-arg MOUNT_DIR=/agent/_work/1/s # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From d441ff40efef9ca6af773cb0f613966b1fe7879b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 14:06:32 +0000 Subject: [PATCH 029/355] Update azure-pipelines.yaml for Azure Pipelines --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 29c95209d..d54f804a7 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,7 +42,8 @@ jobs: --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=/agent/_work/1/s + --build-arg MOUNT_DIR=/mnt/fradrive + --mount $(Build.Repository.LocalPath):/mnt/fradrive # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 33f33b1f4458aa2c579455e822654ed662d7cbfc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 14:12:03 +0000 Subject: [PATCH 030/355] Update azure-pipelines.yaml for Azure Pipelines --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d54f804a7..547c118ce 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -43,7 +43,7 @@ jobs: --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=/mnt/fradrive - --mount $(Build.Repository.LocalPath):/mnt/fradrive + -v $(Build.Repository.LocalPath):/mnt/fradrive # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 9a25ae6d63e153833845b6354839ba5367d63a78 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 14:20:30 +0000 Subject: [PATCH 031/355] Update azure-pipelines.yaml for Azure Pipelines --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 547c118ce..764dc514a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,8 +42,8 @@ jobs: --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=/mnt/fradrive - -v $(Build.Repository.LocalPath):/mnt/fradrive + --build-arg MOUNT_DIR=$(pwd) + # -v $(Build.Repository.LocalPath):/mnt/fradrive # supported in podman build, but not in docker build # - job: BuildKitTest # container: # image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' From 55d9097ca8134ed35926e76b1217cdcbc31de9f4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 17:17:14 +0100 Subject: [PATCH 032/355] build(docker/backend): try mount param in RUN for dependency cache --- docker/backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 447bd2891..5e79a48ca 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -23,14 +23,14 @@ ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi +# RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" ENV STACK_ROOT="${PROJECT_DIR}/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -RUN make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} +RUN --mount=type=cache,target=/${MOUNT_DIR} make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} RUN stack install yesod-bin RUN stack install hpack From 1dce3ab2b11c594c549af0cb84500e83cb34ae0f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 17:50:20 +0100 Subject: [PATCH 033/355] build(docker/backend): use cache mounts for apt-installs --- docker/backend/Dockerfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 5e79a48ca..563e15917 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -6,16 +6,24 @@ FROM ${FROM_IMG}:${FROM_TAG} ENV LANG=de_DE.UTF-8 # compile-time dependencies -RUN apt-get -y update && apt-get install -y libpq-dev libsodium-dev +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +--mount=type=cache,target=/var/lib/apt,sharing=locked \ +apt-get -y update && apt-get install -y libpq-dev libsodium-dev # RUN apt-get -y update && apt-get -y install llvm # RUN apt-get -y update && apt-get -y install g++ libghc-zlib-dev libpq-dev libsodium-dev pkg-config # RUN apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata -RUN apt-get -y update && apt-get install -y --no-install-recommends locales locales-all +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +--mount=type=cache,target=/var/lib/apt,sharing=locked \ +apt-get -y update && apt-get install -y --no-install-recommends locales locales-all # run-time dependencies for uniworx binary -RUN apt-get -y update && apt-get -y install fonts-roboto +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +--mount=type=cache,target=/var/lib/apt,sharing=locked \ +apt-get -y update && apt-get -y install fonts-roboto # RUN apt-get -y update && apt-get -y install pdftk -RUN apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +--mount=type=cache,target=/var/lib/apt,sharing=locked \ +apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. From e8353f620096291e1c96cbac97a7b79ea3b6c61c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 18:20:03 +0100 Subject: [PATCH 034/355] build(docker/backend): add debug info --- docker/backend/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 563e15917..bb79c8cd4 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -3,6 +3,10 @@ ARG FROM_TAG=8.10.4 FROM ${FROM_IMG}:${FROM_TAG} +# TODO: debug information +RUN find / +RUN echo "PWD:" && pwd + ENV LANG=de_DE.UTF-8 # compile-time dependencies @@ -31,7 +35,7 @@ ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" -# RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi +RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" ENV STACK_ROOT="${PROJECT_DIR}/.stack" From 181b18460e8285991d3dc608bd51c3d63d586ebf Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 17:27:44 +0000 Subject: [PATCH 035/355] Update azure-pipelines.yaml for Azure Pipelines --- azure-pipelines.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 764dc514a..f0b33be3a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2024 Sarah Vaupel +# SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -42,7 +42,8 @@ jobs: --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=$(pwd) + --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) + --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) # -v $(Build.Repository.LocalPath):/mnt/fradrive # supported in podman build, but not in docker build # - job: BuildKitTest # container: From d455cb4f71c8475ec1cac6fc22f5c107e99c0839 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 18:35:39 +0100 Subject: [PATCH 036/355] build(docker/backend): add more debug info --- docker/backend/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index bb79c8cd4..fd0af0932 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -6,6 +6,9 @@ FROM ${FROM_IMG}:${FROM_TAG} # TODO: debug information RUN find / RUN echo "PWD:" && pwd +RUN ls -a /__w/1/s +RUN ls -a ${PROJECT_DIR} +RUN ls -a ${MOUNT_DIR} ENV LANG=de_DE.UTF-8 From 2149189394d99c09583a46445b9588e2884d4ef7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 18:43:14 +0100 Subject: [PATCH 037/355] ci(azure-pipelines): add bash debug output; checkout self --- azure-pipelines.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index f0b33be3a..884647804 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -21,6 +21,15 @@ jobs: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra steps: + - checkout: self + - task: Bash@3 + displayName: Debug shell output + inputs: + targetType: inline + script: | + pwd + ls -a . + ls -a $(Build.Repository.LocalPath) - task: Docker@2 name: dockerLoginDevFra displayName: Docker Login to devfra From 5787796eac8cf85f7b13e2fbfb0ffd66dd8aa23d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 18:49:19 +0100 Subject: [PATCH 038/355] build(docker/backend): try COPY instead of RUN cp --- docker/backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index fd0af0932..50c99f1bf 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -38,7 +38,8 @@ ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi +COPY ${MOUNT_DIR} ${PROJECT_DIR} +# RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" ENV STACK_ROOT="${PROJECT_DIR}/.stack" From 67108a8f84670dca0e5feff43130f2f887700e13 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 18:55:10 +0100 Subject: [PATCH 039/355] ci(azure-pipelines): use docker build in Bash@3 --- azure-pipelines.yaml | 8 ++++++++ docker/backend/Dockerfile | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 884647804..159de9dc5 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -30,6 +30,14 @@ jobs: pwd ls -a . ls -a $(Build.Repository.LocalPath) + docker build \ + --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 \ + docker/backend/Dockerfile - task: Docker@2 name: dockerLoginDevFra displayName: Docker Login to devfra diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 50c99f1bf..3a33d407c 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -38,7 +38,7 @@ ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" -COPY ${MOUNT_DIR} ${PROJECT_DIR} +COPY . ${PROJECT_DIR} # RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" From 09a44d13cce636f073f8751d1e5a965890815445 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 18:57:37 +0100 Subject: [PATCH 040/355] ci(azure-pipelines): use Dockerfile with --file --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 159de9dc5..946812b9f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -37,7 +37,7 @@ jobs: --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/haskell \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ - docker/backend/Dockerfile + --file docker/backend/Dockerfile - task: Docker@2 name: dockerLoginDevFra displayName: Docker Login to devfra From f140342e2d2c3534ebb019639b7646b90bd392f0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 19:00:50 +0100 Subject: [PATCH 041/355] ci(azure-pipelines): use Dockerfile in root dir --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 946812b9f..3eda3598e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -30,6 +30,7 @@ jobs: pwd ls -a . ls -a $(Build.Repository.LocalPath) + cp docker/backend/Dockerfile . docker build \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ --build-arg HTTP_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -37,7 +38,7 @@ jobs: --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/haskell \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ - --file docker/backend/Dockerfile + . - task: Docker@2 name: dockerLoginDevFra displayName: Docker Login to devfra From 6f5cc4da2032759175aceeb2446f7a811c2c18fd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 22:16:42 +0100 Subject: [PATCH 042/355] ci(azure-pipelines): perform docker-login before any docker calls --- azure-pipelines.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3eda3598e..877106efa 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -22,6 +22,12 @@ jobs: endpoint: devfra steps: - checkout: self + - task: Docker@2 + name: dockerLoginDevFra + displayName: Docker Login to devfra + inputs: + command: login + containerRegistry: devFra - task: Bash@3 displayName: Debug shell output inputs: @@ -39,12 +45,6 @@ jobs: --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ . - - task: Docker@2 - name: dockerLoginDevFra - displayName: Docker Login to devfra - inputs: - command: login - containerRegistry: devFra - task: Docker@2 name: dockerBuild displayName: Backend image build test From c3fee55090d887b50c241fe34d9fa9cab2b2a49b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 13 Jan 2025 22:25:51 +0100 Subject: [PATCH 043/355] build(docker/backend): remove debug prints --- docker/backend/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 3a33d407c..b35066dd7 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -6,9 +6,9 @@ FROM ${FROM_IMG}:${FROM_TAG} # TODO: debug information RUN find / RUN echo "PWD:" && pwd -RUN ls -a /__w/1/s -RUN ls -a ${PROJECT_DIR} -RUN ls -a ${MOUNT_DIR} +# RUN ls -a /__w/1/s +# RUN ls -a ${PROJECT_DIR} +# RUN ls -a ${MOUNT_DIR} ENV LANG=de_DE.UTF-8 From 3c3cabc909c5aff665fcd2e19513a2afb9530678 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 08:40:39 +0100 Subject: [PATCH 044/355] build(docker/backend): remove debug prints --- azure-pipelines.yaml | 5 +---- docker/backend/Dockerfile | 7 ------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 877106efa..4511b2469 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -33,9 +33,6 @@ jobs: inputs: targetType: inline script: | - pwd - ls -a . - ls -a $(Build.Repository.LocalPath) cp docker/backend/Dockerfile . docker build \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -61,7 +58,7 @@ jobs: --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=$(Build.Repository.LocalPath) + --build-arg PROJECT_DIR=/fradrive # -v $(Build.Repository.LocalPath):/mnt/fradrive # supported in podman build, but not in docker build # - job: BuildKitTest # container: diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index b35066dd7..45f957036 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -3,13 +3,6 @@ ARG FROM_TAG=8.10.4 FROM ${FROM_IMG}:${FROM_TAG} -# TODO: debug information -RUN find / -RUN echo "PWD:" && pwd -# RUN ls -a /__w/1/s -# RUN ls -a ${PROJECT_DIR} -# RUN ls -a ${MOUNT_DIR} - ENV LANG=de_DE.UTF-8 # compile-time dependencies From 6d0161c598a628815d757b9ec6a277fa7d625b2b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 08:41:25 +0100 Subject: [PATCH 045/355] build(docker/backend): do stack-install before dependency build --- docker/backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 45f957036..3a2f823f8 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -39,11 +39,12 @@ ENV STACK_ROOT="${PROJECT_DIR}/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -RUN --mount=type=cache,target=/${MOUNT_DIR} make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} RUN stack install yesod-bin RUN stack install hpack +RUN --mount=type=cache,target=${STACK_ROOT} make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} + ENV FRADRIVE_MAKE_TARGET=--start-backend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}" JOB="${JOB}" SRC="${SRC}" From 425804e4b63170320ba4854082db54314c457de0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 17:17:42 +0100 Subject: [PATCH 046/355] build(docker/backend): refine COPY sources --- docker/backend/Dockerfile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 3a2f823f8..cebc38edb 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -31,7 +31,6 @@ ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" -COPY . ${PROJECT_DIR} # RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" @@ -43,10 +42,28 @@ ENV HOME=${PROJECT_DIR} RUN stack install yesod-bin RUN stack install hpack +# copy source files +COPY app/ ${PROJECT_DIR}/app +COPY src/ ${PROJECT_DIR}/src +COPY models/ ${PROJECT_DIR}/models +COPY messages/ ${PROJECT_DIR}/messages +COPY templates/ ${PROJECT_DIR}/templates +COPY test/ ${PROJECT_DIR}/test +COPY testdata/ ${PROJECT_DIR}/testdata + +# copy frontend files +COPY assets/ ${PROJECT_DIR}/assets +COPY static/ ${PROJECT_DIR}/static +COPY well-known/ ${PROJECT_DIR}/well-known + +# copy cache +COPY .stack ${STACK_ROOT} +COPY .stack-work ${PROJECT_DIR}/.stack-work + RUN --mount=type=cache,target=${STACK_ROOT} make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} ENV FRADRIVE_MAKE_TARGET=--start-backend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}" JOB="${JOB}" SRC="${SRC}" EXPOSE 3000/tcp -EXPOSE 3443/tcp +EXPOSE 3443/tcp \ No newline at end of file From 4766dea3d59569cc8b590696e479002b3677fe66 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 17:27:01 +0100 Subject: [PATCH 047/355] ci(azure-pipelines): cleanup yaml --- azure-pipelines.yaml | 71 ++++++++++++-------------------------------- 1 file changed, 19 insertions(+), 52 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 4511b2469..00e76a5d9 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -5,18 +5,7 @@ pool: 'Prod Private Agent Pool' jobs: -# - job: HelloWorld -# container: -# image: 'devfra.azurecr.io/de.fraport.trusted/ubuntu:22.04' -# endpoint: devfra -# steps: -# - script: echo Hello, world! -# displayName: 'Run a one-line script' -# - script: | -# echo Add other tasks to build, test, and deploy your project. -# echo See https://aka.ms/yaml -# displayName: 'Run a multi-line script' -- job: DockerTaskTest +- job: BuildImages container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -42,43 +31,21 @@ jobs: --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 -# - job: BuildKitTest -# container: -# image: 'devfra.azurecr.io/de.fraport.trusted/buildkit:0.12.1' -# endpoint: devfra -# steps: -# - script: buildctl build \ -# --frontend=dockerfile.v0 \ -# --local context=. \ -# --local dockerfile=docker/backend/Dockerfile -# displayName: BuildKit test -# - job: CustomBuildahTest -# container: -# image: 'devfra.azurecr.io/de.fraport.trusted/ubuntu:22.04' -# endpoint: devfra -# steps: -# - script: | -# id -# docker build --help -# sudo apt-get -y update -# sudo apt-get -y install buildah -# buildah bud -t fradrive-backend-test --volume .:/mnt/fradrive --file docker/backend/Dockerfile -# displayName: Build buildah image \ No newline at end of file + # - 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 \ No newline at end of file From e729cccf238a920b110ca3c64f843f5be47c217b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 17:27:52 +0100 Subject: [PATCH 048/355] ci(azure-pipelines): do docker logout --- azure-pipelines.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 00e76a5d9..116f656a7 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,4 +48,10 @@ jobs: # --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 \ No newline at end of file + # # -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 \ No newline at end of file From c9999d9b06bc846d05afd0a227aaf3c8c9662d05 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 17:29:22 +0100 Subject: [PATCH 049/355] ci(azure-pipelines): rename backend task --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 116f656a7..06beee692 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -18,7 +18,7 @@ jobs: command: login containerRegistry: devFra - task: Bash@3 - displayName: Debug shell output + displayName: Build backend image inputs: targetType: inline script: | From fb518ac4efe51585e8018a7ab59c00d04d4bbac0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 14 Jan 2025 18:41:03 +0100 Subject: [PATCH 050/355] build(docker/frontend): prepare Dockerfile for pipeline usage --- docker/frontend/Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index b7404f6c5..874d49aeb 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -1,7 +1,12 @@ -FROM debian:12.5 +ARG FROM_IMG=docker.io/library/node +ARG FROM_TAG=20 + +FROM ${FROM_IMG}:${FROM_TAG} + +ENV LANG=de_DE.UTF-8 # Basic dependencies -RUN apt-get -y update && apt-get -y install curl npm +RUN apt-get -y update && apt-get -y install curl # Build and watch dependencies RUN apt-get -y update && apt-get -y install exiftool @@ -12,21 +17,22 @@ RUN apt-get -y update && apt-get -y install chromium ENV CHROME_BIN=chromium # TODO: use dotenv for npm version? -RUN npm install -g n -RUN n 20.17.0 +# RUN npm install -g n +# RUN n 20.17.0 # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi +# RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} #RUN make node_modules IN_CONTAINER=true #RUN make well-known IN_CONTAINER=true RUN make -- static +COPY . ${PROJECT_DIR} ENV FRADRIVE_MAKE_TARGET=start-frontend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} From 61bd28a21c867fed6c3738fe13a9b8fc9a68c447 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 13:22:53 +0100 Subject: [PATCH 051/355] ci(azure-pipelines): add frontend image build --- azure-pipelines.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 06beee692..74665cb30 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -17,6 +17,24 @@ jobs: inputs: command: login containerRegistry: devFra + - task: Docker@2 + name: dockerBuildFrontend + displayName: Docker build frontend image + inputs: + command: build + Dockerfile: docker/frontend/Dockerfile + buildContext: . + tags: | + $(Build.BuildNumber) + frontend + arguments: | + --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: @@ -24,10 +42,10 @@ jobs: 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 FROM_IMG=devfra.azurecr.io/de.fraport.build/haskell \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ . From d8425ac562e30eb704e6922d88f966ae60921b82 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 13:25:26 +0100 Subject: [PATCH 052/355] build(docker/backend): prebuild dependencies before COPY, temporarily COPY everything --- docker/backend/Dockerfile | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index cebc38edb..f3073bcf3 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -42,25 +42,23 @@ ENV HOME=${PROJECT_DIR} RUN stack install yesod-bin RUN stack install hpack +# pre-build dependencies +RUN make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} +COPY . ${PROJECT_DIR} + # copy source files -COPY app/ ${PROJECT_DIR}/app -COPY src/ ${PROJECT_DIR}/src -COPY models/ ${PROJECT_DIR}/models -COPY messages/ ${PROJECT_DIR}/messages -COPY templates/ ${PROJECT_DIR}/templates -COPY test/ ${PROJECT_DIR}/test -COPY testdata/ ${PROJECT_DIR}/testdata +#COPY app/ ${PROJECT_DIR}/app +#COPY src/ ${PROJECT_DIR}/src +#COPY models/ ${PROJECT_DIR}/models +#COPY messages/ ${PROJECT_DIR}/messages +#COPY templates/ ${PROJECT_DIR}/templates +#COPY test/ ${PROJECT_DIR}/test +#COPY testdata/ ${PROJECT_DIR}/testdata # copy frontend files -COPY assets/ ${PROJECT_DIR}/assets -COPY static/ ${PROJECT_DIR}/static -COPY well-known/ ${PROJECT_DIR}/well-known - -# copy cache -COPY .stack ${STACK_ROOT} -COPY .stack-work ${PROJECT_DIR}/.stack-work - -RUN --mount=type=cache,target=${STACK_ROOT} make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} +#COPY assets/ ${PROJECT_DIR}/assets +#COPY static/ ${PROJECT_DIR}/static +#COPY well-known/ ${PROJECT_DIR}/well-known ENV FRADRIVE_MAKE_TARGET=--start-backend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}" JOB="${JOB}" SRC="${SRC}" From 34567311d00ac9dc617f8b7168c670827ba5106e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 13:28:19 +0100 Subject: [PATCH 053/355] ci(azure-pipelines): fix docker task syntax --- azure-pipelines.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 74665cb30..7db5d25ae 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -28,13 +28,13 @@ jobs: $(Build.BuildNumber) frontend arguments: | - --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 \ + --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: From 1c25f068533edc3168d0b970b4ff8a9f632ccc8b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 13:36:47 +0100 Subject: [PATCH 054/355] ci(azure-pipelines): switch frontend image build to Bash@3 task --- azure-pipelines.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7db5d25ae..e463534c3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -17,9 +17,9 @@ jobs: inputs: command: login containerRegistry: devFra - - task: Docker@2 + - task: Bash@3 name: dockerBuildFrontend - displayName: Docker build frontend image + displayName: Build frontend image inputs: command: build Dockerfile: docker/frontend/Dockerfile @@ -28,13 +28,16 @@ jobs: $(Build.BuildNumber) frontend arguments: | - --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 + 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: From dac20928d45cbe96cfb900352828c9b5dcf0d3d4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 13:39:41 +0100 Subject: [PATCH 055/355] ci(azure-pipelines): fix Bash@3 frontend task --- azure-pipelines.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e463534c3..14981a064 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -18,16 +18,10 @@ jobs: 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: | + targetType: inline + script: | cp docker/backend/Dockerfile . docker build \ --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/npm \ From 318e9752f296c2f99628fb3630e399647b7e7b84 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 13:39:57 +0100 Subject: [PATCH 056/355] ci(azure-pipelines): add build tags --- azure-pipelines.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 14981a064..ff6ee4dd7 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,6 +31,8 @@ jobs: --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 \ + --tag $(Build.BuildNumber) \ + --tag frontend \ . - task: Bash@3 displayName: Build backend image @@ -45,6 +47,8 @@ jobs: --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 \ + --tag $(Build.BuildNumber) \ + --tag backend \ . # - task: Docker@2 # name: dockerBuild From e826856bea6f2cde84cc1b17b131a4d3cffb837b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 14:23:54 +0100 Subject: [PATCH 057/355] ci(azure-pipelines): use correct dockerfile for frontend build --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ff6ee4dd7..1ef3023c7 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -22,7 +22,7 @@ jobs: inputs: targetType: inline script: | - cp docker/backend/Dockerfile . + cp docker/frontend/Dockerfile . docker build \ --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/npm \ --build-arg FROM_TAG=node-20 \ From 66b64b818bd64de788f8678b605954ad51b3289a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 14:37:56 +0100 Subject: [PATCH 058/355] build(docker/frontend): switch order --- docker/frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 874d49aeb..1203d66b3 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -31,8 +31,8 @@ ENV HOME=${PROJECT_DIR} #RUN make node_modules IN_CONTAINER=true #RUN make well-known IN_CONTAINER=true -RUN make -- static COPY . ${PROJECT_DIR} +RUN make -- static ENV FRADRIVE_MAKE_TARGET=start-frontend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} From 3d86cd3225ea64f98e753034bba0257884f2b0ce Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 14:55:15 +0100 Subject: [PATCH 059/355] build(docker/frontend): configure npm proxy if supported --- docker/frontend/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 1203d66b3..da4026a36 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -20,6 +20,11 @@ ENV CHROME_BIN=chromium # RUN npm install -g n # RUN n 20.17.0 +# configure npm to use given proxy if given +RUN ${HTTP_PROXY} && npm config set proxy ${HTTP_PROXY} +RUN ${FRAPORT_NOPROXY} && npm config set noproxy "${FRAPORT_NOPROXY}" +ENV NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/ca-certificates.crt" + # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. ARG MOUNT_DIR=/mnt/fradrive From 18adf4dfc77ab0cfcec3be89653804f76d2a58aa Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 14:56:40 +0100 Subject: [PATCH 060/355] ci(azure-pipelines): switch to npm-v2 for proxy usage --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1ef3023c7..24448ff80 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,11 +24,12 @@ jobs: script: | cp docker/frontend/Dockerfile . docker build \ - --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/npm \ + --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/npm-v2 \ --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ --tag $(Build.BuildNumber) \ From 7228868f08d7a7cea3c4d152044d18a3b833cd4b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 15:10:46 +0100 Subject: [PATCH 061/355] ci(azure-pipelines): switch back to npm image for frontend builds with npm proxy --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 24448ff80..d4f8dea5e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,7 +24,7 @@ jobs: script: | cp docker/frontend/Dockerfile . docker build \ - --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.build/npm-v2 \ + --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 \ From 23dec225a97554705f9331874dfaa78734ac25f3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 15 Jan 2025 15:18:15 +0100 Subject: [PATCH 062/355] build(docker/frontend): fix conditional npm proxy conf --- docker/frontend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index da4026a36..df31c49e2 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -21,8 +21,8 @@ ENV CHROME_BIN=chromium # RUN n 20.17.0 # configure npm to use given proxy if given -RUN ${HTTP_PROXY} && npm config set proxy ${HTTP_PROXY} -RUN ${FRAPORT_NOPROXY} && npm config set noproxy "${FRAPORT_NOPROXY}" +RUN if [ ! -z "${HTTP_PROXY}" ]; then npm config set proxy ${HTTP_PROXY}; fi +RUN if [ ! -z "${FRAPORT_NOPROXY}" ]; then npm config set noproxy "${FRAPORT_NOPROXY}"; fi ENV NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/ca-certificates.crt" # locally these two should be identical, so that compilation results are written out into the file dir. From d2c8522ffee3332c390d52dc361c61165cffec86 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 10:48:11 +0100 Subject: [PATCH 063/355] ci(azure-pipelines): separate frontend and backend image build into separate jobs --- azure-pipelines.yaml | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d4f8dea5e..072eb9348 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -5,7 +5,7 @@ pool: 'Prod Private Agent Pool' jobs: -- job: BuildImages +- job: BuildFrontendImage container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -35,6 +35,25 @@ jobs: --tag $(Build.BuildNumber) \ --tag frontend \ . + - task: Docker@2 + name: dockerLogoutDevFra + displayName: Docker Logout from devfra + inputs: + command: logout + containerRegistry: devFra + +- job: BuildBackendImage + 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 displayName: Build backend image inputs: @@ -51,24 +70,6 @@ jobs: --tag $(Build.BuildNumber) \ --tag backend \ . - # - 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 From 88367a9219b0d342def394a997f53d1910f2ed12 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 11:27:59 +0100 Subject: [PATCH 064/355] chore(frontend): splice PROJECT_DIR into icon import sass --- .gitignore | 1 + Makefile | 8 +++++--- frontend/src/icons.scss | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0c90b8a6f..fdaf213a9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ uniworx.nix .kateproject src/Handler/Assist.bak src/Handler/Course.SnapCustom.hs +frontend/src/env.sass *.orig /instance .stack-work-* diff --git a/Makefile b/Makefile index e85fd602b..81da7bbfe 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ help: # HELP: stop all running containers and remove all compilation results in the directory (but leave images including dependencies unharmed) clean: rm -rf develop - -rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known config/manifest.json + -rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known config/manifest.json frontend/src/env.sass -rm -rf .stack-work .stack-work.lock -rm -rf bin .Dockerfile develop -$(CONTAINER_COMMAND) container prune --force @@ -293,7 +293,7 @@ uniworx.cabal: stack exec -- hpack --force # HELP(compile-frontend): compile frontend assets ---compile-frontend: node_modules assets esbuild.config.mjs +--compile-frontend: node_modules assets esbuild.config.mjs frontend/src/env.sass npm run build --start-frontend: --compile-frontend; --dependencies-frontend: node_modules assets static well-known; @@ -308,7 +308,9 @@ assets/icons: node_modules assets/icons-src/fontawesome.json ./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid assets/icons-src/fontawesome.json assets/icons/fradrive ./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular assets/icons-src/fontawesome.json assets/icons/fradrive -cp assets/icons-src/*.svg assets/icons/fradrive -static: node_modules assets esbuild.config.mjs +frontend/src/env.sass: + echo "\$$path: '$${PROJECT_DIR}'" > frontend/src/env.sass +static: node_modules assets esbuild.config.mjs frontend/src/env.sass npm run build well-known: static; diff --git a/frontend/src/icons.scss b/frontend/src/icons.scss index 2b65e5e88..0392849aa 100644 --- a/frontend/src/icons.scss +++ b/frontend/src/icons.scss @@ -1,8 +1,9 @@ -// SPDX-FileCopyrightText: 2024 David Mosbach , Sarah Vaupel +// SPDX-FileCopyrightText: 2024-2025 David Mosbach , Sarah Vaupel // // SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design +@import 'env'; $ico-width: 30px; @@ -102,7 +103,7 @@ $icons: new, @each $name in $icons { .ico-#{$name} { - background-image: url('/mnt/fradrive/assets/icons/fradrive/#{$name}.svg'); + background-image: url('#{$path}/assets/icons/fradrive/#{$name}.svg'); background-size: contain; background-repeat: no-repeat; background-position: center; From 15f6dd92116fcfe307e6a37e1c12fad089882b84 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 11:59:07 +0100 Subject: [PATCH 065/355] build(docker/backend): copy stack yamls before stack-install --- docker/backend/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index f3073bcf3..2b89763f6 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -39,6 +39,9 @@ ENV STACK_ROOT="${PROJECT_DIR}/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} +COPY stack.yaml ${PROJECT_DIR}/stack.yaml +COPY stack.yaml.lock ${PROJECT_DIR}/stack.yaml.lock +COPY package.yaml ${PROJECT_DIR}/package.yaml RUN stack install yesod-bin RUN stack install hpack From cd15ddea2f3e3315d0956914836a6ef2ef0d16fc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 12:01:07 +0100 Subject: [PATCH 066/355] ci(azure-pipelines): add frontend build job --- azure-pipelines.yaml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 072eb9348..18bf8c2e8 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -75,4 +75,26 @@ jobs: displayName: Docker Logout from devfra inputs: command: logout - containerRegistry: devFra \ No newline at end of file + containerRegistry: devFra + +- job: CompileFrontend + container: + image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + endpoint: devfra + steps: + - checkout: self + - task: Bash@3 + name: compileFrontend + displayName: Compile frontend + inputs: + targetType: inline + script: | + make compile-frontend + - task: Bash@3 + name: testFrontend + displayName: Test frontend + inputs: + targetType: inline + script: | + make lint-frontend + make test-frontend \ No newline at end of file From a9e6496db25566df0b9f06862588f8e0cabb74e7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 13:42:42 +0100 Subject: [PATCH 067/355] ci(azure-pipelines): list docker images for frontend image build (prepare push) --- azure-pipelines.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 18bf8c2e8..d8fddd096 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -35,6 +35,12 @@ jobs: --tag $(Build.BuildNumber) \ --tag frontend \ . + - task: Bash@3 + displayName: Push frontend image + inputs: + targetType: inline + script: | + docker images - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From 866cc3d95da57c11b0c784c878b8b2c2e4f59f29 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 13:53:50 +0100 Subject: [PATCH 068/355] ci(azure-pipelines): fix frontend image tags --- azure-pipelines.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d8fddd096..150e594a3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -73,8 +73,7 @@ jobs: --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 \ - --tag $(Build.BuildNumber) \ - --tag backend \ + --tag backend:$(Build.BuildNumber) \ . - task: Docker@2 name: dockerLogoutDevFra From d0f5abf854bcce4990b0aa8d7c224d2158334dff Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 13:54:45 +0100 Subject: [PATCH 069/355] ci(azure-pipelines): fix backend image tags --- azure-pipelines.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 150e594a3..232c0af3a 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -32,8 +32,7 @@ jobs: --build-arg FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ - --tag $(Build.BuildNumber) \ - --tag frontend \ + --tag frontend:$(Build.BuildNumber) \ . - task: Bash@3 displayName: Push frontend image From af69c8d4a705047e97423525bf9c089a44cfa461 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 13:56:29 +0100 Subject: [PATCH 070/355] ci(azure-pipelines): push frontend image --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 232c0af3a..8a2586120 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -39,7 +39,7 @@ jobs: inputs: targetType: inline script: | - docker images + docker push frontend:$(Build.BuildNumber) - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From ead1bcfeaad7a1af9ab2169216add17176a82eb9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 13:58:25 +0100 Subject: [PATCH 071/355] ci(azure-pipelines): exec CompileFrontend only after frontend image build succeeded --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8a2586120..eaf0c44b8 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -82,6 +82,8 @@ jobs: containerRegistry: devFra - job: CompileFrontend + dependsOn: BuildFrontendImage + condition: succeeded() container: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) endpoint: devfra From 7f7f3c4e9ef76f14b9748d7f215deb1156d7b70e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 14:06:50 +0100 Subject: [PATCH 072/355] ci(azure-pipelines): fix frontend image tags --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index eaf0c44b8..19b39f755 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -32,14 +32,14 @@ jobs: --build-arg FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ - --tag frontend:$(Build.BuildNumber) \ + --tag devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) \ . - task: Bash@3 displayName: Push frontend image inputs: targetType: inline script: | - docker push frontend:$(Build.BuildNumber) + docker push devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From 7250392d5ef3595caf12ebeb8442b3f14af62cf3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 14:23:07 +0100 Subject: [PATCH 073/355] ci(azure-pipelines): first try at publishing frontend build artifacts --- azure-pipelines.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 19b39f755..3ce82cbfe 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -40,6 +40,23 @@ jobs: targetType: inline script: | docker push devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + - task: CopyFiles@2 + name: CopyFrontendArtifacts + displayName: Prepare frontend artifacts + inputs: + Contents: | + static/ + well-known/ + frontend/src/env.sass + config/manifest.json + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + name: PublishFrontendArtifacts + displayName: Publish frontend artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'frontend' + publishLocation: 'Container' - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From fac186f5c704b2c4a6e5c8d720efca22e82c21a0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 14:23:52 +0100 Subject: [PATCH 074/355] ci(azure-pipelines): move frontend artifact push to compile job --- azure-pipelines.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3ce82cbfe..a5ee34478 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -40,23 +40,6 @@ jobs: targetType: inline script: | docker push devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) - - task: CopyFiles@2 - name: CopyFrontendArtifacts - displayName: Prepare frontend artifacts - inputs: - Contents: | - static/ - well-known/ - frontend/src/env.sass - config/manifest.json - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: PublishBuildArtifacts@1 - name: PublishFrontendArtifacts - displayName: Publish frontend artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'frontend' - publishLocation: 'Container' - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra @@ -120,4 +103,21 @@ jobs: targetType: inline script: | make lint-frontend - make test-frontend \ No newline at end of file + make test-frontend + - task: CopyFiles@2 + name: CopyFrontendArtifacts + displayName: Prepare frontend artifacts + inputs: + Contents: | + static/ + well-known/ + frontend/src/env.sass + config/manifest.json + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + name: PublishFrontendArtifacts + displayName: Publish frontend artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'frontend' + publishLocation: 'Container' \ No newline at end of file From 9d85d67ce884e99d07b7b652bff58a952287b778 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 14:39:51 +0100 Subject: [PATCH 075/355] ci(azure-pipelines): use uncontainerized make-targets in CompileFrontend job --- azure-pipelines.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a5ee34478..4902425c4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -95,15 +95,15 @@ jobs: inputs: targetType: inline script: | - make compile-frontend + make -- --compile-frontend IN_CONTAINER=true - task: Bash@3 name: testFrontend displayName: Test frontend inputs: targetType: inline script: | - make lint-frontend - make test-frontend + make -- --lint-frontend IN_CONTAINER=true + make -- --test-frontend IN_CONTAINER=true - task: CopyFiles@2 name: CopyFrontendArtifacts displayName: Prepare frontend artifacts From f212d831d141c10672022d3984c46aa77312fb26 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 16 Jan 2025 14:56:55 +0100 Subject: [PATCH 076/355] build(docker/frontend): remove make-entrypoint for more control over exec targets in pipeline --- docker/frontend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index df31c49e2..6491bb14a 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -39,5 +39,5 @@ ENV HOME=${PROJECT_DIR} COPY . ${PROJECT_DIR} RUN make -- static -ENV FRADRIVE_MAKE_TARGET=start-frontend -ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} +# ENV FRADRIVE_MAKE_TARGET=start-frontend +# ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} From f4c83b3e962ccef0fde9f7eef1029614c599c211 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 15:14:23 +0100 Subject: [PATCH 077/355] ci(azure-pipelines): add npm tasks --- azure-pipelines.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 4902425c4..550fb32a8 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -85,10 +85,31 @@ jobs: dependsOn: BuildFrontendImage condition: succeeded() container: - image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + image: devfra.azurecr.io/de.fraport.build/npm:node-20 endpoint: devfra steps: - checkout: self + - task: Npm@1 + name: frontendInstall + displayName: Install node_modules + inputs: + command: 'install' + workingDir: '$(Build.Repository.LocalPath)' + verbose: true + - task: Npm@1 + name: frontendBuild + displayName: Build frontend resources + inputs: + command: 'custom' + customCommand: 'build' + workingDir: '$(Build.Repository.LocalPath)' + - task: Bash@3 + name: debugPrints + inputs: + targetType: inline + script: | + ls -a . + ls -a $(Build.Repository.LocalPath) - task: Bash@3 name: compileFrontend displayName: Compile frontend From e755b7a2b0115b4b2fd5f06ddb5b154ac69cb10a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 15:24:11 +0100 Subject: [PATCH 078/355] ci(azure-pipelines): use DS2 pool for backend image build --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 550fb32a8..0c6091699 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,6 +48,7 @@ jobs: containerRegistry: devFra - job: BuildBackendImage + pool: 'Prod Private Agent Pool DS2' container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra From 1bd98525fa27c107cf801d5f193c9c13a92ffe35 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 15:33:06 +0100 Subject: [PATCH 079/355] ci(azure-pipelines): temporarily remove job dependencies --- azure-pipelines.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0c6091699..1bedaa8dc 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -83,8 +83,6 @@ jobs: containerRegistry: devFra - job: CompileFrontend - dependsOn: BuildFrontendImage - condition: succeeded() container: image: devfra.azurecr.io/de.fraport.build/npm:node-20 endpoint: devfra From 42b1a8fcfe031d29e1e4b77ad5252e65bb5f1360 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 15:41:33 +0100 Subject: [PATCH 080/355] ci(azure-pipelines): switch back to DS1 until build for authorisation succeeds --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1bedaa8dc..78b0e7233 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,7 +48,7 @@ jobs: containerRegistry: devFra - job: BuildBackendImage - pool: 'Prod Private Agent Pool DS2' + pool: 'Prod Private Agent Pool' container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra From 64a8c0dee016f2cf615d66811196a3c1b1a48233 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:43:13 +0100 Subject: [PATCH 081/355] ci(azure-pipelines): remove npm tasks for frontend compile --- azure-pipelines.yaml | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 78b0e7233..6bfbc2ac4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -83,32 +83,13 @@ jobs: containerRegistry: devFra - job: CompileFrontend + dependsOn: BuildFrontendImage + condition: succeeded() container: - image: devfra.azurecr.io/de.fraport.build/npm:node-20 + image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) endpoint: devfra steps: - checkout: self - - task: Npm@1 - name: frontendInstall - displayName: Install node_modules - inputs: - command: 'install' - workingDir: '$(Build.Repository.LocalPath)' - verbose: true - - task: Npm@1 - name: frontendBuild - displayName: Build frontend resources - inputs: - command: 'custom' - customCommand: 'build' - workingDir: '$(Build.Repository.LocalPath)' - - task: Bash@3 - name: debugPrints - inputs: - targetType: inline - script: | - ls -a . - ls -a $(Build.Repository.LocalPath) - task: Bash@3 name: compileFrontend displayName: Compile frontend From 77c856b8427956dd74e1720d1a4a9bc6588d38b6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:47:11 +0100 Subject: [PATCH 082/355] ci(azure-pipelines): rename jobs/tasks --- azure-pipelines.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 6bfbc2ac4..e888d7bb9 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -5,7 +5,7 @@ pool: 'Prod Private Agent Pool' jobs: -- job: BuildFrontendImage +- job: FrontendImage container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -47,7 +47,7 @@ jobs: command: logout containerRegistry: devFra -- job: BuildBackendImage +- job: BackendImage pool: 'Prod Private Agent Pool' container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 @@ -82,8 +82,8 @@ jobs: command: logout containerRegistry: devFra -- job: CompileFrontend - dependsOn: BuildFrontendImage +- job: FrontendBuild + dependsOn: FrontendImage condition: succeeded() container: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) @@ -91,14 +91,14 @@ jobs: steps: - checkout: self - task: Bash@3 - name: compileFrontend + name: frontendCompile displayName: Compile frontend inputs: targetType: inline script: | make -- --compile-frontend IN_CONTAINER=true - task: Bash@3 - name: testFrontend + name: frontendTest displayName: Test frontend inputs: targetType: inline @@ -106,7 +106,7 @@ jobs: make -- --lint-frontend IN_CONTAINER=true make -- --test-frontend IN_CONTAINER=true - task: CopyFiles@2 - name: CopyFrontendArtifacts + name: frontendCopyArtifacts displayName: Prepare frontend artifacts inputs: Contents: | @@ -116,7 +116,7 @@ jobs: config/manifest.json TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishBuildArtifacts@1 - name: PublishFrontendArtifacts + name: frontendPublishArtifacts displayName: Publish frontend artifacts inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' From adf53f07bc72925516edaa3122d2142184170184 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:47:59 +0100 Subject: [PATCH 083/355] ci(azure-pipelines): replace backend image build with dummy script to stop unnecessary load --- azure-pipelines.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e888d7bb9..649611b27 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -65,16 +65,7 @@ jobs: 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 \ - --tag backend:$(Build.BuildNumber) \ - . + echo "DUMMY BACKEND BUILD" - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From ba8d39a7c58d0228c9cb9c4d214809f3ab888cba Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:48:36 +0100 Subject: [PATCH 084/355] build(docker/frontend): remove debris --- docker/frontend/Dockerfile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 6491bb14a..7dd01d3d1 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -5,22 +5,15 @@ FROM ${FROM_IMG}:${FROM_TAG} ENV LANG=de_DE.UTF-8 -# Basic dependencies -RUN apt-get -y update && apt-get -y install curl - -# Build and watch dependencies +# build and watch dependencies RUN apt-get -y update && apt-get -y install exiftool RUN apt-get -y update && apt-get -y install imagemagick -# Test dependencies +# test dependencies RUN apt-get -y update && apt-get -y install chromium ENV CHROME_BIN=chromium -# TODO: use dotenv for npm version? -# RUN npm install -g n -# RUN n 20.17.0 - -# configure npm to use given proxy if given +# configure npm to use given proxy if specified RUN if [ ! -z "${HTTP_PROXY}" ]; then npm config set proxy ${HTTP_PROXY}; fi RUN if [ ! -z "${FRAPORT_NOPROXY}" ]; then npm config set noproxy "${FRAPORT_NOPROXY}"; fi ENV NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/ca-certificates.crt" From a80088fe66009b1a5a9b9fa6303deeaf20d21b7c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:48:56 +0100 Subject: [PATCH 085/355] build(docker/frontend): reintroduce cp with bind mount configured --- docker/frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 7dd01d3d1..2a3ca4d14 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -23,7 +23,7 @@ ENV NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/ca-certificates.crt" ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} -# RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi +RUN --mount=type=bind,source=.,target=${MOUNT_DIR},rw if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} From 714709894af809d798e277f2a88e2fa176865f4a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:49:41 +0100 Subject: [PATCH 086/355] build(docker/frontend): only preinstall dependencies instead of static --- docker/frontend/Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 2a3ca4d14..c3cfeaf67 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -27,10 +27,7 @@ RUN --mount=type=bind,source=.,target=${MOUNT_DIR},rw if [ "${PROJECT_DIR}" != " WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -#RUN make node_modules IN_CONTAINER=true -#RUN make well-known IN_CONTAINER=true -COPY . ${PROJECT_DIR} -RUN make -- static +RUN make -- --dependencies-frontend IN_CONTAINER=true -# ENV FRADRIVE_MAKE_TARGET=start-frontend -# ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} +ENV FRADRIVE_MAKE_TARGET=compile-frontend +ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} \ No newline at end of file From 2e45db2efa76b9b0e0830110093ea116e22b8bc4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:50:06 +0100 Subject: [PATCH 087/355] build(Makefile): mount project dir rw --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 81da7bbfe..15eaed52f 100644 --- a/Makefile +++ b/Makefile @@ -217,7 +217,7 @@ ifeq "$(CONTAINER_CMD)" "localhost/fradrive/$(SERVICE)" fi; \ if [ "$(IN_CONTAINER)" == "false" ] ; then \ $(CONTAINER_COMMAND) build $(NO_CACHE) \ - -v $(PWD):$${MOUNT_DIR} \ + -v $(PWD):$${MOUNT_DIR}:rw \ --build-arg MOUNT_DIR=$(MOUNT_DIR) \ --build-arg PROJECT_DIR=$${PROJECT_DIR} \ --env IN_CONTAINER=true \ From a9fd7474697a7c336e9b8ebf03187af8182ac260 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 17:50:32 +0100 Subject: [PATCH 088/355] build(Makefile): avoid unnecessary double-static build for dependencies --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 15eaed52f..3d3079298 100644 --- a/Makefile +++ b/Makefile @@ -296,7 +296,7 @@ uniworx.cabal: --compile-frontend: node_modules assets esbuild.config.mjs frontend/src/env.sass npm run build --start-frontend: --compile-frontend; ---dependencies-frontend: node_modules assets static well-known; +--dependencies-frontend: node_modules assets; node_modules: package.json package-lock.json npm install --cache .npm --prefer-offline package-lock.json: package.json From 999724dc85b2de30d933a37e9666f445aa1fcc9d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 17 Jan 2025 18:05:07 +0100 Subject: [PATCH 089/355] ci(azure-pipelines): set make target via env for testing --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 649611b27..80169ee6e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -79,6 +79,8 @@ jobs: container: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) endpoint: devfra + env: + FRADRIVE_MAKE_TARGET: --compile-frontend steps: - checkout: self - task: Bash@3 From d02024138f5df552f9499770db6b2fdcbe270159 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 02:30:12 +0100 Subject: [PATCH 090/355] ci(azure-pipelines): add PROJECT_DIR to make-call for frontend compile --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 80169ee6e..1fe547299 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -89,7 +89,7 @@ jobs: inputs: targetType: inline script: | - make -- --compile-frontend IN_CONTAINER=true + make -- --compile-frontend IN_CONTAINER=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest displayName: Test frontend From 1406ea9c133cc0c2be24ec68f429eac970a63cad Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 02:44:51 +0100 Subject: [PATCH 091/355] ci(azure-pipelines): add build-arg for custom npm registry --- azure-pipelines.yaml | 1 + docker/frontend/Dockerfile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1fe547299..943c9bd86 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -30,6 +30,7 @@ jobs: --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ + --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ --tag devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) \ diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index c3cfeaf67..c1107561d 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -27,6 +27,10 @@ RUN --mount=type=bind,source=.,target=${MOUNT_DIR},rw if [ "${PROJECT_DIR}" != " WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} +RUN if [ ! -z "${NPM_CUSTOM_REGISTRY}" ]; then \ +printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc \ +; fi + RUN make -- --dependencies-frontend IN_CONTAINER=true ENV FRADRIVE_MAKE_TARGET=compile-frontend From 101890ac2a893397e36a563228887f8331cf5ef7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 02:50:47 +0100 Subject: [PATCH 092/355] build(docker/frontend): add locale env vars to stop perl from complaining --- docker/frontend/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index c1107561d..1a4b1cd5f 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -4,6 +4,8 @@ ARG FROM_TAG=20 FROM ${FROM_IMG}:${FROM_TAG} ENV LANG=de_DE.UTF-8 +ENV LANGUAGE=de_DE.UTF-8 +ENV LC_ALL=de_DE.UTF-8 # build and watch dependencies RUN apt-get -y update && apt-get -y install exiftool From aa44d6fe9cb03383984f53e8e369b9386731d6c4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 02:59:17 +0100 Subject: [PATCH 093/355] ci(azure-pipelines): add env vars to frontend container --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 943c9bd86..1f818600e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -82,6 +82,8 @@ jobs: endpoint: devfra env: FRADRIVE_MAKE_TARGET: --compile-frontend + PROJECT_DIR: /fradrive + IN_CONTAINER: true steps: - checkout: self - task: Bash@3 From 9f490d16c3f6c55206edc3fed34eabef82cadbd3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 03:11:12 +0100 Subject: [PATCH 094/355] ci(azure-pipelines): provide frontend image with non-terminating entrypoint on compile --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1f818600e..2fe6df7c4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -80,6 +80,7 @@ jobs: container: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) endpoint: devfra + options: --entrypoint yes env: FRADRIVE_MAKE_TARGET: --compile-frontend PROJECT_DIR: /fradrive From 82655fd4dbaa8d43da1c3b5ca57ebff492a08922 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 03:27:53 +0100 Subject: [PATCH 095/355] build(docker/frontend): fix default make-target --- docker/frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 1a4b1cd5f..f072e3d74 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -35,5 +35,5 @@ printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/regi RUN make -- --dependencies-frontend IN_CONTAINER=true -ENV FRADRIVE_MAKE_TARGET=compile-frontend +ENV FRADRIVE_MAKE_TARGET=--compile-frontend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} \ No newline at end of file From 178bce90c957b2ea1086122f0a6e908d048773c2 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 03:33:26 +0100 Subject: [PATCH 096/355] build(docker/frontend): temporarily remove chromium install --- docker/frontend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index f072e3d74..29e048437 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -12,8 +12,8 @@ RUN apt-get -y update && apt-get -y install exiftool RUN apt-get -y update && apt-get -y install imagemagick # test dependencies -RUN apt-get -y update && apt-get -y install chromium -ENV CHROME_BIN=chromium +# RUN apt-get -y update && apt-get -y install chromium +# ENV CHROME_BIN=chromium # configure npm to use given proxy if specified RUN if [ ! -z "${HTTP_PROXY}" ]; then npm config set proxy ${HTTP_PROXY}; fi From 0ae8eddc5bc728f68d552f7372698badd9115b13 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 03:38:31 +0100 Subject: [PATCH 097/355] ci(azure-pipelines): use basic step script for frontend-compile --- azure-pipelines.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2fe6df7c4..45b7be176 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -87,13 +87,8 @@ jobs: IN_CONTAINER: true steps: - checkout: self - - task: Bash@3 - name: frontendCompile - displayName: Compile frontend - inputs: - targetType: inline - script: | - make -- --compile-frontend IN_CONTAINER=true PROJECT_DIR=${PROJECT_DIR} + - name: frontendCompile + script: make -- --compile-frontend IN_CONTAINER=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest displayName: Test frontend From ecd0a443b45505635c1f6e8625900be7ace48f0b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 03:39:03 +0100 Subject: [PATCH 098/355] build(docker/backend): envify PROJECT_DIR for runtime access --- docker/frontend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 29e048437..781cfec2a 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -23,7 +23,7 @@ ENV NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/ca-certificates.crt" # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. ARG MOUNT_DIR=/mnt/fradrive -ARG PROJECT_DIR=/fradrive +ENV PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} RUN --mount=type=bind,source=.,target=${MOUNT_DIR},rw if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi WORKDIR ${PROJECT_DIR} @@ -36,4 +36,4 @@ printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/regi RUN make -- --dependencies-frontend IN_CONTAINER=true ENV FRADRIVE_MAKE_TARGET=--compile-frontend -ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} \ No newline at end of file +ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file From 9bd7459849e1ed30b5a4bd60b65339f62a87e06e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 03:40:56 +0100 Subject: [PATCH 099/355] ci(azure-pipelines): fix step def --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 45b7be176..56d3c3a02 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -87,8 +87,8 @@ jobs: IN_CONTAINER: true steps: - checkout: self - - name: frontendCompile - script: make -- --compile-frontend IN_CONTAINER=true PROJECT_DIR=${PROJECT_DIR} + - script: make -- --compile-frontend IN_CONTAINER=true PROJECT_DIR=${PROJECT_DIR} + name: frontendCompile - task: Bash@3 name: frontendTest displayName: Test frontend From 0de102805a739f965572253df209c963e90b77f3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 18 Jan 2025 04:02:00 +0100 Subject: [PATCH 100/355] ci(azure-pipelines): remove entrypoint def --- azure-pipelines.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 56d3c3a02..3cef9df9c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -80,7 +80,6 @@ jobs: container: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) endpoint: devfra - options: --entrypoint yes env: FRADRIVE_MAKE_TARGET: --compile-frontend PROJECT_DIR: /fradrive From 18585db1aa6df7c5d6d869a8337998e2123017ff Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 12:13:26 +0100 Subject: [PATCH 101/355] build(docker/frontend): fix npm registry parametrization --- docker/frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 781cfec2a..1bbd830a3 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -30,7 +30,7 @@ WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} RUN if [ ! -z "${NPM_CUSTOM_REGISTRY}" ]; then \ -printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc \ +printf 'registry=${NPM_CUSTOM_REGISTRY}' > .npmrc \ ; fi RUN make -- --dependencies-frontend IN_CONTAINER=true From 91273e57eba49a09e3c44a94ca66123103f12758 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 13:03:49 +0100 Subject: [PATCH 102/355] ci(azure-pipelines): parametrize image builds --- azure-pipelines.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3cef9df9c..bae95fe6c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -4,6 +4,10 @@ pool: 'Prod Private Agent Pool' +variables: + FRADRIVE_IMAGE_UPSTREAM: devfra.azurecr.io/de.fraport.fradrive.build + IMAGE_LATEST_RETAG_BRANCH: 'refs/head/master' + jobs: - job: FrontendImage container: @@ -33,7 +37,8 @@ jobs: --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ \ --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ - --tag devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) \ + --build-arg IN_CI=true \ + --tag ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:$(Build.BuildNumber) \ . - task: Bash@3 displayName: Push frontend image From 2e526e0cb3f089b198161aaa30241ce9b5839061 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 13:04:12 +0100 Subject: [PATCH 103/355] ci(azure-pipelines): update frontend:latest on master --- azure-pipelines.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index bae95fe6c..3c5af3bdf 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -45,7 +45,14 @@ jobs: inputs: targetType: inline script: | - docker push devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + docker push ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:$(Build.BuildNumber) + - task: Bash@3 + displayName: Update latest frontend image + condition: eq(variables['Build.SourceBranch'], ${{IMAGE_LATEST_RETAG_BRANCH}}) + inputs: + targetType: inline + script: | + docker push ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:$(Build.BuildNumber) ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:latest - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From 10a9d8c51da76d1310bb81074e254b68c8090673 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 13:06:00 +0100 Subject: [PATCH 104/355] build(Makefile): rename CONTAINER_CMD -> IMAGE; remove unnecessary make calls in Dockerfile --- Makefile | 33 ++++++++++++++++----------------- docker/frontend/Dockerfile | 6 +++--- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 3d3079298..6f324b930 100644 --- a/Makefile +++ b/Makefile @@ -30,8 +30,8 @@ export CONTAINER_CLEANUP export SERVICE export SERVICE_VARIANT ?= $(SERVICE) export JOB -export CONTAINER_CMD -export SET_CONTAINER_CMD +export IMAGE +export SET_IMAGE export ENTRYPOINT export EXEC_OPTS @@ -103,24 +103,24 @@ start: .PHONY: %-backend %-backend: SERVICE=backend %-backend: SERVICE_VARIANT=backend -%-backend: CONTAINER_CMD=localhost/fradrive/backend +%-backend: IMAGE=localhost/fradrive/backend %-backend: BASE_PORTS = "DEV_PORT_HTTP=3000" "DEV_PORT_HTTPS=3443" .PHONY: %-uniworxdb %-uniworxdb: SERVICE=backend %-uniworxdb: SERVICE_VARIANT=uniworxdb -%-uniworxdb: CONTAINER_CMD=localhost/fradrive/backend +%-uniworxdb: IMAGE=localhost/fradrive/backend .PHONY: %-ghci %-ghci: SERVICE=backend %-ghci: SERVICE_VARIANT=ghci -%-ghci: CONTAINER_CMD=localhost/fradrive/backend +%-ghci: IMAGE=localhost/fradrive/backend .PHONY: %-hoogle %-hoogle: SERVICE=backend %-hoogle: SERVICE_VARIANT=hoogle %-hoogle: BASE_PORTS = "HOOGLE_PORT=8081" -%-hoogle: CONTAINER_CMD=localhost/fradrive/backend +%-hoogle: IMAGE=localhost/fradrive/backend --start-hoogle: HOOGLE_PORT=`cat $(CONTAINER_FILE) | grep 'HOOGLE_PORT=' | sed 's/HOOGLE_PORT=//'` ; \ stack $(STACK_CORES) hoogle -- server --local --port $${HOOGLE_PORT} @@ -128,24 +128,24 @@ start: .PHONY: %-frontend %-frontend: SERVICE=frontend %-frontend: SERVICE_VARIANT=frontend -%-frontend: CONTAINER_CMD=localhost/fradrive/frontend +%-frontend: IMAGE=localhost/fradrive/frontend .PHONY: %-postgres %-postgres: SERVICE=postgres %-postgres: SERVICE_VARIANT=postgres %-postgres: BASE_PORTS = "PGPORT=5432" -%-postgres: CONTAINER_CMD=localhost/fradrive/postgres +%-postgres: IMAGE=localhost/fradrive/postgres .PHONY: %-memcached %-memcached: SERVICE=memcached %-memcached: SERVICE_VARIANT=memcached -%-memcached: SET_CONTAINER_CMD=$$(MEMCACHED_IMAGE) --port=`cat $$(CONTAINER_FILE) | grep 'MEMCACHED_PORT=' | sed 's/MEMCACHED_PORT=//'` +%-memcached: SET_IMAGE=$$(MEMCACHED_IMAGE) --port=`cat $$(CONTAINER_FILE) | grep 'MEMCACHED_PORT=' | sed 's/MEMCACHED_PORT=//'` %-memcached: BASE_PORTS = "MEMCACHED_PORT=11211" .PHONY: %-minio %-minio: SERVICE=minio %-minio: SERVICE_VARIANT=minio -%-minio: SET_CONTAINER_CMD=$$(MINIO_IMAGE) -- server `mktemp` --address=:`cat $$(CONTAINER_FILE) | grep 'UPLOAD_S3_PORT=' | sed 's/UPLOAD_S3_PORT=//'` +%-minio: SET_IMAGE=$$(MINIO_IMAGE) -- server `mktemp` --address=:`cat $$(CONTAINER_FILE) | grep 'UPLOAD_S3_PORT=' | sed 's/UPLOAD_S3_PORT=//'` %-minio: BASE_PORTS = "UPLOAD_S3_PORT=9000" .PHONY: start-% @@ -207,7 +207,7 @@ ghci: shell-ghci; rebuild-%: $(MAKE) -- --image-build SERVICE=$* NO_CACHE=--no-cache --image-build: -ifeq "$(CONTAINER_CMD)" "localhost/fradrive/$(SERVICE)" +ifeq "$(IMAGE)" "localhost/fradrive/$(SERVICE)" rm -f .Dockerfile ln -s docker/$(SERVICE)/Dockerfile .Dockerfile MOUNT_DIR=/mnt/fradrive; \ @@ -233,22 +233,22 @@ endif DEVELOP=`cat develop/.current` ; \ ./utils/watchcontainerrun.sh "$(CONTAINER_COMMAND)" "$(CONTAINER_FILE)" "$(CONTAINER_INIT)" "$(CONTAINER_CLEANUP)" & \ CONTAINER_NAME=fradrive.$(CURR_DEV).$(CONTAINER_IDENT) ; \ - if ! [ -z "$(SET_CONTAINER_CMD)" ] ; \ + if ! [ -z "$(SET_IMAGE)" ] ; \ then \ - CONTAINER_CMD="$(SET_CONTAINER_CMD)" ; \ + IMAGE="$(SET_IMAGE)" ; \ else \ - CONTAINER_CMD=$(CONTAINER_CMD) ; \ + IMAGE=$(IMAGE) ; \ fi ; \ CONTAINER_ID=`$(CONTAINER_BGRUN) \ -v $(PWD):$(MOUNT_DIR) \ --env IN_CONTAINER=true \ - --env FRADRIVE_MAKE_TARGET="--$(JOB)-$(SERVICE_VARIANT)" \ --env CONTAINER_FILE=$(CONTAINER_FILE) \ --env CONTAINER_NAME=$${CONTAINER_NAME} \ --env JOB=$(JOB) \ --env SRC=$(SRC) \ --name $${CONTAINER_NAME} \ - $${CONTAINER_CMD} \ + $${IMAGE} \ + make -- --$(JOB)-$(SERVICE_VARIANT) IN_CONTAINER=true \ ` ; \ printf "CONTAINER_ID=$${CONTAINER_ID}" >> "$(CONTAINER_FILE)" ; \ if [[ "true" == "$(CONTAINER_ATTACHED)" ]] ; then \ @@ -256,7 +256,6 @@ endif fi # For Reverse Proxy Problem see: https://groups.google.com/g/yesodweb/c/2EO53kSOuy0/m/Lw6tq2VYat4J - # HELP(start-backend): start development instance --start-backend: export YESOD_IP_FROM_HEADER=true; \ diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 1bbd830a3..047146cb9 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -33,7 +33,7 @@ RUN if [ ! -z "${NPM_CUSTOM_REGISTRY}" ]; then \ printf 'registry=${NPM_CUSTOM_REGISTRY}' > .npmrc \ ; fi -RUN make -- --dependencies-frontend IN_CONTAINER=true +# RUN make -- --dependencies-frontend IN_CONTAINER=true -ENV FRADRIVE_MAKE_TARGET=--compile-frontend -ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file +# ENV FRADRIVE_MAKE_TARGET=--compile-frontend +# ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file From 66fff83ff886db9b0e36d3bcd2ae8f8a2b9e51e8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 13:10:02 +0100 Subject: [PATCH 105/355] ci(azure-pipelines): fix syntax --- azure-pipelines.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3c5af3bdf..8e0bccdbd 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -5,8 +5,8 @@ pool: 'Prod Private Agent Pool' variables: - FRADRIVE_IMAGE_UPSTREAM: devfra.azurecr.io/de.fraport.fradrive.build - IMAGE_LATEST_RETAG_BRANCH: 'refs/head/master' + imageFradriveUpstream: devfra.azurecr.io/de.fraport.fradrive.build + imageRetagLatestBranch: 'refs/head/master' jobs: - job: FrontendImage @@ -38,21 +38,21 @@ jobs: --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ --build-arg PROJECT_DIR=/fradrive \ --build-arg IN_CI=true \ - --tag ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:$(Build.BuildNumber) \ + --tag ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) \ . - task: Bash@3 displayName: Push frontend image inputs: targetType: inline script: | - docker push ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:$(Build.BuildNumber) + docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - condition: eq(variables['Build.SourceBranch'], ${{IMAGE_LATEST_RETAG_BRANCH}}) + condition: eq(variables['Build.SourceBranch'], ${{variables.imageRetagLatestBranch}}) inputs: targetType: inline script: | - docker push ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:$(Build.BuildNumber) ${{FRADRIVE_IMAGE_UPSTREAM}}/frontend:latest + docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) ${{variables.imageFradriveUpstream}}/frontend:latest - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From 351421e9038c6629b76ac53c91cfe1651b5071dc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 14:04:19 +0100 Subject: [PATCH 106/355] ci(azure-pipelines): fix branch ref --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8e0bccdbd..9a83876a8 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -6,7 +6,7 @@ pool: 'Prod Private Agent Pool' variables: imageFradriveUpstream: devfra.azurecr.io/de.fraport.fradrive.build - imageRetagLatestBranch: 'refs/head/master' + imageRetagLatestBranch: 'refs/heads/master' jobs: - job: FrontendImage From 47678dde2c23b0bdaccacdacea28328413eea995 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 14:08:04 +0100 Subject: [PATCH 107/355] ci(azure-pipelines): fix master branch check --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 9a83876a8..834b8dcb4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -6,7 +6,7 @@ pool: 'Prod Private Agent Pool' variables: imageFradriveUpstream: devfra.azurecr.io/de.fraport.fradrive.build - imageRetagLatestBranch: 'refs/heads/master' + onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] jobs: - job: FrontendImage @@ -48,7 +48,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - condition: eq(variables['Build.SourceBranch'], ${{variables.imageRetagLatestBranch}}) + condition: $(onMasterBranch) inputs: targetType: inline script: | From d7c45dadac0109e9f069a7734f53950279aeb338 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 14:13:12 +0100 Subject: [PATCH 108/355] ci(azure-pipelines): fix syntax --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 834b8dcb4..a3ad9f5ed 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,7 +48,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - condition: $(onMasterBranch) + condition: $[variables.onMasterBranch] inputs: targetType: inline script: | From 7263a19085522867f344b3c9858e4c544d777ade Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 14:16:55 +0100 Subject: [PATCH 109/355] ci(azure-pipelines): fix syntax --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a3ad9f5ed..82b124d96 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,7 +48,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - condition: $[variables.onMasterBranch] + condition: eq(variables.isMain, true) inputs: targetType: inline script: | From 44b84e1e83aa3911e2ca670e72e3b52e978ae866 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 14:17:27 +0100 Subject: [PATCH 110/355] ci(azure-pipelines): fix syntax contd --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 82b124d96..9a68e94bc 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,7 +48,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - condition: eq(variables.isMain, true) + condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | From f3d0c3e2a8aede9f56531e46c05836793c0828fe Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 14:41:40 +0100 Subject: [PATCH 111/355] ci(azure-pipelines): add debug info --- azure-pipelines.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 9a68e94bc..b9dadd096 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -93,12 +93,14 @@ jobs: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) endpoint: devfra env: - FRADRIVE_MAKE_TARGET: --compile-frontend PROJECT_DIR: /fradrive IN_CONTAINER: true + IN_CI: true steps: - checkout: self - - script: make -- --compile-frontend IN_CONTAINER=true PROJECT_DIR=${PROJECT_DIR} + - script: | + cat .npmrc + make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} name: frontendCompile - task: Bash@3 name: frontendTest From 8532af38a5f76f87986b690ba079adf7edec2bc3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 16:15:23 +0100 Subject: [PATCH 112/355] ci(azure-pipelines): build frontend dependencies in separate step --- azure-pipelines.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b9dadd096..0fed240d0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -99,9 +99,16 @@ jobs: steps: - checkout: self - script: | - cat .npmrc - make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} + echo 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/' > .npmrc + make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} + name: frontendDependencies + - task: Bash@3 name: frontendCompile + displayName: Compile frontend + inputs: + targetType: inline + script: | + make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest displayName: Test frontend From 47a7fe15fd86839f74f7d0a82d723eac13c1f6e0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 20 Jan 2025 16:42:33 +0100 Subject: [PATCH 113/355] ci(azure-pipelines): try npm login --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0fed240d0..97bab4ba0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -99,7 +99,8 @@ jobs: steps: - checkout: self - script: | - echo 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/' > .npmrc + printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc + npm login make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} name: frontendDependencies - task: Bash@3 From 8b37d788a746727a7eff4ef3c42ac5d1fa714f17 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 10:03:07 +0100 Subject: [PATCH 114/355] ci(azure-pipelines): dont use azure artifacts; fix node ca certs --- azure-pipelines.yaml | 4 ++-- docker/frontend/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 97bab4ba0..980619cc9 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -99,8 +99,8 @@ jobs: steps: - checkout: self - script: | - printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc - npm login + # printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc + # npm login make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} name: frontendDependencies - task: Bash@3 diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 047146cb9..d928f4411 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -18,7 +18,7 @@ RUN apt-get -y update && apt-get -y install imagemagick # configure npm to use given proxy if specified RUN if [ ! -z "${HTTP_PROXY}" ]; then npm config set proxy ${HTTP_PROXY}; fi RUN if [ ! -z "${FRAPORT_NOPROXY}" ]; then npm config set noproxy "${FRAPORT_NOPROXY}"; fi -ENV NODE_EXTRA_CA_CERTS: "/etc/ssl/certs/ca-certificates.crt" +ENV NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" # locally these two should be identical, so that compilation results are written out into the file dir. # in CI-pipelines these two should be different, so that the container caches the compilation results. From 4f7f54424cfd0f6ddf6dc097834c53bbef59a39b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 10:46:13 +0100 Subject: [PATCH 115/355] ci(azure-pipelines): set npm proxy manually --- azure-pipelines.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 980619cc9..659b850b5 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -101,6 +101,9 @@ jobs: - script: | # printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc # npm login + npm config set proxy http://proxy.frankfurt-airport.de:8080 + npm config set noproxy "dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de" + export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} name: frontendDependencies - task: Bash@3 From f463f3d5038baa4a9a4c699cdc69ee1b47a04f3e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 13:59:59 +0100 Subject: [PATCH 116/355] ci(azure-pipelines): additionally set env vars for proxy in dependency task --- azure-pipelines.yaml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 659b850b5..8b5fe3bb3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -98,14 +98,23 @@ jobs: IN_CI: true steps: - checkout: self - - script: | - # printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc - # npm login - npm config set proxy http://proxy.frankfurt-airport.de:8080 - npm config set noproxy "dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de" - export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" - make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} + - task: Bash@3 name: frontendDependencies + displayName: Install frontend dependencies + env: + HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 + HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 + NO_PROXY: 'localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io' + FRAPORT_NOPROXY: 'dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de' + inputs: + targetType: inline + script: | + # printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc + # npm login + npm config set proxy http://proxy.frankfurt-airport.de:8080 + npm config set noproxy "dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de" + export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" + make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendCompile displayName: Compile frontend From cd3c327c4c574517d80445d207e10424065c65d0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:10:17 +0100 Subject: [PATCH 117/355] ci(azure-pipelines): add debug info --- azure-pipelines.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8b5fe3bb3..6405a6cf9 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -115,12 +115,16 @@ jobs: npm config set noproxy "dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de" export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} + pwd + ls -a . - task: Bash@3 name: frontendCompile displayName: Compile frontend inputs: targetType: inline script: | + find /fradrive + ls -a /fradrive/assets/icons/fradrive make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest From 956e939f9a4b86c556ee35b92e60d906dc50b3a3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:23:28 +0100 Subject: [PATCH 118/355] ci(azure-pipelines): add more debug info --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 6405a6cf9..d6e30efb5 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -117,6 +117,8 @@ jobs: make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} pwd ls -a . + find /fradrive/assets/icons/fradrive + find ./assets/icons/fradrive - task: Bash@3 name: frontendCompile displayName: Compile frontend From e2ad23ab2b5004f8104492ad2e221555d6f76c7b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:27:45 +0100 Subject: [PATCH 119/355] ci(azure-pipelines): temporarily pin frontend image build --- azure-pipelines.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d6e30efb5..8f0c6be4f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -48,7 +48,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - condition: eq(variables.onMasterBranch, true) + # condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | @@ -90,7 +90,8 @@ jobs: dependsOn: FrontendImage condition: succeeded() container: - image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:latest endpoint: devfra env: PROJECT_DIR: /fradrive From 1cc140a1ccff99b8f478cb3e11383e00ce1aae6b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:38:42 +0100 Subject: [PATCH 120/355] ci(azure-pipelines): fix push latest --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8f0c6be4f..ab8d3b0de 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -52,7 +52,8 @@ jobs: inputs: targetType: inline script: | - docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) ${{variables.imageFradriveUpstream}}/frontend:latest + docker tag ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) ${{variables.imageFradriveUpstream}}/frontend:latest + docker push ${{variables.imageFradriveUpstream}}/frontend:latest - task: Docker@2 name: dockerLogoutDevFra displayName: Docker Logout from devfra From 492a7587233e7dc8a1005542abad51a312762cee Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:46:01 +0100 Subject: [PATCH 121/355] ci(azure-pipelines): only rebuild frontend image on master or update/... branches --- azure-pipelines.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ab8d3b0de..a8d96dc2d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -7,9 +7,11 @@ pool: 'Prod Private Agent Pool' variables: imageFradriveUpstream: devfra.azurecr.io/de.fraport.fradrive.build onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] + onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] jobs: - job: FrontendImage + condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -48,7 +50,7 @@ jobs: docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest frontend image - # condition: eq(variables.onMasterBranch, true) + condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | @@ -88,8 +90,8 @@ jobs: containerRegistry: devFra - job: FrontendBuild - dependsOn: FrontendImage - condition: succeeded() + # dependsOn: FrontendImage + # condition: succeeded() container: # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:latest From b7227f9ce3a8cfde8fa5a2ac5083e83410f075be Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 14:57:53 +0100 Subject: [PATCH 122/355] ci(azure-pipelines): use Build.Repository.LocalPath as PROJECT_DIR --- azure-pipelines.yaml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a8d96dc2d..901a74d79 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -90,6 +90,7 @@ jobs: containerRegistry: devFra - job: FrontendBuild + # TODO: wait for FrontendImage iff the job was executed # dependsOn: FrontendImage # condition: succeeded() container: @@ -97,7 +98,7 @@ jobs: image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:latest endpoint: devfra env: - PROJECT_DIR: /fradrive + PROJECT_DIR: $(Build.Repository.LocalPath) IN_CONTAINER: true IN_CI: true steps: @@ -119,18 +120,13 @@ jobs: npm config set noproxy "dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de" export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - pwd - ls -a . - find /fradrive/assets/icons/fradrive - find ./assets/icons/fradrive - task: Bash@3 name: frontendCompile displayName: Compile frontend inputs: targetType: inline script: | - find /fradrive - ls -a /fradrive/assets/icons/fradrive + find . make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest From 315e668ff624f3af62970b80468be2552f8e8aaa Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:05:11 +0100 Subject: [PATCH 123/355] ci(azure-pipelines): tweak debug info --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 901a74d79..ac9839bb7 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -126,7 +126,7 @@ jobs: inputs: targetType: inline script: | - find . + cat .npmrc make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest From cfa10a1c165ca76a585e343b5c05cc6248c20331 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:11:44 +0100 Subject: [PATCH 124/355] ci(azure-pipelines): add debug info contd --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ac9839bb7..0d60fd1a7 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -126,6 +126,7 @@ jobs: inputs: targetType: inline script: | + make -- frontend/src/env.sass IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} cat .npmrc make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 From 6c2b57ca4c92e9f2d7219660e40e861cdbe3fa12 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:13:49 +0100 Subject: [PATCH 125/355] ci(azure-pipelines): remove dummy backend image build --- azure-pipelines.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0d60fd1a7..327786a8e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -63,32 +63,6 @@ jobs: command: logout containerRegistry: devFra -- job: BackendImage - pool: 'Prod Private Agent Pool' - 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 - displayName: Build backend image - inputs: - targetType: inline - script: | - echo "DUMMY BACKEND BUILD" - - task: Docker@2 - name: dockerLogoutDevFra - displayName: Docker Logout from devfra - inputs: - command: logout - containerRegistry: devFra - - job: FrontendBuild # TODO: wait for FrontendImage iff the job was executed # dependsOn: FrontendImage From 5e30ae8b5ffddfe144c04cf378eb9e492bc01e1f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:14:49 +0100 Subject: [PATCH 126/355] ci(azure-pipelines): fix debug info --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 327786a8e..1e6fc20ba 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -101,7 +101,7 @@ jobs: targetType: inline script: | make -- frontend/src/env.sass IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - cat .npmrc + cat frontend/src/env.sass make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest From 8e3c82c1e682aca81edbb2269c4a0d59b4f105ba Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:18:14 +0100 Subject: [PATCH 127/355] build(docker/frontend): remove LC_ALL --- docker/frontend/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index d928f4411..53ccb5a54 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -5,7 +5,6 @@ FROM ${FROM_IMG}:${FROM_TAG} ENV LANG=de_DE.UTF-8 ENV LANGUAGE=de_DE.UTF-8 -ENV LC_ALL=de_DE.UTF-8 # build and watch dependencies RUN apt-get -y update && apt-get -y install exiftool From 1d88e98fb45c204039a8611846da98d374a0ae6e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:23:55 +0100 Subject: [PATCH 128/355] ci(azure-pipelines): add PROJECT_DIR to env per-task --- azure-pipelines.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1e6fc20ba..7282c085e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -85,6 +85,7 @@ jobs: HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 NO_PROXY: 'localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io' FRAPORT_NOPROXY: 'dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de' + PROJECT_DIR: $(Build.Repository.LocalPath) inputs: targetType: inline script: | @@ -97,6 +98,8 @@ jobs: - task: Bash@3 name: frontendCompile displayName: Compile frontend + env: + PROJECT_DIR: $(Build.Repository.LocalPath) inputs: targetType: inline script: | From 733d6ea218b1b5f094c56f3b2c24d5e268501c0c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:42:59 +0100 Subject: [PATCH 129/355] ci(azure-pipelines): remove debug prints --- azure-pipelines.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7282c085e..5dee247be 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -103,8 +103,6 @@ jobs: inputs: targetType: inline script: | - make -- frontend/src/env.sass IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - cat frontend/src/env.sass make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendTest From 5b8edf86ffbfbf7ec07bf64fc48192146672a649 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:44:09 +0100 Subject: [PATCH 130/355] ci(azure-pipelines): try to remove redundant npm-proxy call --- azure-pipelines.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 5dee247be..2645e67eb 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -89,11 +89,6 @@ jobs: inputs: targetType: inline script: | - # printf 'registry=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/\n\nalways-auth=true' > .npmrc - # npm login - npm config set proxy http://proxy.frankfurt-airport.de:8080 - npm config set noproxy "dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de" - export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - task: Bash@3 name: frontendCompile From 12aee272c4b84957ead62c13af52af2f30493068 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 15:45:58 +0100 Subject: [PATCH 131/355] ci(azure-pipelines): add icons to frontend artifacts --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2645e67eb..49675b60f 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -112,6 +112,8 @@ jobs: displayName: Prepare frontend artifacts inputs: Contents: | + assets/icons + assets/favicons static/ well-known/ frontend/src/env.sass From 3122a36ac899bf6d028c9a8245e93074beac23ac Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:28:27 +0100 Subject: [PATCH 132/355] ci(azure-pipelines): parametrize frontend service --- .azure-pipelines/templates/build-image.yaml | 71 +++++++++++++++++ azure-pipelines.yaml | 88 ++++----------------- 2 files changed, 85 insertions(+), 74 deletions(-) create mode 100644 .azure-pipelines/templates/build-image.yaml diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml new file mode 100644 index 000000000..1c90a9165 --- /dev/null +++ b/.azure-pipelines/templates/build-image.yaml @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: service + type: object + default: + name: service + baseImage: baseImage + baseImageTag: baseImageTag + extraBuildOptions: '\' + +variables: + imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build + onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] + onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] + +jobs: + - job: ImageBuild_${{parameters.service.name}} + displayName: Build ${{parameters.service.name}} image + condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + container: + image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 + endpoint: devfra + steps: + - checkout: self + - task: Docker@2 + displayName: Login to container registry + inputs: + command: login + containerRegistry: devFra + - task: Bash@3 + displayName: Build ${{parameters.service.name}} image + inputs: + targetType: inline + script: | + cp docker/${{parameters.service.name}}/Dockerfile . + docker build \ + --tag ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) \ + --build-arg FROM_IMG=${{parameters.service.baseImage}} \ + --build-arg FROM_TAG=${{parameters.service.baseImageTag}} \ + --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ + --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ + --build-arg PROJECT_DIR=/fradrive \ + --build-arg IN_CI=true \ + --build-arg IN_CONTAINER=true \ + $${{ parameters.service.extraBuildOptions }} + . + - task: Bash@3 + displayName: Push ${{ parameters.service.name }} image + inputs: + targetType: inline + script: | + docker push ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) + - task: Bash@3 + displayName: Update latest ${{parameters.service.name}} image + condition: eq(variables.onMasterBranch, true) + inputs: + targetType: inline + script: | + docker tag ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) ${{variables.imageUpstream}}/${{parameters.service.name}}:latest + docker push ${{variables.imageUpstream}}/${{parameters.service.name}}:latest + - task: Docker@2 + displayName: Logout from container registry + inputs: + command: logout + containerRegistry: devFra \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 49675b60f..90c465b4d 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -2,66 +2,23 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later +parameters: + - name: services + type: object + default: + - name: frontend + baseImage: devfra.azurecr.io/de.fraport.build/npm + baseImageTag: node-20 + extraBuildOptions: | + --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ \ + pool: 'Prod Private Agent Pool' -variables: - imageFradriveUpstream: devfra.azurecr.io/de.fraport.fradrive.build - onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] - onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] - jobs: -- job: FrontendImage - condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) - 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 - displayName: Build frontend image - inputs: - targetType: inline - script: | - cp docker/frontend/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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ - --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ \ - --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ - --build-arg PROJECT_DIR=/fradrive \ - --build-arg IN_CI=true \ - --tag ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) \ - . - - task: Bash@3 - displayName: Push frontend image - inputs: - targetType: inline - script: | - docker push ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) - - task: Bash@3 - displayName: Update latest frontend image - condition: eq(variables.onMasterBranch, true) - inputs: - targetType: inline - script: | - docker tag ${{variables.imageFradriveUpstream}}/frontend:$(Build.BuildNumber) ${{variables.imageFradriveUpstream}}/frontend:latest - docker push ${{variables.imageFradriveUpstream}}/frontend:latest - - task: Docker@2 - name: dockerLogoutDevFra - displayName: Docker Logout from devfra - inputs: - command: logout - containerRegistry: devFra +- ${{ each service in parameters.services }}: + - template: .azure-pipelines/templates/build-image.yaml + parameters: + service: ${{ service }} - job: FrontendBuild # TODO: wait for FrontendImage iff the job was executed @@ -90,23 +47,6 @@ jobs: targetType: inline script: | make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - - task: Bash@3 - name: frontendCompile - displayName: Compile frontend - env: - PROJECT_DIR: $(Build.Repository.LocalPath) - inputs: - targetType: inline - script: | - make -- --compile-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - - task: Bash@3 - name: frontendTest - displayName: Test frontend - inputs: - targetType: inline - script: | - make -- --lint-frontend IN_CONTAINER=true - make -- --test-frontend IN_CONTAINER=true - task: CopyFiles@2 name: frontendCopyArtifacts displayName: Prepare frontend artifacts From 60626cd84117b0d2ae1732794d81e26ce69d152c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:31:34 +0100 Subject: [PATCH 133/355] ci(azure-pipelines): move variables decl to main yaml --- .azure-pipelines/templates/build-image.yaml | 5 ----- azure-pipelines.yaml | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 1c90a9165..179ca4450 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -11,11 +11,6 @@ parameters: baseImageTag: baseImageTag extraBuildOptions: '\' -variables: - imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build - onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] - onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] - jobs: - job: ImageBuild_${{parameters.service.name}} displayName: Build ${{parameters.service.name}} image diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 90c465b4d..9e46559cd 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -12,6 +12,11 @@ parameters: extraBuildOptions: | --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ \ +variables: + imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build + onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] + onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] + pool: 'Prod Private Agent Pool' jobs: From 7717b2ce45b1e3483372ee27f46383c39ff6fcbf Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:32:38 +0100 Subject: [PATCH 134/355] ci(azure-pipelines): temporarily remove image build conditions for refresh --- .azure-pipelines/templates/build-image.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 179ca4450..6c02dbdbd 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -14,7 +14,7 @@ parameters: jobs: - job: ImageBuild_${{parameters.service.name}} displayName: Build ${{parameters.service.name}} image - condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + # condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -53,7 +53,7 @@ jobs: docker push ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.service.name}} image - condition: eq(variables.onMasterBranch, true) + # condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | From 81c4838e29849f9fcafb2010fe35f56ce35c26b6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:50:16 +0100 Subject: [PATCH 135/355] ci(azure-pipelines): fix syntax --- .azure-pipelines/templates/build-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 6c02dbdbd..85c8e4f02 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -43,7 +43,7 @@ jobs: --build-arg PROJECT_DIR=/fradrive \ --build-arg IN_CI=true \ --build-arg IN_CONTAINER=true \ - $${{ parameters.service.extraBuildOptions }} + $${{ parameters.service.extraBuildOptions }} \ . - task: Bash@3 displayName: Push ${{ parameters.service.name }} image From 31f670b143b86a3837925dea80b722e259773c4e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:53:28 +0100 Subject: [PATCH 136/355] ci(azure-pipelines): fix templating syntax --- .azure-pipelines/templates/build-image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 85c8e4f02..55dd6d68c 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -32,7 +32,7 @@ jobs: script: | cp docker/${{parameters.service.name}}/Dockerfile . docker build \ - --tag ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) \ + --tag $(variables.imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) \ --build-arg FROM_IMG=${{parameters.service.baseImage}} \ --build-arg FROM_TAG=${{parameters.service.baseImageTag}} \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -50,15 +50,15 @@ jobs: inputs: targetType: inline script: | - docker push ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) + docker push $(variables.imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.service.name}} image # condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | - docker tag ${{variables.imageUpstream}}/${{parameters.service.name}}:$(Build.BuildNumber) ${{variables.imageUpstream}}/${{parameters.service.name}}:latest - docker push ${{variables.imageUpstream}}/${{parameters.service.name}}:latest + docker tag $(variables.imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) $(variables.imageUpstream)/${{parameters.service.name}}:latest + docker push $(variables.imageUpstream)/${{parameters.service.name}}:latest - task: Docker@2 displayName: Logout from container registry inputs: From 50c3134a1b3ac9bfb52e147dd48ef0672c117abd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:55:50 +0100 Subject: [PATCH 137/355] ci(azure-pipelines): fix templating contd --- .azure-pipelines/templates/build-image.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 55dd6d68c..2dd284306 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -32,7 +32,7 @@ jobs: script: | cp docker/${{parameters.service.name}}/Dockerfile . docker build \ - --tag $(variables.imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) \ + --tag $[variables.imageUpstream]/${{parameters.service.name}}:$(Build.BuildNumber) \ --build-arg FROM_IMG=${{parameters.service.baseImage}} \ --build-arg FROM_TAG=${{parameters.service.baseImageTag}} \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -50,15 +50,15 @@ jobs: inputs: targetType: inline script: | - docker push $(variables.imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) + docker push $[variables.imageUpstream]/${{parameters.service.name}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.service.name}} image # condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | - docker tag $(variables.imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) $(variables.imageUpstream)/${{parameters.service.name}}:latest - docker push $(variables.imageUpstream)/${{parameters.service.name}}:latest + docker tag $[variables.imageUpstream]/${{parameters.service.name}}:$(Build.BuildNumber) $[variables.imageUpstream]/${{parameters.service.name}}:latest + docker push $[variables.imageUpstream]/${{parameters.service.name}}:latest - task: Docker@2 displayName: Logout from container registry inputs: From e2f6ee42941ae00c8d6234238031f6c0b865b0a9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 16:56:40 +0100 Subject: [PATCH 138/355] ci(azure-pipelines): fix service extraBuildOptions default --- .azure-pipelines/templates/build-image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 2dd284306..78585ccb9 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -9,7 +9,7 @@ parameters: name: service baseImage: baseImage baseImageTag: baseImageTag - extraBuildOptions: '\' + extraBuildOptions: '' jobs: - job: ImageBuild_${{parameters.service.name}} From b51caba851f97d9064fc3c81ac95c3089f8897bd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 17:03:46 +0100 Subject: [PATCH 139/355] ci(azure-pipelines): add targetImage service parameter --- .azure-pipelines/templates/build-image.yaml | 9 +++++---- azure-pipelines.yaml | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 78585ccb9..7220c4b8d 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -7,6 +7,7 @@ parameters: type: object default: name: service + targetImage: devfra.azurecr.io/de.fraport.fradrive.build/${{parameters.service.name}} baseImage: baseImage baseImageTag: baseImageTag extraBuildOptions: '' @@ -32,7 +33,7 @@ jobs: script: | cp docker/${{parameters.service.name}}/Dockerfile . docker build \ - --tag $[variables.imageUpstream]/${{parameters.service.name}}:$(Build.BuildNumber) \ + --tag ${{parameters.service.targetImage}}:$(Build.BuildNumber) \ --build-arg FROM_IMG=${{parameters.service.baseImage}} \ --build-arg FROM_TAG=${{parameters.service.baseImageTag}} \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -50,15 +51,15 @@ jobs: inputs: targetType: inline script: | - docker push $[variables.imageUpstream]/${{parameters.service.name}}:$(Build.BuildNumber) + docker push ${{parameters.service.targetImage}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.service.name}} image # condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | - docker tag $[variables.imageUpstream]/${{parameters.service.name}}:$(Build.BuildNumber) $[variables.imageUpstream]/${{parameters.service.name}}:latest - docker push $[variables.imageUpstream]/${{parameters.service.name}}:latest + docker tag ${{parameters.service.targetImage}}:$(Build.BuildNumber) ${{parameters.service.targetImage}}:latest + docker push ${{parameters.service.targetImage}}:latest - task: Docker@2 displayName: Logout from container registry inputs: diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 9e46559cd..edea9e819 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -7,13 +7,13 @@ parameters: type: object default: - name: frontend + targetImage: devfra.azurecr.io/de.fraport.fradrive.build/frontend baseImage: devfra.azurecr.io/de.fraport.build/npm baseImageTag: node-20 extraBuildOptions: | - --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ \ + --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ variables: - imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] From e84e7e57d8805586396d1e4d1ad1f55e82532b05 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 17:14:47 +0100 Subject: [PATCH 140/355] ci(azure-pipelines): fix templating contd --- .azure-pipelines/templates/build-image.yaml | 9 ++++----- azure-pipelines.yaml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index 7220c4b8d..f0ad2a5f7 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -7,7 +7,6 @@ parameters: type: object default: name: service - targetImage: devfra.azurecr.io/de.fraport.fradrive.build/${{parameters.service.name}} baseImage: baseImage baseImageTag: baseImageTag extraBuildOptions: '' @@ -33,7 +32,7 @@ jobs: script: | cp docker/${{parameters.service.name}}/Dockerfile . docker build \ - --tag ${{parameters.service.targetImage}}:$(Build.BuildNumber) \ + --tag $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) \ --build-arg FROM_IMG=${{parameters.service.baseImage}} \ --build-arg FROM_TAG=${{parameters.service.baseImageTag}} \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -51,15 +50,15 @@ jobs: inputs: targetType: inline script: | - docker push ${{parameters.service.targetImage}}:$(Build.BuildNumber) + docker push $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.service.name}} image # condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | - docker tag ${{parameters.service.targetImage}}:$(Build.BuildNumber) ${{parameters.service.targetImage}}:latest - docker push ${{parameters.service.targetImage}}:latest + docker tag $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) $(imageUpstream)/${{parameters.service.name}}:latest + docker push $(imageUpstream)/${{parameters.service.name}}:latest - task: Docker@2 displayName: Logout from container registry inputs: diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index edea9e819..b9efe9ddb 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -7,13 +7,13 @@ parameters: type: object default: - name: frontend - targetImage: devfra.azurecr.io/de.fraport.fradrive.build/frontend baseImage: devfra.azurecr.io/de.fraport.build/npm baseImageTag: node-20 extraBuildOptions: | --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ variables: + imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] From 5d542754468a2710bdca77e8f80917e86e879519 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 17:18:32 +0100 Subject: [PATCH 141/355] ci(azure-pipelines): disable extraBuildOptions for now --- .azure-pipelines/templates/build-image.yaml | 3 +-- azure-pipelines.yaml | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index f0ad2a5f7..afbde4622 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -9,7 +9,7 @@ parameters: name: service baseImage: baseImage baseImageTag: baseImageTag - extraBuildOptions: '' + # extraBuildOptions: '' jobs: - job: ImageBuild_${{parameters.service.name}} @@ -43,7 +43,6 @@ jobs: --build-arg PROJECT_DIR=/fradrive \ --build-arg IN_CI=true \ --build-arg IN_CONTAINER=true \ - $${{ parameters.service.extraBuildOptions }} \ . - task: Bash@3 displayName: Push ${{ parameters.service.name }} image diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b9efe9ddb..2b744bbd4 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -9,8 +9,8 @@ parameters: - name: frontend baseImage: devfra.azurecr.io/de.fraport.build/npm baseImageTag: node-20 - extraBuildOptions: | - --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ + # extraBuildOptions: | + # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 03d85be290e13f5726011c5dbe665f82a3b0e44e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 17:28:53 +0100 Subject: [PATCH 142/355] ci(azure-pipelines): reintroduce image-build conditions --- .azure-pipelines/templates/build-image.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/build-image.yaml index afbde4622..c098c92b7 100644 --- a/.azure-pipelines/templates/build-image.yaml +++ b/.azure-pipelines/templates/build-image.yaml @@ -14,7 +14,7 @@ parameters: jobs: - job: ImageBuild_${{parameters.service.name}} displayName: Build ${{parameters.service.name}} image - # condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -52,7 +52,7 @@ jobs: docker push $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.service.name}} image - # condition: eq(variables.onMasterBranch, true) + condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | From 189205767f0b23499c7edea137daf60bd9e50da7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 18:17:43 +0100 Subject: [PATCH 143/355] ci(azure-pipelines): rename service template --- .azure-pipelines/templates/{build-image.yaml => service.yaml} | 0 azure-pipelines.yaml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .azure-pipelines/templates/{build-image.yaml => service.yaml} (100%) diff --git a/.azure-pipelines/templates/build-image.yaml b/.azure-pipelines/templates/service.yaml similarity index 100% rename from .azure-pipelines/templates/build-image.yaml rename to .azure-pipelines/templates/service.yaml diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2b744bbd4..778fe8137 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -21,7 +21,7 @@ pool: 'Prod Private Agent Pool' jobs: - ${{ each service in parameters.services }}: - - template: .azure-pipelines/templates/build-image.yaml + - template: .azure-pipelines/templates/service.yaml parameters: service: ${{ service }} From dfb97df72baa0e22503b41ef478ac18f8a4d82e1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 18:36:33 +0100 Subject: [PATCH 144/355] ci(azure-pipelines): parametrize build steps --- .azure-pipelines/templates/service.yaml | 48 +++++++++++++++++- .../templates/service/build-step.yaml | 21 ++++++++ azure-pipelines.yaml | 49 +------------------ 3 files changed, 69 insertions(+), 49 deletions(-) create mode 100644 .azure-pipelines/templates/service/build-step.yaml diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index c098c92b7..ad156420a 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -10,6 +10,13 @@ parameters: baseImage: baseImage baseImageTag: baseImageTag # extraBuildOptions: '' + - name: buildSteps + type: object + default: + - dependencies + - compile + - lint + - test jobs: - job: ImageBuild_${{parameters.service.name}} @@ -62,4 +69,43 @@ jobs: displayName: Logout from container registry inputs: command: logout - containerRegistry: devFra \ No newline at end of file + containerRegistry: devFra + + - job: Build_${{parameters.service.name}} + displayName: Build ${{parameters.service.name}} + # TODO: wait for ImageBuild job iff the job was executed + # dependsOn: ImageBuild_${{parameters.service.name}} + # condition: succeeded() + container: + # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + image: $(imageUpstream)/${{parameters.service.name}}:latest + endpoint: devfra + env: + PROJECT_DIR: $(Build.Repository.LocalPath) + IN_CONTAINER: true + IN_CI: true + steps: + - checkout: self + - ${{ each buildStep in parameters.buildSteps }}: + - template: .azure-pipelines/templates/service/build-step.yaml + parameters: + service: ${{ parameters.service.name }} + buildStep: ${{ buildStep }} + - task: CopyFiles@2 + displayName: Copy ${{parameters.service.name}} artifacts + inputs: + # TODO: parametrize + Contents: | + assets/icons + assets/favicons + static/ + well-known/ + frontend/src/env.sass + config/manifest.json + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + displayName: Publish ${{parameters.service.name}} artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '${{parameters.service.name}}' + publishLocation: 'Container' \ No newline at end of file diff --git a/.azure-pipelines/templates/service/build-step.yaml b/.azure-pipelines/templates/service/build-step.yaml new file mode 100644 index 000000000..29584c2d9 --- /dev/null +++ b/.azure-pipelines/templates/service/build-step.yaml @@ -0,0 +1,21 @@ +# SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: service + - name: buildStep + +steps: + - task: Bash@3 + name: ${{parameters.service}}_${{parameters.buildStep}} + env: + HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 + HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 + NO_PROXY: 'localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io' + FRAPORT_NOPROXY: 'dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de' + PROJECT_DIR: $(Build.Repository.LocalPath) + inputs: + targetType: inline + script: | + make -- --${{parameters.buildStep}}-${{parameters.service}} IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 778fe8137..50dd86ba0 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -23,51 +23,4 @@ jobs: - ${{ each service in parameters.services }}: - template: .azure-pipelines/templates/service.yaml parameters: - service: ${{ service }} - -- job: FrontendBuild - # TODO: wait for FrontendImage iff the job was executed - # dependsOn: FrontendImage - # condition: succeeded() - container: - # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) - image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:latest - endpoint: devfra - env: - PROJECT_DIR: $(Build.Repository.LocalPath) - IN_CONTAINER: true - IN_CI: true - steps: - - checkout: self - - task: Bash@3 - name: frontendDependencies - displayName: Install frontend dependencies - env: - HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 - HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 - NO_PROXY: 'localhost,127.0.0.1,*.docker.internal,*.azmk8s.io,devfra.azurecr.io,devfra.westeurope.data.azurecr.io' - FRAPORT_NOPROXY: 'dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de' - PROJECT_DIR: $(Build.Repository.LocalPath) - inputs: - targetType: inline - script: | - make -- --dependencies-frontend IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} - - task: CopyFiles@2 - name: frontendCopyArtifacts - displayName: Prepare frontend artifacts - inputs: - Contents: | - assets/icons - assets/favicons - static/ - well-known/ - frontend/src/env.sass - config/manifest.json - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: PublishBuildArtifacts@1 - name: frontendPublishArtifacts - displayName: Publish frontend artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'frontend' - publishLocation: 'Container' \ No newline at end of file + service: ${{ service }} \ No newline at end of file From efa14e0301295670e7e2e8e579e76cc7df84eea5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 18:37:41 +0100 Subject: [PATCH 145/355] ci(azure-pipelines): fix template path --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index ad156420a..f79ab941c 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -87,7 +87,7 @@ jobs: steps: - checkout: self - ${{ each buildStep in parameters.buildSteps }}: - - template: .azure-pipelines/templates/service/build-step.yaml + - template: ./service/build-step.yaml parameters: service: ${{ parameters.service.name }} buildStep: ${{ buildStep }} From 21d6975ea3163bfb2806e922f6f5ea0c9178c9f3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 18:39:17 +0100 Subject: [PATCH 146/355] ci(azure-pipelines): parametrize build artifacts --- .azure-pipelines/templates/service.yaml | 10 ++-------- azure-pipelines.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index f79ab941c..64a02fe5a 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -10,6 +10,7 @@ parameters: baseImage: baseImage baseImageTag: baseImageTag # extraBuildOptions: '' + buildArtifacts: '' - name: buildSteps type: object default: @@ -94,14 +95,7 @@ jobs: - task: CopyFiles@2 displayName: Copy ${{parameters.service.name}} artifacts inputs: - # TODO: parametrize - Contents: | - assets/icons - assets/favicons - static/ - well-known/ - frontend/src/env.sass - config/manifest.json + Contents: ${{ parameters.service.buildArtifacts }} TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishBuildArtifacts@1 displayName: Publish ${{parameters.service.name}} artifacts diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 50dd86ba0..61fe1f218 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -11,6 +11,13 @@ parameters: baseImageTag: node-20 # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ + buildArtifacts: | + assets/icons + assets/favicons + static/ + well-known/ + frontend/src/env.sass + config/manifest.json variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 1d357550d6beb501d04fa7c2c45d8368dbdbb664 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 18:46:19 +0100 Subject: [PATCH 147/355] ci(azure-pipelines): rename build-steps --- .azure-pipelines/templates/service/build-step.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service/build-step.yaml b/.azure-pipelines/templates/service/build-step.yaml index 29584c2d9..6b9fa8ad8 100644 --- a/.azure-pipelines/templates/service/build-step.yaml +++ b/.azure-pipelines/templates/service/build-step.yaml @@ -8,7 +8,7 @@ parameters: steps: - task: Bash@3 - name: ${{parameters.service}}_${{parameters.buildStep}} + name: ${{parameters.buildStep}}-${{parameters.service}} env: HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 From 0e4593888671737045b01c14ef2c3490e64339b4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 19:03:13 +0100 Subject: [PATCH 148/355] chore(frontend): modernize eslint config --- eslint.config.js => eslint.config.mjs | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename eslint.config.js => eslint.config.mjs (100%) diff --git a/eslint.config.js b/eslint.config.mjs similarity index 100% rename from eslint.config.js rename to eslint.config.mjs From 0c808ca39346a10c5314c4efaff4409af50c5e4d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 19:03:33 +0100 Subject: [PATCH 149/355] build(frontend): add eslint --- Makefile | 2 ++ package.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f324b930..5229d8111 100644 --- a/Makefile +++ b/Makefile @@ -312,6 +312,8 @@ frontend/src/env.sass: static: node_modules assets esbuild.config.mjs frontend/src/env.sass npm run build well-known: static; +--lint-frontend: --compile-frontend + npm run lint # HELP(compile-uniworxdb): clear and fill database. requires running postgres instance (use "make start-postgres" to start one) # TODO (db-m-$MIGRATION-backend): apply migration (see src/Model/Migration/Definition.hs for list of available migrations) diff --git a/package.json b/package.json index e7cd70b03..11680876a 100644 --- a/package.json +++ b/package.json @@ -89,6 +89,7 @@ }, "scripts": { "build": "node esbuild.config.mjs", - "start": "node esbuild.config.mjs --watch" + "start": "node esbuild.config.mjs --watch", + "lint": "eslint ." } } From 775ec4c9485e8b10bbfe24dbba08c66a32a3bc61 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 21 Jan 2025 23:56:12 +0100 Subject: [PATCH 150/355] ci(azure-pipelines): rename build steps for azure naming scheme --- .azure-pipelines/templates/service/build-step.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service/build-step.yaml b/.azure-pipelines/templates/service/build-step.yaml index 6b9fa8ad8..c76918569 100644 --- a/.azure-pipelines/templates/service/build-step.yaml +++ b/.azure-pipelines/templates/service/build-step.yaml @@ -8,7 +8,7 @@ parameters: steps: - task: Bash@3 - name: ${{parameters.buildStep}}-${{parameters.service}} + name: ${{parameters.buildStep}}_${{parameters.service}} env: HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 From 8f9f6ba8e27193c04c7e0bc9201d7d8c0831fe1d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:35:34 +0100 Subject: [PATCH 151/355] build(frontend): add --color flag for eslint color in pipeline output --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 11680876a..65a89bbd9 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,6 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint ." + "lint": "eslint --color ." } } From 9f8af30e6da4fb4b1371ba9fe5d4bd8b5921bbd1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:48:42 +0100 Subject: [PATCH 152/355] build(frontend): ignore .stack folder for eslint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65a89bbd9..c02444686 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,6 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint --color ." + "lint": "eslint --ignore-pattern .stack/* --color ." } } From be13a64d502180cd3322116c6370fd8ebf90915f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:49:23 +0100 Subject: [PATCH 153/355] build(frontend): add lintfix npm script --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c02444686..63fd171f0 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint --ignore-pattern .stack/* --color ." + "lint": "eslint --ignore-pattern .stack/* --color .", + "lintfix": "eslint --ignore-pattern .stack/* --color --fix ." } } From 5c73ee676a6c4afe077fa6c56ca2d448484859ce Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:50:43 +0100 Subject: [PATCH 154/355] build(frontend): frontend audit --- package-lock.json | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20fe65044..8c1a92f30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5814,9 +5814,9 @@ "license": "MIT" }, "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", "engines": { @@ -5982,9 +5982,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { @@ -6878,9 +6878,9 @@ "license": "ISC" }, "node_modules/elliptic": { - "version": "6.5.7", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", - "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", "dev": true, "license": "MIT", "dependencies": { @@ -6938,9 +6938,9 @@ } }, "node_modules/engine.io": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz", - "integrity": "sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.2.tgz", + "integrity": "sha512-gmNvsYi9C8iErnZdVcJnvCpSKbWTt1E8+JZo8b+daLninywUWi5NQ5STSHZ9rFjFO7imNcvb8Pc5pe/wMR5xEw==", "dev": true, "license": "MIT", "dependencies": { @@ -6949,7 +6949,7 @@ "@types/node": ">=10.0.0", "accepts": "~1.3.4", "base64id": "2.0.0", - "cookie": "~0.4.1", + "cookie": "~0.7.2", "cors": "~2.8.5", "debug": "~4.3.1", "engine.io-parser": "~5.2.1", @@ -10925,9 +10925,9 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -11211,9 +11211,9 @@ } }, "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "license": "MIT", "dependencies": { @@ -16931,9 +16931,9 @@ } }, "node_modules/socket.io": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", - "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", + "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", "dev": true, "license": "MIT", "dependencies": { @@ -16941,7 +16941,7 @@ "base64id": "~2.0.0", "cors": "~2.8.5", "debug": "~4.3.2", - "engine.io": "~6.5.2", + "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" }, From f9f79b2a422da172ff62ddf04fcfea3956d55715 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:51:33 +0100 Subject: [PATCH 155/355] refactor(frontend): eslint --- .versionrc.js | 16 ++++++++-------- commitlint.config.js | 2 +- karma.conf.cjs | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.versionrc.js b/.versionrc.js index 3c99f18ae..c3c761228 100644 --- a/.versionrc.js +++ b/.versionrc.js @@ -7,33 +7,33 @@ const standardVersionUpdaterYaml = require.resolve('standard-version-updater-yam module.exports = { scripts: { // postbump: './sync-versions.hs && git add -- package.yaml', // moved to bumpFiles - postchangelog: 'sed \'s/^### \\[/## [/g\' -i CHANGELOG.md' + postchangelog: 'sed \'s/^### \\[/## [/g\' -i CHANGELOG.md', }, packageFiles: ['package.json', 'package.yaml'], bumpFiles: [ { filename: 'package.json', - type: 'json' + type: 'json', }, { filename: 'package-lock.json', - type: 'json' + type: 'json', }, { filename: 'package.yaml', - updater: standardVersionUpdaterYaml + updater: standardVersionUpdaterYaml, }, { filename: 'nix/docker/version.json', - type: 'json' + type: 'json', }, { filename: 'nix/docker/demo-version.json', - type: 'json' - } + type: 'json', + }, ], commitUrlFormat: 'https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/commit/{{hash}}', compareUrlFormat: 'https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/compare/{{previousTag}}...{{currentTag}}', issueUrlFormat: 'https://gitlab2.rz.ifi.lmu.de/uni2work/uni2work/issues/{{id}}', - userUrlFormat: 'https://gitlab2.rz.ifi.lmu.de/{{user}}' + userUrlFormat: 'https://gitlab2.rz.ifi.lmu.de/{{user}}', }; diff --git a/commitlint.config.js b/commitlint.config.js index 5eec5bedb..4f7abd1d3 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -2,4 +2,4 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -module.exports = {extends: ['@commitlint/config-conventional']} +module.exports = {extends: ['@commitlint/config-conventional']}; diff --git a/karma.conf.cjs b/karma.conf.cjs index aa8ac1e0f..25d47c46b 100644 --- a/karma.conf.cjs +++ b/karma.conf.cjs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* eslint-disable */ + module.exports = function(config) { config.set({ //root path location to resolve paths defined in files and exclude From 0ad82f62757bb5ecd017f8dafb4d01a39c90ef79 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:54:52 +0100 Subject: [PATCH 156/355] refactor(frontend): eslint contd --- esbuild.config.mjs | 4 ++-- frontend/src/lib/storage-manager/storage-manager.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/esbuild.config.mjs b/esbuild.config.mjs index 2b3d62eb4..251a81db3 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -7,8 +7,8 @@ import svgPlugin from 'esbuild-plugin-svg-bundle'; import { copy } from 'esbuild-plugin-copy'; // import manifestPlugin from 'esbuild-plugin-manifest'; import manifestPlugin from 'esbuild-plugin-assets-manifest'; -import copyWithHashPlugin from '@enonic/esbuild-plugin-copy-with-hash'; -import inlineImportPlugin from 'esbuild-plugin-inline-import'; +// import copyWithHashPlugin from '@enonic/esbuild-plugin-copy-with-hash'; +// import inlineImportPlugin from 'esbuild-plugin-inline-import'; import { nodeModulesPolyfillPlugin } from 'esbuild-plugins-node-modules-polyfill'; const staticDir = './static'; diff --git a/frontend/src/lib/storage-manager/storage-manager.js b/frontend/src/lib/storage-manager/storage-manager.js index 0849ae933..32008e2ec 100644 --- a/frontend/src/lib/storage-manager/storage-manager.js +++ b/frontend/src/lib/storage-manager/storage-manager.js @@ -1,11 +1,11 @@ -// SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen ,Johannes Eder ,Sarah Vaupel ,Sarah Vaupel +// SPDX-FileCopyrightText: 2022-2025 Sarah Vaupel , Gregor Kleen ,Johannes Eder ,Sarah Vaupel ,Sarah Vaupel // // SPDX-License-Identifier: AGPL-3.0-or-later /* global:writable */ import semver from 'semver'; -// import sodium from 'sodium-javascript'; +import sodium from 'sodium-javascript'; import { HttpClient } from '../../services/http-client/http-client'; @@ -501,10 +501,10 @@ function encrypt(plaintext, key) { // TODO use const if possible let plaintextB = Buffer.from(plaintext); let cipherB = Buffer.alloc(plaintextB.length + sodium.crypto_secretbox_MACBYTES); - let nonceB = undefined; // Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); + let nonceB = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); let keyB = Buffer.from(key); - // sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); + sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); const result = cipherB; console.log('encrypt result', result); @@ -524,7 +524,7 @@ function decrypt(ciphertext, key) { let nonceB = undefined; Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); let keyB = Buffer.from(key); - // sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); + sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); const result = plaintextB.toString(); console.log('decrypt result', result); From fd1edb292ca30047e523cd0331b4c40b7f35a493 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 10:56:08 +0100 Subject: [PATCH 157/355] build(frontend): ignore webpack config for eslint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 63fd171f0..2bc81786b 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,6 @@ "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", "lint": "eslint --ignore-pattern .stack/* --color .", - "lintfix": "eslint --ignore-pattern .stack/* --color --fix ." + "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --color --fix ." } } From e85dfde4d9656f8a65327d53d8ed3f72e29b630a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 11:01:27 +0100 Subject: [PATCH 158/355] chore(frontend): partially disable storage-manager util (broken and currently not used) --- .../lib/storage-manager/storage-manager.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/src/lib/storage-manager/storage-manager.js b/frontend/src/lib/storage-manager/storage-manager.js index 32008e2ec..3a83a7615 100644 --- a/frontend/src/lib/storage-manager/storage-manager.js +++ b/frontend/src/lib/storage-manager/storage-manager.js @@ -5,7 +5,7 @@ /* global:writable */ import semver from 'semver'; -import sodium from 'sodium-javascript'; +// import sodium from 'sodium-javascript'; import { HttpClient } from '../../services/http-client/http-client'; @@ -499,14 +499,14 @@ function encrypt(plaintext, key) { if (!key) throw new Error('Cannot encrypt plaintext without a valid key!'); // TODO use const if possible - let plaintextB = Buffer.from(plaintext); - let cipherB = Buffer.alloc(plaintextB.length + sodium.crypto_secretbox_MACBYTES); - let nonceB = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); - let keyB = Buffer.from(key); + // let plaintextB = Buffer.from(plaintext); + // let cipherB = Buffer.alloc(plaintextB.length + sodium.crypto_secretbox_MACBYTES); + // let nonceB = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); + // let keyB = Buffer.from(key); - sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); + // sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); - const result = cipherB; + const result = null; // cipherB; console.log('encrypt result', result); return result; } @@ -519,12 +519,12 @@ function decrypt(ciphertext, key) { if (!key) throw new Error('Cannot decrypt ciphertext without a valid key!'); // TODO use const if possible - let cipherB = Buffer.from(ciphertext); - let plaintextB = undefined; Buffer.alloc(cipherB.length - sodium.crypto_secretbox_MACBYTES); - let nonceB = undefined; Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); - let keyB = Buffer.from(key); + // let cipherB = Buffer.from(ciphertext); + let plaintextB = null; // Buffer.alloc(cipherB.length - sodium.crypto_secretbox_MACBYTES); + // let nonceB = undefined; Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); + // let keyB = Buffer.from(key); - sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); + // sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); const result = plaintextB.toString(); console.log('decrypt result', result); From ab3b01cbfd83954f8cea6eef5aadbd6bd0f871fe Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 11:13:33 +0100 Subject: [PATCH 159/355] build(frontend): ignore webpack config in lint too --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2bc81786b..adb917308 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint --ignore-pattern .stack/* --color .", + "lint": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --color .", "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --color --fix ." } } From 57bbc5ba9c1625005e5927776f5a190276d603ef Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 11:14:48 +0100 Subject: [PATCH 160/355] build(frontend): ignore static and well-known when linting --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index adb917308..d6ac37ed4 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --color .", - "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --color --fix ." + "lint": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --ignore-pattern well-known/* --color .", + "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --ignore-pattern well-known/* --color --fix ." } } From 6168349ed2c711969c63f4b8ed6e81c5be2de946 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 11:26:06 +0100 Subject: [PATCH 161/355] build(frontend): dont ignore well-known when linting --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d6ac37ed4..40ddb56dd 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --ignore-pattern well-known/* --color .", - "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --ignore-pattern well-known/* --color --fix ." + "lint": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --color .", + "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --color --fix ." } } From 453c283438ce253781824391b1d28d6733ea5be6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 11:40:41 +0100 Subject: [PATCH 162/355] build(frontend): only lint frontend/src files to avoid ignored ignore-patterns --- eslint.config.mjs | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 0eda2b201..9c2b1c749 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,7 +5,7 @@ import babelParser from "@babel/eslint-parser"; export default [ js.configs.recommended, { - files: ["**/*.js"], + files: ["frontend/src/**/*.js"], plugins: {}, languageOptions: { ecmaVersion: 2018, diff --git a/package.json b/package.json index 40ddb56dd..4fbfc325e 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "scripts": { "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", - "lint": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --color .", - "lintfix": "eslint --ignore-pattern .stack/* --ignore-pattern webpack.config.cjs --ignore-pattern static/* --color --fix ." + "lint": "eslint --config eslint.config.mjs --color frontend/src", + "lintfix": "eslint --config eslint.config.mjs --color --fix frontend/src" } } From 14b84069377ea0b05421b3488d0bde96965e6952 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 12:02:36 +0100 Subject: [PATCH 163/355] build(frontend): add dummy target for test-frontend --- Makefile | 2 ++ package.json | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5229d8111..0b5ca5f91 100644 --- a/Makefile +++ b/Makefile @@ -314,6 +314,8 @@ static: node_modules assets esbuild.config.mjs frontend/src/env.sass well-known: static; --lint-frontend: --compile-frontend npm run lint +--test-frontend: --compile-frontend + npm run test # HELP(compile-uniworxdb): clear and fill database. requires running postgres instance (use "make start-postgres" to start one) # TODO (db-m-$MIGRATION-backend): apply migration (see src/Model/Migration/Definition.hs for list of available migrations) diff --git a/package.json b/package.json index 4fbfc325e..92dc0a0e8 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "karma-browserify": "^8.1.0", "karma-chrome-launcher": "^3.2.0", "karma-cli": "^2.0.0", + "karma-esbuild": "^2.3.0", "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.1.0", "karma-mocha-reporter": "^2.2.5", @@ -91,6 +92,7 @@ "build": "node esbuild.config.mjs", "start": "node esbuild.config.mjs --watch", "lint": "eslint --config eslint.config.mjs --color frontend/src", - "lintfix": "eslint --config eslint.config.mjs --color --fix frontend/src" + "lintfix": "eslint --config eslint.config.mjs --color --fix frontend/src", + "test": "echo \"karma-testsuite currently disabled, reporting success\"" } } From ded2049f3315b88931a383c7b3fa1dd5601cdea0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 21:13:58 +0100 Subject: [PATCH 164/355] ci(azure-pipelines): add backend service --- azure-pipelines.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 61fe1f218..43f23ccc3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -18,6 +18,12 @@ parameters: well-known/ frontend/src/env.sass config/manifest.json + - name: backend + baseImage: devfra.azurecr.io/de.fraport.build/haskell + baseImageTag: 8.10.4 + buildArtifacts: | + .stack/ + .stack-work/ variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 7c6da61d134584db6bbecfbbd458555e38ce3b91 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 21:37:10 +0100 Subject: [PATCH 165/355] ci(azure-pipelines): Build jobs depend on ImageBuild jobs now --- .azure-pipelines/templates/service.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 64a02fe5a..e41ddf38d 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -74,10 +74,11 @@ jobs: - job: Build_${{parameters.service.name}} displayName: Build ${{parameters.service.name}} - # TODO: wait for ImageBuild job iff the job was executed - # dependsOn: ImageBuild_${{parameters.service.name}} - # condition: succeeded() + dependsOn: + - ImageBuild_${{parameters.service.name}} + condition: or(succeeded(), canceled()) container: + # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) image: $(imageUpstream)/${{parameters.service.name}}:latest endpoint: devfra From 0ffbbfdb1890f7b160b681d9994f53b2ba803160 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 21:40:48 +0100 Subject: [PATCH 166/355] ci(azure-pipelines): fix image build dependency --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index e41ddf38d..23c60a257 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -76,7 +76,7 @@ jobs: displayName: Build ${{parameters.service.name}} dependsOn: - ImageBuild_${{parameters.service.name}} - condition: or(succeeded(), canceled()) + condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Canceled') container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From 8c47b51cef32159cfa911886c3741ffabd713499 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 21:41:59 +0100 Subject: [PATCH 167/355] ci(azure-pipelines): fix image build dependency contd --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 23c60a257..ce7fefc82 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -76,7 +76,7 @@ jobs: displayName: Build ${{parameters.service.name}} dependsOn: - ImageBuild_${{parameters.service.name}} - condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Canceled') + condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From e0d1777fb9c54c42289997e41da2bda00dec7469 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 21:50:02 +0100 Subject: [PATCH 168/355] ci(azure-pipelines): add dependsOn to parameter for services --- .azure-pipelines/templates/service.yaml | 10 +++++++++- azure-pipelines.yaml | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index ce7fefc82..d6aa6199e 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -11,6 +11,7 @@ parameters: baseImageTag: baseImageTag # extraBuildOptions: '' buildArtifacts: '' + dependsOn: [] - name: buildSteps type: object default: @@ -76,7 +77,14 @@ jobs: displayName: Build ${{parameters.service.name}} dependsOn: - ImageBuild_${{parameters.service.name}} - condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') + - ${{ each dep in parameters.service.dependsOn }}: + - ${{ dep }} + condition: | + and( + in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), + ${{ each dep in parameters.service.dependsOn }}: + eq(dependencies.${{dep}}.result, 'Succeeded') + ) container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 43f23ccc3..b2d3d1568 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,6 +24,7 @@ parameters: buildArtifacts: | .stack/ .stack-work/ + dependsOn: compile_frontend variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From a8e9a59edf55ceba41b6c80b44722711d120e3d6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:09:46 +0100 Subject: [PATCH 169/355] ci(azure-pipelines): use reduce for dependsOn service mapping --- .azure-pipelines/templates/service.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index d6aa6199e..fdb5f9235 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -82,8 +82,7 @@ jobs: condition: | and( in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), - ${{ each dep in parameters.service.dependsOn }}: - eq(dependencies.${{dep}}.result, 'Succeeded') + reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result) ) container: # TODO: use BuildNumber instead of latest in update branches From 34fd73e17bde6b38e4d2fb051442379c4d8d21dd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:10:24 +0100 Subject: [PATCH 170/355] ci(azure-pipelines): fix backend dependsOn type --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b2d3d1568..e650d2ffc 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,7 +24,8 @@ parameters: buildArtifacts: | .stack/ .stack-work/ - dependsOn: compile_frontend + dependsOn: + - compile_frontend variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 66879a4fb0fc682d5f358c1782773180a4a95e2e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:11:08 +0100 Subject: [PATCH 171/355] ci(azure-pipelines): fix service build condition --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index fdb5f9235..d756748c1 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -82,7 +82,7 @@ jobs: condition: | and( in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), - reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result) + eq(reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result), true) ) container: # TODO: use BuildNumber instead of latest in update branches From c8a9e5a57d5351087c5ce74579bfb5f8958d273a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:14:50 +0100 Subject: [PATCH 172/355] ci(azure-pipelines): fix service build condition contd --- .azure-pipelines/templates/service.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index d756748c1..33382787c 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -79,11 +79,8 @@ jobs: - ImageBuild_${{parameters.service.name}} - ${{ each dep in parameters.service.dependsOn }}: - ${{ dep }} - condition: | - and( - in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), - eq(reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result), true) - ) + condition: and(in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), ${{ reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result)) }}) + # reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result)) container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From 53edb0dfebd6fad295de47d9dee1b4c23cb78717 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:19:35 +0100 Subject: [PATCH 173/355] ci(azure-pipelines): simplify service run conditions --- .azure-pipelines/templates/service.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 33382787c..d07e5e079 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -79,8 +79,8 @@ jobs: - ImageBuild_${{parameters.service.name}} - ${{ each dep in parameters.service.dependsOn }}: - ${{ dep }} - condition: and(in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), ${{ reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result)) }}) - # reduce(parameters.service.dependsOn, true, and(#acc, eq(dependencies.#acc.result, 'Succeeded')), #result)) + condition: or(succeeded(), skipped()) + # condition: and(in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), not(in(${{ parameters.service.dependsOn }}))) container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From fdaaccb28ae79d3f94621725e78372003df528d9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:27:43 +0100 Subject: [PATCH 174/355] ci(azure-pipelines): simplify service conditions contd --- .azure-pipelines/templates/service.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index d07e5e079..de095cde0 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -79,8 +79,7 @@ jobs: - ImageBuild_${{parameters.service.name}} - ${{ each dep in parameters.service.dependsOn }}: - ${{ dep }} - condition: or(succeeded(), skipped()) - # condition: and(in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped'), not(in(${{ parameters.service.dependsOn }}))) + condition: and(in(dependencies.ImageBuild_${{parameters.service.name}}.result,'Succeeded','Skipped')) container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From bcfee0f14fe3303a56c4a02a684be3ec2385d7ab Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:29:19 +0100 Subject: [PATCH 175/355] ci(azure-pipelines): simplify service conditions contd --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index de095cde0..b2e1747a6 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -79,7 +79,7 @@ jobs: - ImageBuild_${{parameters.service.name}} - ${{ each dep in parameters.service.dependsOn }}: - ${{ dep }} - condition: and(in(dependencies.ImageBuild_${{parameters.service.name}}.result,'Succeeded','Skipped')) + condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From 4ef188f2edd49e67dcf8a0d43984034630bfaf32 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:31:38 +0100 Subject: [PATCH 176/355] ci(azure-pipelines): disable dependsOn for service for now --- azure-pipelines.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e650d2ffc..43f23ccc3 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,8 +24,6 @@ parameters: buildArtifacts: | .stack/ .stack-work/ - dependsOn: - - compile_frontend variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From eec396ec98eb79af1b469ca0e27abffd1f1f22d7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:34:28 +0100 Subject: [PATCH 177/355] ci(azure-pipelines): use DS2 pool for backend service --- .azure-pipelines/templates/service.yaml | 2 ++ azure-pipelines.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index b2e1747a6..7978d0af1 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -9,6 +9,7 @@ parameters: name: service baseImage: baseImage baseImageTag: baseImageTag + pool: 'Prod Private Agent Pool' # extraBuildOptions: '' buildArtifacts: '' dependsOn: [] @@ -74,6 +75,7 @@ jobs: containerRegistry: devFra - job: Build_${{parameters.service.name}} + pool: ${{ parameters.service.pool }} displayName: Build ${{parameters.service.name}} dependsOn: - ImageBuild_${{parameters.service.name}} diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 43f23ccc3..00fccec46 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -21,6 +21,7 @@ parameters: - name: backend baseImage: devfra.azurecr.io/de.fraport.build/haskell baseImageTag: 8.10.4 + pool: 'Prod Private Agent Pool DS2' buildArtifacts: | .stack/ .stack-work/ From e9dc8be8262f8a7a2e8a744b5ec3674d5109a019 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:35:40 +0100 Subject: [PATCH 178/355] ci(azure-pipelines): fix service pool --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 7978d0af1..903d8c550 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -75,7 +75,6 @@ jobs: containerRegistry: devFra - job: Build_${{parameters.service.name}} - pool: ${{ parameters.service.pool }} displayName: Build ${{parameters.service.name}} dependsOn: - ImageBuild_${{parameters.service.name}} @@ -87,6 +86,7 @@ jobs: # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) image: $(imageUpstream)/${{parameters.service.name}}:latest endpoint: devfra + pool: ${{ parameters.service.pool }} env: PROJECT_DIR: $(Build.Repository.LocalPath) IN_CONTAINER: true From 2cece492e977f1420ac0d6060782100eaae90e39 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:39:12 +0100 Subject: [PATCH 179/355] revert(azure-pipelines): use pool on job level --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 903d8c550..91fc20152 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -81,12 +81,12 @@ jobs: - ${{ each dep in parameters.service.dependsOn }}: - ${{ dep }} condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') + pool: ${{ parameters.service.pool }} container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) image: $(imageUpstream)/${{parameters.service.name}}:latest endpoint: devfra - pool: ${{ parameters.service.pool }} env: PROJECT_DIR: $(Build.Repository.LocalPath) IN_CONTAINER: true From 7e014c037ef01cf6e3a135c7cd28809cbf0a3f46 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:39:43 +0100 Subject: [PATCH 180/355] ci(azure-pipelines): fix syntax --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 91fc20152..785be42e0 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -81,7 +81,7 @@ jobs: - ${{ each dep in parameters.service.dependsOn }}: - ${{ dep }} condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') - pool: ${{ parameters.service.pool }} + pool: '${{ parameters.service.pool }}' container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From d35c524f99dc1dedfac767ee4f86bf664987db42 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:54:21 +0100 Subject: [PATCH 181/355] ci(azure-pipelines): --- .azure-pipelines/templates/service.yaml | 71 ++++++++++++++----------- azure-pipelines.yaml | 20 ++++--- 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 785be42e0..d493d3060 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -3,16 +3,23 @@ # SPDX-License-Identifier: AGPL-3.0-or-later parameters: - - name: service + - name: serviceName + type: string + default: serviceName + - name: serviceBase type: object default: - name: service - baseImage: baseImage - baseImageTag: baseImageTag - pool: 'Prod Private Agent Pool' - # extraBuildOptions: '' - buildArtifacts: '' - dependsOn: [] + image: baseImage + tag: baseImageTag + - name: servicePool + type: string + default: 'Prod Private Agent Pool' + # extraBuildOptions: '' + - name: serviceArtifacts + type: string + default: '' + - name: serviceDependencies + default: [] - name: buildSteps type: object default: @@ -22,8 +29,8 @@ parameters: - test jobs: - - job: ImageBuild_${{parameters.service.name}} - displayName: Build ${{parameters.service.name}} image + - job: ImageBuild_${{parameters.serviceName}} + displayName: Build ${{parameters.serviceName}} image condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 @@ -36,15 +43,15 @@ jobs: command: login containerRegistry: devFra - task: Bash@3 - displayName: Build ${{parameters.service.name}} image + displayName: Build ${{parameters.serviceName}} image inputs: targetType: inline script: | - cp docker/${{parameters.service.name}}/Dockerfile . + cp docker/${{parameters.serviceName}}/Dockerfile . docker build \ - --tag $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) \ - --build-arg FROM_IMG=${{parameters.service.baseImage}} \ - --build-arg FROM_TAG=${{parameters.service.baseImageTag}} \ + --tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) \ + --build-arg FROM_IMG=${{parameters.serviceBase.image}} \ + --build-arg FROM_TAG=${{parameters.serviceBase.tag}} \ --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' \ @@ -55,37 +62,37 @@ jobs: --build-arg IN_CONTAINER=true \ . - task: Bash@3 - displayName: Push ${{ parameters.service.name }} image + displayName: Push ${{ parameters.serviceName }} image inputs: targetType: inline script: | - docker push $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) + docker push $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) - task: Bash@3 - displayName: Update latest ${{parameters.service.name}} image + displayName: Update latest ${{parameters.serviceName}} image condition: eq(variables.onMasterBranch, true) inputs: targetType: inline script: | - docker tag $(imageUpstream)/${{parameters.service.name}}:$(Build.BuildNumber) $(imageUpstream)/${{parameters.service.name}}:latest - docker push $(imageUpstream)/${{parameters.service.name}}:latest + docker tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) $(imageUpstream)/${{parameters.serviceName}}:latest + docker push $(imageUpstream)/${{parameters.serviceName}}:latest - task: Docker@2 displayName: Logout from container registry inputs: command: logout containerRegistry: devFra - - job: Build_${{parameters.service.name}} - displayName: Build ${{parameters.service.name}} + - job: Build_${{parameters.serviceName}} + displayName: Build ${{parameters.serviceName}} dependsOn: - - ImageBuild_${{parameters.service.name}} - - ${{ each dep in parameters.service.dependsOn }}: + - ImageBuild_${{parameters.serviceName}} + - ${{ each dep in parameters.serviceDependencies }}: - ${{ dep }} - condition: in(dependencies.ImageBuild_${{parameters.service.name}}.result, 'Succeeded', 'Skipped') - pool: '${{ parameters.service.pool }}' + condition: in(dependencies.ImageBuild_${{parameters.serviceName}}.result, 'Succeeded', 'Skipped') + pool: '${{ parameters.servicePool }}' container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) - image: $(imageUpstream)/${{parameters.service.name}}:latest + image: $(imageUpstream)/${{parameters.serviceName}}:latest endpoint: devfra env: PROJECT_DIR: $(Build.Repository.LocalPath) @@ -96,16 +103,16 @@ jobs: - ${{ each buildStep in parameters.buildSteps }}: - template: ./service/build-step.yaml parameters: - service: ${{ parameters.service.name }} + service: ${{ parameters.serviceName }} buildStep: ${{ buildStep }} - task: CopyFiles@2 - displayName: Copy ${{parameters.service.name}} artifacts + displayName: Copy ${{parameters.serviceName}} artifacts inputs: - Contents: ${{ parameters.service.buildArtifacts }} + Contents: ${{ parameters.serviceArtifacts }} TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishBuildArtifacts@1 - displayName: Publish ${{parameters.service.name}} artifacts + displayName: Publish ${{parameters.serviceName}} artifacts inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '${{parameters.service.name}}' + ArtifactName: '${{parameters.serviceName}}' publishLocation: 'Container' \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 00fccec46..784ae10ee 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -7,11 +7,12 @@ parameters: type: object default: - name: frontend - baseImage: devfra.azurecr.io/de.fraport.build/npm - baseImageTag: node-20 + base: + image: devfra.azurecr.io/de.fraport.build/npm + tag: node-20 # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ - buildArtifacts: | + artifacts: | assets/icons assets/favicons static/ @@ -19,10 +20,11 @@ parameters: frontend/src/env.sass config/manifest.json - name: backend - baseImage: devfra.azurecr.io/de.fraport.build/haskell - baseImageTag: 8.10.4 + base: + image: devfra.azurecr.io/de.fraport.build/haskell + tag: 8.10.4 pool: 'Prod Private Agent Pool DS2' - buildArtifacts: | + artifacts: | .stack/ .stack-work/ @@ -37,4 +39,8 @@ jobs: - ${{ each service in parameters.services }}: - template: .azure-pipelines/templates/service.yaml parameters: - service: ${{ service }} \ No newline at end of file + serviceName: ${{ service.name }} + serviceBase: ${{ service.base }} + servicePool: ${{ service.pool }} + serviceDependencies: ${{ service.dependencies }} + serviceArtifacts: ${{ service.artifacts }} \ No newline at end of file From 6112f9f22937bd25e861dc3c74c7d7102a66e805 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:55:43 +0100 Subject: [PATCH 182/355] ci(azure-pipelines): provide non-empty parameter service values --- azure-pipelines.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 784ae10ee..d58a85a61 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -12,6 +12,8 @@ parameters: tag: node-20 # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ + pool: 'Prod Private Agent Pool' + dependencies: [] artifacts: | assets/icons assets/favicons @@ -24,6 +26,7 @@ parameters: image: devfra.azurecr.io/de.fraport.build/haskell tag: 8.10.4 pool: 'Prod Private Agent Pool DS2' + dependencies: [] artifacts: | .stack/ .stack-work/ From 865073a6a16e01c6d9fce51721aaf4bf173a4325 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:57:07 +0100 Subject: [PATCH 183/355] ci(azure-pipelines): remove dependencies parameter --- .azure-pipelines/templates/service.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index d493d3060..a54936575 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -18,8 +18,6 @@ parameters: - name: serviceArtifacts type: string default: '' - - name: serviceDependencies - default: [] - name: buildSteps type: object default: From 78b3a3807616b7002cc69728dcbe748d9f9bb7bc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:57:53 +0100 Subject: [PATCH 184/355] ci(azure-pipelines): remove service dependencies contd --- azure-pipelines.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d58a85a61..6e9d3dc33 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -13,7 +13,6 @@ parameters: # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ pool: 'Prod Private Agent Pool' - dependencies: [] artifacts: | assets/icons assets/favicons @@ -45,5 +44,4 @@ jobs: serviceName: ${{ service.name }} serviceBase: ${{ service.base }} servicePool: ${{ service.pool }} - serviceDependencies: ${{ service.dependencies }} serviceArtifacts: ${{ service.artifacts }} \ No newline at end of file From acb5dbfb28349efd33f99f6faa891abd4a2c29e8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 22:58:29 +0100 Subject: [PATCH 185/355] ci(azure-pipelines): remove service dependencies contd --- .azure-pipelines/templates/service.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index a54936575..b8ad7bc3d 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -83,8 +83,6 @@ jobs: displayName: Build ${{parameters.serviceName}} dependsOn: - ImageBuild_${{parameters.serviceName}} - - ${{ each dep in parameters.serviceDependencies }}: - - ${{ dep }} condition: in(dependencies.ImageBuild_${{parameters.serviceName}}.result, 'Succeeded', 'Skipped') pool: '${{ parameters.servicePool }}' container: From e67091cb47d6fafdce9749b220b2a8618f9c516a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 22 Jan 2025 23:09:25 +0100 Subject: [PATCH 186/355] ci(azure-pipelines): introduce forcePushLatest variable --- .azure-pipelines/templates/service.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index b8ad7bc3d..fae755a5c 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -29,7 +29,7 @@ parameters: jobs: - job: ImageBuild_${{parameters.serviceName}} displayName: Build ${{parameters.serviceName}} image - condition: or(eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -67,7 +67,7 @@ jobs: docker push $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.serviceName}} image - condition: eq(variables.onMasterBranch, true) + condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true)) inputs: targetType: inline script: | From 56d7fec46639974e7617a9a9fb18b6279615022e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 10:51:29 +0100 Subject: [PATCH 187/355] ci(azure-pipelines): add debug print for pool --- .azure-pipelines/templates/service.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index fae755a5c..e8a0d922e 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -35,6 +35,7 @@ jobs: endpoint: devfra steps: - checkout: self + - script: echo SERVICE POOL = ${{parameters.servicePool}} - task: Docker@2 displayName: Login to container registry inputs: From d030c5d0cc55978b599616fe474caa3f33418aa3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 11:00:03 +0100 Subject: [PATCH 188/355] build(Makefile): restrict backend dependency builds to 1 cpu core --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0b5ca5f91..a77268364 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,7 @@ endif stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins # HELP(dependencies-backend): (re-)build backend dependencies --dependencies-backend: uniworx.cabal - stack build $(STACK_CORES) --fast --only-dependencies + stack build -j1 --only-dependencies # HELP(lint-backend): lint backend --lint-backend: stack build $(STACK_CORES) --test --fast --flag uniworx:library-only $(--DEVELOPMENT) uniworx:test:hlint From 7a44af0a0b6ac67e1619f2db8f19195cb13831e7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 12:29:00 +0100 Subject: [PATCH 189/355] build(Makefile): limit dependency build to 3G mem --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a77268364..dbd6311e1 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,7 @@ endif stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins # HELP(dependencies-backend): (re-)build backend dependencies --dependencies-backend: uniworx.cabal - stack build -j1 --only-dependencies + stack build -j1 -with-rtsopts="-M3G" --only-dependencies # HELP(lint-backend): lint backend --lint-backend: stack build $(STACK_CORES) --test --fast --flag uniworx:library-only $(--DEVELOPMENT) uniworx:test:hlint From 8906f3d705dc0f4148549e2987d7e27b8fed7da4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 15:08:15 +0100 Subject: [PATCH 190/355] ci(azure-pipelines): use DS3 --- Makefile | 2 +- azure-pipelines.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dbd6311e1..a77268364 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,7 @@ endif stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins # HELP(dependencies-backend): (re-)build backend dependencies --dependencies-backend: uniworx.cabal - stack build -j1 -with-rtsopts="-M3G" --only-dependencies + stack build -j1 --only-dependencies # HELP(lint-backend): lint backend --lint-backend: stack build $(STACK_CORES) --test --fast --flag uniworx:library-only $(--DEVELOPMENT) uniworx:test:hlint diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 6e9d3dc33..413e8566c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,7 +24,7 @@ parameters: base: image: devfra.azurecr.io/de.fraport.build/haskell tag: 8.10.4 - pool: 'Prod Private Agent Pool DS2' + pool: 'Prod Private Agent Pool DS3' dependencies: [] artifacts: | .stack/ From be645b8c8bf4b3a97d16545858f90ffaf31d6289 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 15:28:41 +0100 Subject: [PATCH 191/355] ci(azure-pipelines): make parameter pool available for image build jobs --- .azure-pipelines/templates/service.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index e8a0d922e..a972fb5ad 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -30,6 +30,7 @@ jobs: - job: ImageBuild_${{parameters.serviceName}} displayName: Build ${{parameters.serviceName}} image condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + pool: '${{ parameters.servicePool }}' container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra From 073ffb84834412d9c15587df76a01df857553524 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 16:42:13 +0100 Subject: [PATCH 192/355] ci(azure-pipelines): add debug prints --- .azure-pipelines/templates/service.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index a972fb5ad..f933d7485 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -36,12 +36,16 @@ jobs: endpoint: devfra steps: - checkout: self - - script: echo SERVICE POOL = ${{parameters.servicePool}} - task: Docker@2 displayName: Login to container registry inputs: command: login containerRegistry: devFra + - script: | + ls -a . + pwd + find . + find /fradrive - task: Bash@3 displayName: Build ${{parameters.serviceName}} image inputs: From 65ec7f0de58f6a8ddb0141b1a35dc1201a710990 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 16:51:07 +0100 Subject: [PATCH 193/355] build(docker/backend): RUN --mount instead of late COPY [skip ci] --- docker/backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 2b89763f6..8be8d43f0 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -46,8 +46,8 @@ RUN stack install yesod-bin RUN stack install hpack # pre-build dependencies -RUN make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} -COPY . ${PROJECT_DIR} +RUN --mount=type=bind,source=.,target=${PROJECT_DIR} \ +make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} # copy source files #COPY app/ ${PROJECT_DIR}/app From c0ec8d2a9d84956738bcda0ae461cec5fd111ca3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 17:10:27 +0100 Subject: [PATCH 194/355] build(docker/backend): mount on prebuild to relative location [skip ci] --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 8be8d43f0..36e8b11ac 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -46,7 +46,7 @@ RUN stack install yesod-bin RUN stack install hpack # pre-build dependencies -RUN --mount=type=bind,source=.,target=${PROJECT_DIR} \ +RUN --mount=type=bind,source=.,target=. \ make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} # copy source files From e95ad6243677e2fcbcf78701278f6682cc60d38c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 17:14:30 +0100 Subject: [PATCH 195/355] ci(azure-pipelines): fix debug prints [skip ci] --- .azure-pipelines/templates/service.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index f933d7485..53ffd0f48 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -45,7 +45,6 @@ jobs: ls -a . pwd find . - find /fradrive - task: Bash@3 displayName: Build ${{parameters.serviceName}} image inputs: From 689531388798149af2fc4e04af9cf430ce59a56d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 17:15:45 +0100 Subject: [PATCH 196/355] build(docker/backend): replace more COPY with mount [skip ci] --- docker/backend/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 36e8b11ac..550d1716b 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -39,11 +39,8 @@ ENV STACK_ROOT="${PROJECT_DIR}/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -COPY stack.yaml ${PROJECT_DIR}/stack.yaml -COPY stack.yaml.lock ${PROJECT_DIR}/stack.yaml.lock -COPY package.yaml ${PROJECT_DIR}/package.yaml -RUN stack install yesod-bin -RUN stack install hpack +RUN --mount=type=bind,source=.,target=. stack install yesod-bin +RUN --mount=type=bind,source=.,target=. stack install hpack # pre-build dependencies RUN --mount=type=bind,source=.,target=. \ From 325f07feca797fee96af0fd335e301b0ef21d46b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 23 Jan 2025 17:20:42 +0100 Subject: [PATCH 197/355] build(docker/backend): add rw permissions for stack mounts [skip ci] --- docker/backend/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 550d1716b..5180e28a6 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -39,11 +39,11 @@ ENV STACK_ROOT="${PROJECT_DIR}/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -RUN --mount=type=bind,source=.,target=. stack install yesod-bin -RUN --mount=type=bind,source=.,target=. stack install hpack +RUN --mount=type=bind,source=.,target=.,rw stack install yesod-bin +RUN --mount=type=bind,source=.,target=.,rw stack install hpack # pre-build dependencies -RUN --mount=type=bind,source=.,target=. \ +RUN --mount=type=bind,source=.,target=.,rw \ make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} # copy source files From 24046ef0fcab28e46f92ac3481b5238cf1172927 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 00:20:01 +0100 Subject: [PATCH 198/355] build(Makefile): remove explicit uniworx.cabal dependency [skip ci] --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a77268364..a34212c9c 100644 --- a/Makefile +++ b/Makefile @@ -280,7 +280,7 @@ endif --compile-backend: stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins # HELP(dependencies-backend): (re-)build backend dependencies ---dependencies-backend: uniworx.cabal +--dependencies-backend: #uniworx.cabal stack build -j1 --only-dependencies # HELP(lint-backend): lint backend --lint-backend: @@ -288,8 +288,8 @@ endif # HELP(test-backend): test backend --test-backend: stack build $(STACK_CORES) --test --coverage --fast --flag uniworx:library-only $(--DEVELOPMENT) -uniworx.cabal: - stack exec -- hpack --force +# uniworx.cabal: +# stack exec -- hpack --force # HELP(compile-frontend): compile frontend assets --compile-frontend: node_modules assets esbuild.config.mjs frontend/src/env.sass From 85bea8d12c6cd8108380e4553df7c0bf3d7c36f6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 00:20:34 +0100 Subject: [PATCH 199/355] build(docker/backend): tweak stack root [skip ci] --- docker/backend/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 5180e28a6..a43d1ffec 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -33,8 +33,7 @@ ARG PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" # RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi -RUN mkdir -p "${PROJECT_DIR}/.stack" -ENV STACK_ROOT="${PROJECT_DIR}/.stack" +ENV STACK_ROOT="/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} From 53226e6c6fa8dca0c34cb4ceb4821757c266ae80 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 02:20:07 +0100 Subject: [PATCH 200/355] build(Makefile): use 2 cores for backend dependencies [skip ci] --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a34212c9c..afa323438 100644 --- a/Makefile +++ b/Makefile @@ -281,7 +281,7 @@ endif stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins # HELP(dependencies-backend): (re-)build backend dependencies --dependencies-backend: #uniworx.cabal - stack build -j1 --only-dependencies + stack build -j2 --only-dependencies # HELP(lint-backend): lint backend --lint-backend: stack build $(STACK_CORES) --test --fast --flag uniworx:library-only $(--DEVELOPMENT) uniworx:test:hlint From 34169425915b48bd6c6f7f74d0938bda3536075b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 02:26:09 +0100 Subject: [PATCH 201/355] ci(azure-pipelines): add job timeout param --- .azure-pipelines/templates/service.yaml | 4 ++++ azure-pipelines.yaml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 53ffd0f48..b48acb65f 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -14,6 +14,9 @@ parameters: - name: servicePool type: string default: 'Prod Private Agent Pool' + - name: serviceTimeout + type: number + default: 60 # extraBuildOptions: '' - name: serviceArtifacts type: string @@ -31,6 +34,7 @@ jobs: displayName: Build ${{parameters.serviceName}} image condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) pool: '${{ parameters.servicePool }}' + timeoutInMinutes: ${{ parameters.serviceTimeout }} container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 413e8566c..e66ab239c 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -13,6 +13,7 @@ parameters: # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ pool: 'Prod Private Agent Pool' + timeout: 60 artifacts: | assets/icons assets/favicons @@ -25,6 +26,7 @@ parameters: image: devfra.azurecr.io/de.fraport.build/haskell tag: 8.10.4 pool: 'Prod Private Agent Pool DS3' + timeout: 1440 dependencies: [] artifacts: | .stack/ @@ -44,4 +46,5 @@ jobs: serviceName: ${{ service.name }} serviceBase: ${{ service.base }} servicePool: ${{ service.pool }} + serviceTimeout: ${{ service.timeout }} serviceArtifacts: ${{ service.artifacts }} \ No newline at end of file From c83ed1fc392807493fc8513a9ad47c7bcfc8156c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 02:39:28 +0100 Subject: [PATCH 202/355] build(Makefile): eliminate MOUNT_DIR in favor of PROJECT_DIR [skip ci] --- Makefile | 13 ++++--------- docker/frontend/Dockerfile | 11 +---------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index afa323438..f8ffe0602 100644 --- a/Makefile +++ b/Makefile @@ -22,10 +22,10 @@ export CONTAINER_FILE export CONTAINER_IDENT export CF_PREFIX export DEVELOP -export MOUNT_DIR=/mnt/fradrive export CONTAINER_ATTACHED export CONTAINER_INIT export CONTAINER_CLEANUP +export PROJECT_DIR=/fradrive export SERVICE export SERVICE_VARIANT ?= $(SERVICE) @@ -210,15 +210,10 @@ rebuild-%: ifeq "$(IMAGE)" "localhost/fradrive/$(SERVICE)" rm -f .Dockerfile ln -s docker/$(SERVICE)/Dockerfile .Dockerfile - MOUNT_DIR=/mnt/fradrive; \ - PROJECT_DIR=/mnt/fradrive; \ - if [ "$(IN_CI)" == "true" ] ; then \ - PROJECT_DIR=/fradrive; \ - fi; \ + PROJECT_DIR=/fradrive; \ if [ "$(IN_CONTAINER)" == "false" ] ; then \ $(CONTAINER_COMMAND) build $(NO_CACHE) \ - -v $(PWD):$${MOUNT_DIR}:rw \ - --build-arg MOUNT_DIR=$(MOUNT_DIR) \ + -v $(PWD):$${PROJECT_DIR}:rw \ --build-arg PROJECT_DIR=$${PROJECT_DIR} \ --env IN_CONTAINER=true \ --env JOB=$(JOB) \ @@ -240,7 +235,7 @@ endif IMAGE=$(IMAGE) ; \ fi ; \ CONTAINER_ID=`$(CONTAINER_BGRUN) \ - -v $(PWD):$(MOUNT_DIR) \ + -v $(PWD):$(PROJECT_DIR):rw \ --env IN_CONTAINER=true \ --env CONTAINER_FILE=$(CONTAINER_FILE) \ --env CONTAINER_NAME=$${CONTAINER_NAME} \ diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 53ccb5a54..9edc97a84 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -19,20 +19,11 @@ RUN if [ ! -z "${HTTP_PROXY}" ]; then npm config set proxy ${HTTP_PROXY}; fi RUN if [ ! -z "${FRAPORT_NOPROXY}" ]; then npm config set noproxy "${FRAPORT_NOPROXY}"; fi ENV NODE_EXTRA_CA_CERTS="/etc/ssl/certs/ca-certificates.crt" -# locally these two should be identical, so that compilation results are written out into the file dir. -# in CI-pipelines these two should be different, so that the container caches the compilation results. -ARG MOUNT_DIR=/mnt/fradrive ENV PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} -RUN --mount=type=bind,source=.,target=${MOUNT_DIR},rw if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} RUN if [ ! -z "${NPM_CUSTOM_REGISTRY}" ]; then \ printf 'registry=${NPM_CUSTOM_REGISTRY}' > .npmrc \ -; fi - -# RUN make -- --dependencies-frontend IN_CONTAINER=true - -# ENV FRADRIVE_MAKE_TARGET=--compile-frontend -# ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN} PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file +; fi \ No newline at end of file From 2af27e2624909f6837ae1c766679586bb0f2c019 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:04:52 +0100 Subject: [PATCH 203/355] build(docker/backend): refactor backend Dockerfile --- docker/backend/Dockerfile | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index a43d1ffec..9b9d874ca 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -25,42 +25,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english -# locally these two should be identical, so that compilation results are written out into the file dir. -# in CI-pipelines these two should be different, so that the container caches the compilation results. -ARG MOUNT_DIR=/mnt/fradrive -ARG PROJECT_DIR=/fradrive - +ENV PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" -# RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi - -ENV STACK_ROOT="/.stack" - WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} +ENV STACK_ROOT="/.stack" RUN --mount=type=bind,source=.,target=.,rw stack install yesod-bin -RUN --mount=type=bind,source=.,target=.,rw stack install hpack - -# pre-build dependencies -RUN --mount=type=bind,source=.,target=.,rw \ -make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} - -# copy source files -#COPY app/ ${PROJECT_DIR}/app -#COPY src/ ${PROJECT_DIR}/src -#COPY models/ ${PROJECT_DIR}/models -#COPY messages/ ${PROJECT_DIR}/messages -#COPY templates/ ${PROJECT_DIR}/templates -#COPY test/ ${PROJECT_DIR}/test -#COPY testdata/ ${PROJECT_DIR}/testdata - -# copy frontend files -#COPY assets/ ${PROJECT_DIR}/assets -#COPY static/ ${PROJECT_DIR}/static -#COPY well-known/ ${PROJECT_DIR}/well-known - -ENV FRADRIVE_MAKE_TARGET=--start-backend -ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}" JOB="${JOB}" SRC="${SRC}" - -EXPOSE 3000/tcp -EXPOSE 3443/tcp \ No newline at end of file +RUN --mount=type=bind,source=.,target=.,rw stack install hpack \ No newline at end of file From 89326ded56d8d29a9c291b8de5bded229d21523c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:08:03 +0100 Subject: [PATCH 204/355] ci(azure-pipelines): use PROJECT_DIR on repository path [skip ci] --- .azure-pipelines/templates/service.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index b48acb65f..0da5d6e8e 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -63,8 +63,7 @@ jobs: --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ - --build-arg MOUNT_DIR=$(Build.Repository.LocalPath) \ - --build-arg PROJECT_DIR=/fradrive \ + --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ --build-arg IN_CI=true \ --build-arg IN_CONTAINER=true \ . From 3549cd1649d3db8f2d21e1d675135ba62439194d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:34:22 +0100 Subject: [PATCH 205/355] ci(azure-pipelines): separate services into stages --- .azure-pipelines/templates/service.yaml | 182 ++++++++++++------------ azure-pipelines.yaml | 2 +- 2 files changed, 93 insertions(+), 91 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 0da5d6e8e..095ebcd5a 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -29,94 +29,96 @@ parameters: - lint - test -jobs: - - job: ImageBuild_${{parameters.serviceName}} - displayName: Build ${{parameters.serviceName}} image - condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) - pool: '${{ parameters.servicePool }}' - timeoutInMinutes: ${{ parameters.serviceTimeout }} - container: - image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 - endpoint: devfra - steps: - - checkout: self - - task: Docker@2 - displayName: Login to container registry - inputs: - command: login - containerRegistry: devFra - - script: | - ls -a . - pwd - find . - - task: Bash@3 - displayName: Build ${{parameters.serviceName}} image - inputs: - targetType: inline - script: | - cp docker/${{parameters.serviceName}}/Dockerfile . - docker build \ - --tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) \ - --build-arg FROM_IMG=${{parameters.serviceBase.image}} \ - --build-arg FROM_TAG=${{parameters.serviceBase.tag}} \ - --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ - --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ - --build-arg IN_CI=true \ - --build-arg IN_CONTAINER=true \ - . - - task: Bash@3 - displayName: Push ${{ parameters.serviceName }} image - inputs: - targetType: inline - script: | - docker push $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) - - task: Bash@3 - displayName: Update latest ${{parameters.serviceName}} image - condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true)) - inputs: - targetType: inline - script: | - docker tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) $(imageUpstream)/${{parameters.serviceName}}:latest - docker push $(imageUpstream)/${{parameters.serviceName}}:latest - - task: Docker@2 - displayName: Logout from container registry - inputs: - command: logout - containerRegistry: devFra +stages: + - stage: ${{ parameters.serviceName }} + jobs: + - job: ImageBuild_${{parameters.serviceName}} + displayName: Build ${{parameters.serviceName}} image + condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + pool: '${{ parameters.servicePool }}' + timeoutInMinutes: ${{ parameters.serviceTimeout }} + container: + image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 + endpoint: devfra + steps: + - checkout: self + - task: Docker@2 + displayName: Login to container registry + inputs: + command: login + containerRegistry: devFra + - script: | + ls -a . + pwd + find . + - task: Bash@3 + displayName: Build ${{parameters.serviceName}} image + inputs: + targetType: inline + script: | + cp docker/${{parameters.serviceName}}/Dockerfile . + docker build \ + --tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) \ + --build-arg FROM_IMG=${{parameters.serviceBase.image}} \ + --build-arg FROM_TAG=${{parameters.serviceBase.tag}} \ + --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ + --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ + --build-arg IN_CI=true \ + --build-arg IN_CONTAINER=true \ + . + - task: Bash@3 + displayName: Push ${{ parameters.serviceName }} image + inputs: + targetType: inline + script: | + docker push $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) + - task: Bash@3 + displayName: Update latest ${{parameters.serviceName}} image + condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true)) + inputs: + targetType: inline + script: | + docker tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) $(imageUpstream)/${{parameters.serviceName}}:latest + docker push $(imageUpstream)/${{parameters.serviceName}}:latest + - task: Docker@2 + displayName: Logout from container registry + inputs: + command: logout + containerRegistry: devFra - - job: Build_${{parameters.serviceName}} - displayName: Build ${{parameters.serviceName}} - dependsOn: - - ImageBuild_${{parameters.serviceName}} - condition: in(dependencies.ImageBuild_${{parameters.serviceName}}.result, 'Succeeded', 'Skipped') - pool: '${{ parameters.servicePool }}' - container: - # TODO: use BuildNumber instead of latest in update branches - # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) - image: $(imageUpstream)/${{parameters.serviceName}}:latest - endpoint: devfra - env: - PROJECT_DIR: $(Build.Repository.LocalPath) - IN_CONTAINER: true - IN_CI: true - steps: - - checkout: self - - ${{ each buildStep in parameters.buildSteps }}: - - template: ./service/build-step.yaml - parameters: - service: ${{ parameters.serviceName }} - buildStep: ${{ buildStep }} - - task: CopyFiles@2 - displayName: Copy ${{parameters.serviceName}} artifacts - inputs: - Contents: ${{ parameters.serviceArtifacts }} - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: PublishBuildArtifacts@1 - displayName: Publish ${{parameters.serviceName}} artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '${{parameters.serviceName}}' - publishLocation: 'Container' \ No newline at end of file + - job: Build_${{parameters.serviceName}} + displayName: Build ${{parameters.serviceName}} + dependsOn: + - ImageBuild_${{parameters.serviceName}} + condition: in(dependencies.ImageBuild_${{parameters.serviceName}}.result, 'Succeeded', 'Skipped') + pool: '${{ parameters.servicePool }}' + container: + # TODO: use BuildNumber instead of latest in update branches + # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) + image: $(imageUpstream)/${{parameters.serviceName}}:latest + endpoint: devfra + env: + PROJECT_DIR: $(Build.Repository.LocalPath) + IN_CONTAINER: true + IN_CI: true + steps: + - checkout: self + - ${{ each buildStep in parameters.buildSteps }}: + - template: ./service/build-step.yaml + parameters: + service: ${{ parameters.serviceName }} + buildStep: ${{ buildStep }} + - task: CopyFiles@2 + displayName: Copy ${{parameters.serviceName}} artifacts + inputs: + Contents: ${{ parameters.serviceArtifacts }} + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + displayName: Publish ${{parameters.serviceName}} artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '${{parameters.serviceName}}' + publishLocation: 'Container' \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e66ab239c..8e0415472 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -39,7 +39,7 @@ variables: pool: 'Prod Private Agent Pool' -jobs: +stages: - ${{ each service in parameters.services }}: - template: .azure-pipelines/templates/service.yaml parameters: From cfa669bda6996b788a78f193611df6119ebaf72e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:35:47 +0100 Subject: [PATCH 206/355] ci(azure-pipelines): move pool definition to stage level --- .azure-pipelines/templates/service.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 095ebcd5a..99354335e 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -31,11 +31,11 @@ parameters: stages: - stage: ${{ parameters.serviceName }} + pool: '${{ parameters.servicePool }}' jobs: - job: ImageBuild_${{parameters.serviceName}} displayName: Build ${{parameters.serviceName}} image condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) - pool: '${{ parameters.servicePool }}' timeoutInMinutes: ${{ parameters.serviceTimeout }} container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 @@ -94,7 +94,6 @@ stages: dependsOn: - ImageBuild_${{parameters.serviceName}} condition: in(dependencies.ImageBuild_${{parameters.serviceName}}.result, 'Succeeded', 'Skipped') - pool: '${{ parameters.servicePool }}' container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From 609e4310da9efcd3e338b3d6938dd79621527f3a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:47:24 +0100 Subject: [PATCH 207/355] ci(azure-pipelines): add service dependencies --- .azure-pipelines/templates/service.yaml | 4 ++++ azure-pipelines.yaml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 99354335e..9a962e174 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -18,6 +18,9 @@ parameters: type: number default: 60 # extraBuildOptions: '' + - name: serviceDependencies + type: object + default: [] - name: serviceArtifacts type: string default: '' @@ -31,6 +34,7 @@ parameters: stages: - stage: ${{ parameters.serviceName }} + dependsOn: ${{ parameters.serviceDependencies }} pool: '${{ parameters.servicePool }}' jobs: - job: ImageBuild_${{parameters.serviceName}} diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8e0415472..b3fbe187e 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -14,6 +14,7 @@ parameters: # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ pool: 'Prod Private Agent Pool' timeout: 60 + dependencies: [] artifacts: | assets/icons assets/favicons @@ -27,7 +28,8 @@ parameters: tag: 8.10.4 pool: 'Prod Private Agent Pool DS3' timeout: 1440 - dependencies: [] + dependencies: + - frontend artifacts: | .stack/ .stack-work/ @@ -47,4 +49,5 @@ stages: serviceBase: ${{ service.base }} servicePool: ${{ service.pool }} serviceTimeout: ${{ service.timeout }} + serviceDependencies: ${{ service.dependencies }} serviceArtifacts: ${{ service.artifacts }} \ No newline at end of file From 3f9abfdcc2a276066e47b6d2f6ea23d587f0e08d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:55:28 +0100 Subject: [PATCH 208/355] build(docker/backend): tweak stack root, remove mounts [skip ci] --- docker/backend/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 9b9d874ca..c8a4be22c 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -29,7 +29,7 @@ ENV PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -ENV STACK_ROOT="/.stack" +ENV STACK_ROOT="${PROJECT_DIR}/.stack" -RUN --mount=type=bind,source=.,target=.,rw stack install yesod-bin -RUN --mount=type=bind,source=.,target=.,rw stack install hpack \ No newline at end of file +RUN stack install yesod-bin +RUN stack install hpack \ No newline at end of file From d5e4e677794b4e4bc014ff159461e674cbe9aab1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 11:59:27 +0100 Subject: [PATCH 209/355] ci(azure-pipelines): download artifacts from dependencies for services --- .azure-pipelines/templates/service.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 9a962e174..1e27a5263 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -109,6 +109,9 @@ stages: IN_CI: true steps: - checkout: self + - ${{ each dep in parameters.serviceDependencies }}: + - download: current + artifact: ${{ dep }} - ${{ each buildStep in parameters.buildSteps }}: - template: ./service/build-step.yaml parameters: From e2cb0edec5172ce439cea65a954e303ddde77069 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 12:37:14 +0100 Subject: [PATCH 210/355] ci(azure-pipelines): refine artifacts paths --- azure-pipelines.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b3fbe187e..f0671b597 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -16,10 +16,11 @@ parameters: timeout: 60 dependencies: [] artifacts: | - assets/icons - assets/favicons - static/ - well-known/ + assets/icons/fradrive/*.svg + assets/favicons/*.png + assets/favicons/include.html + static/**/* + well-known/**/* frontend/src/env.sass config/manifest.json - name: backend @@ -31,8 +32,8 @@ parameters: dependencies: - frontend artifacts: | - .stack/ - .stack-work/ + bin/uniworx + bin/uniworxdb variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 114bceb57e853e542187d4e4c38ed88225bdaca3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 12:37:46 +0100 Subject: [PATCH 211/355] build(frontend): add karma-esbuild to package lock [skip ci] --- package-lock.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8c1a92f30..90fa3f82d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,7 @@ "karma-browserify": "^8.1.0", "karma-chrome-launcher": "^3.2.0", "karma-cli": "^2.0.0", + "karma-esbuild": "^2.3.0", "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.1.0", "karma-mocha-reporter": "^2.2.5", @@ -10113,6 +10114,20 @@ "node": ">= 6" } }, + "node_modules/karma-esbuild": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/karma-esbuild/-/karma-esbuild-2.3.0.tgz", + "integrity": "sha512-iW3DjSGohEEkufSDmXRPZP7CNP0ye+Xt8fBCcenLqPL2u8+VHZYwlzwYyfs60vjhdf1i04xekhzI7gu8as1CLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.1", + "source-map": "0.6.1" + }, + "peerDependencies": { + "esbuild": ">=0.17.0" + } + }, "node_modules/karma-jasmine": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", From e8adb2c27d0290fd1a928e98a7d22b09ceee5717 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 13:26:45 +0100 Subject: [PATCH 212/355] build(azure-pipelines): do not download redundant stack packages in ci --- docker/backend/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index c8a4be22c..2fad3d695 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -31,5 +31,7 @@ WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} ENV STACK_ROOT="${PROJECT_DIR}/.stack" -RUN stack install yesod-bin -RUN stack install hpack \ No newline at end of file +RUN [ if ! -z "${IN_CI}" ]; then \ + stack install yesod-bin; \ + stack install hpack; \ +fi \ No newline at end of file From e02c66de1a2c39b1ff137a2e6018abd42ea656cd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 13:42:07 +0100 Subject: [PATCH 213/355] build(docker/backend): fix syntax [skip ci] --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 2fad3d695..9741a6a87 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -31,7 +31,7 @@ WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} ENV STACK_ROOT="${PROJECT_DIR}/.stack" -RUN [ if ! -z "${IN_CI}" ]; then \ +RUN if [ ! -z "${IN_CI}" ]; then \ stack install yesod-bin; \ stack install hpack; \ fi \ No newline at end of file From 6dc59e509833a852ec8b81a82d1921fa8f94a643 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 14:04:52 +0100 Subject: [PATCH 214/355] build(docker/backend): let stack manage its root dir --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 9741a6a87..9999f898e 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -29,7 +29,7 @@ ENV PROJECT_DIR=/fradrive RUN mkdir -p "${PROJECT_DIR}" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -ENV STACK_ROOT="${PROJECT_DIR}/.stack" +# ENV STACK_ROOT="${PROJECT_DIR}/.stack" RUN if [ ! -z "${IN_CI}" ]; then \ stack install yesod-bin; \ From b739c664446ddd930d039b4a4b6bace13f604128 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 14:19:30 +0100 Subject: [PATCH 215/355] build(docker/backend): allow PROJECT_DIR access for everyone [skip ci] --- docker/backend/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 9999f898e..2c4f9e39c 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -26,10 +26,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english ENV PROJECT_DIR=/fradrive -RUN mkdir -p "${PROJECT_DIR}" +RUN mkdir -m 777 -p "${PROJECT_DIR}" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} -# ENV STACK_ROOT="${PROJECT_DIR}/.stack" +ENV STACK_ROOT="${PROJECT_DIR}/.stack" RUN if [ ! -z "${IN_CI}" ]; then \ stack install yesod-bin; \ From 082ce971aa94967ddba0baafe4a38d36124ed99f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 14:39:03 +0100 Subject: [PATCH 216/355] build(docker/backend): allow even more for PROJECT_DIR --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 2c4f9e39c..a8b3f29ed 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -26,7 +26,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english ENV PROJECT_DIR=/fradrive -RUN mkdir -m 777 -p "${PROJECT_DIR}" +RUN mkdir -m 7777 -p "${PROJECT_DIR}" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} ENV STACK_ROOT="${PROJECT_DIR}/.stack" From 1dd5c5dd79e984bf54cf056a19ad4c6351740ac0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 14:42:59 +0100 Subject: [PATCH 217/355] build(docker/backend): chmod PROJECT_DIR permissions separately [skip ci] --- docker/backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index a8b3f29ed..79e3f46f3 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -26,7 +26,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english ENV PROJECT_DIR=/fradrive -RUN mkdir -m 7777 -p "${PROJECT_DIR}" +RUN mkdir -p "${PROJECT_DIR}"; chmod -R 7777 "${PROJECT_DIR}" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} ENV STACK_ROOT="${PROJECT_DIR}/.stack" From e997616e335b28ea96ee1f6758a99d0c4ff81db3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 15:28:00 +0100 Subject: [PATCH 218/355] build(Makefile): chown PROJECT_DIR before building backend dependencies [skip ci] --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index f8ffe0602..49ae3443f 100644 --- a/Makefile +++ b/Makefile @@ -276,6 +276,7 @@ endif stack build $(STACK_CORES) --fast --profile --library-profiling --executable-profiling --flag uniworx:-library-only $(--DEVELOPMENT) --local-bin-path $$(pwd)/bin --copy-bins # HELP(dependencies-backend): (re-)build backend dependencies --dependencies-backend: #uniworx.cabal + chown -R `id -un`:`id -gn` "$(PROJECT_DIR)"; \ stack build -j2 --only-dependencies # HELP(lint-backend): lint backend --lint-backend: From 7e1cddfa462c00bddf36eb8d258476fd84ceca02 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 15:50:38 +0100 Subject: [PATCH 219/355] build(docker/backend): use PROJECT_DIR as build-arg and env [skip ci] --- docker/backend/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 79e3f46f3..2fb91d587 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -25,7 +25,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt-get -y update && apt-get -y install texlive-latex-recommended texlive-luatex texlive-plain-generic texlive-lang-german texlive-lang-english -ENV PROJECT_DIR=/fradrive +ARG PROJECT_DIR=/fradrive +ENV PROJECT_DIR=${PROJECT_DIR} RUN mkdir -p "${PROJECT_DIR}"; chmod -R 7777 "${PROJECT_DIR}" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} From 39ab2ce8a19cb6f5b3a6460d58bdb316b7c1021e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 24 Jan 2025 19:13:53 +0100 Subject: [PATCH 220/355] ci(azure-pipelines): move build timeout to build instead of image build --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 1e27a5263..61c87300f 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -40,7 +40,6 @@ stages: - job: ImageBuild_${{parameters.serviceName}} displayName: Build ${{parameters.serviceName}} image condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) - timeoutInMinutes: ${{ parameters.serviceTimeout }} container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra @@ -98,6 +97,7 @@ stages: dependsOn: - ImageBuild_${{parameters.serviceName}} condition: in(dependencies.ImageBuild_${{parameters.serviceName}}.result, 'Succeeded', 'Skipped') + timeoutInMinutes: ${{ parameters.serviceTimeout }} container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) From 93f968a03b155c22d20b95474dede90ce6495c23 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 26 Jan 2025 14:49:35 +0100 Subject: [PATCH 221/355] ci(azure-pipelines): copy artifacts from service dependencies --- .azure-pipelines/templates/service.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 61c87300f..2e4a9a613 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -111,7 +111,13 @@ stages: - checkout: self - ${{ each dep in parameters.serviceDependencies }}: - download: current + displayName: Download artifacts from ${{ dep }} dependency artifact: ${{ dep }} + - task: CopyFiles@2 + displayName: Copy artifacts from ${{ dep }} dependency + inputs: + Contents: '$(Agent.WorkFolder)/${{dep}}' + TargetFolder: '$(Build.Repository.LocalPath)' - ${{ each buildStep in parameters.buildSteps }}: - template: ./service/build-step.yaml parameters: From 96f735a2f523718211d1d353126feb8874b09b80 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 02:08:19 +0100 Subject: [PATCH 222/355] ci(azure-pipelines): use DownloadPipelineArtifact task for more granular control --- .azure-pipelines/templates/service.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 2e4a9a613..d764be972 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -110,14 +110,12 @@ stages: steps: - checkout: self - ${{ each dep in parameters.serviceDependencies }}: - - download: current + - task: DownloadPipelineArtifact@2 displayName: Download artifacts from ${{ dep }} dependency - artifact: ${{ dep }} - - task: CopyFiles@2 - displayName: Copy artifacts from ${{ dep }} dependency inputs: - Contents: '$(Agent.WorkFolder)/${{dep}}' - TargetFolder: '$(Build.Repository.LocalPath)' + artifact: ${{ dep }} + patterns: '**/*' + path: '$(Build.Repository.LocalPath)' - ${{ each buildStep in parameters.buildSteps }}: - template: ./service/build-step.yaml parameters: From 2b7412d27e818377a20fc44d9bfe0edfaee8860e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 02:22:46 +0100 Subject: [PATCH 223/355] ci(azure-pipelines): add debug print before dependency build --- .azure-pipelines/templates/service.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index d764be972..359190454 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -117,6 +117,8 @@ stages: patterns: '**/*' path: '$(Build.Repository.LocalPath)' - ${{ each buildStep in parameters.buildSteps }}: + - script: | + find . - template: ./service/build-step.yaml parameters: service: ${{ parameters.serviceName }} From 9e7631deebb0b244601977d0d9b6e610b1a5324e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 13:11:56 +0100 Subject: [PATCH 224/355] ci(azure-pipelines): remove debug print step --- .azure-pipelines/templates/service.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 359190454..d764be972 100644 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -117,8 +117,6 @@ stages: patterns: '**/*' path: '$(Build.Repository.LocalPath)' - ${{ each buildStep in parameters.buildSteps }}: - - script: | - find . - template: ./service/build-step.yaml parameters: service: ${{ parameters.serviceName }} From 4ea031ed6bc3981da239997b8bef81d06cf2cd79 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 13:37:49 +0100 Subject: [PATCH 225/355] refactor(backend): hlint --- src/Crypto/Saltine/Instances.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Crypto/Saltine/Instances.hs b/src/Crypto/Saltine/Instances.hs index e4b812212..8bbc259e0 100644 --- a/src/Crypto/Saltine/Instances.hs +++ b/src/Crypto/Saltine/Instances.hs @@ -1,7 +1,7 @@ -{-# LANGUAGE BangPatterns #-} +-- {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wwarn #-} --- SPDX-FileCopyrightText: 2024 Sarah Vaupel +-- SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel -- -- SPDX-License-Identifier: AGPL-3.0-or-later @@ -50,7 +50,7 @@ buildUnsafeByteString' n k = do -- | Convenience function for accessing constant C strings constByteStrings :: [ByteString] -> ([CStringLen] -> IO b) -> IO b constByteStrings = - foldr (\v kk -> \k -> (unsafeUseAsCStringLen v) (\a -> kk (\as -> k (a:as)))) ($ []) + foldr (\v kk k -> unsafeUseAsCStringLen v (\a -> kk (\as -> k (a:as)))) ($ []) -- | bin2hex conversion for showing various binary types foreign import ccall unsafe "sodium_bin2hex" From a2dbb1f5f354b19f5ef025a7bca6b630976b4efc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:13:00 +0100 Subject: [PATCH 226/355] ci(azure-pipelines): add .stack dir contents to backend artifacts for dependency caching --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 azure-pipelines.yaml diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml old mode 100644 new mode 100755 index f0671b597..f72221653 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -34,6 +34,7 @@ parameters: artifacts: | bin/uniworx bin/uniworxdb + .stack/**/* variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 204d57cb96519b4ae16c9cce081acecde2b3ef53 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:20:36 +0100 Subject: [PATCH 227/355] ci(azure-pipelines): add more params to dependencies --- .azure-pipelines/templates/service.yaml | 8 ++++---- azure-pipelines.yaml | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) mode change 100644 => 100755 .azure-pipelines/templates/service.yaml diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml old mode 100644 new mode 100755 index d764be972..bebfce62d --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -109,12 +109,12 @@ stages: IN_CI: true steps: - checkout: self - - ${{ each dep in parameters.serviceDependencies }}: + - ${{ each dependency in parameters.serviceDependencies }}: - task: DownloadPipelineArtifact@2 - displayName: Download artifacts from ${{ dep }} dependency + displayName: Download artifacts from ${{ dependency.name }} dependency inputs: - artifact: ${{ dep }} - patterns: '**/*' + artifact: ${{ dependency.artifact }} + patterns: '${{ dependency.patterns }}' path: '$(Build.Repository.LocalPath)' - ${{ each buildStep in parameters.buildSteps }}: - template: ./service/build-step.yaml diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index f72221653..147261ddd 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -30,7 +30,9 @@ parameters: pool: 'Prod Private Agent Pool DS3' timeout: 1440 dependencies: - - frontend + - name: frontend + artifact: frontend + patterns: '**/*' artifacts: | bin/uniworx bin/uniworxdb From 422f6bc5b5074b54699e450dbefca70e1224360b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:35:46 +0100 Subject: [PATCH 228/355] ci(azure-pipelines): add more parameters to service dependencies; allow downloading dependencies from previous runs --- .azure-pipelines/templates/service.yaml | 11 +++++++++-- azure-pipelines.yaml | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index bebfce62d..d7fec499c 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -113,9 +113,16 @@ stages: - task: DownloadPipelineArtifact@2 displayName: Download artifacts from ${{ dependency.name }} dependency inputs: - artifact: ${{ dependency.artifact }} + artifactName: ${{ dependency.artifact }} + source: ${{ dependency.source }} + project: $(Build.TriggeredBy.ProjectID) + pipeline: $(System.DefinitionId) + buildVersionToDownload: '${{ dependency.version }}' + tags: '${{ dependency.artifact }}' + allowPartiallySucceededBuilds: true + allowFailedBuilds: true patterns: '${{ dependency.patterns }}' - path: '$(Build.Repository.LocalPath)' + targetPath: '$(Build.Repository.LocalPath)' - ${{ each buildStep in parameters.buildSteps }}: - template: ./service/build-step.yaml parameters: diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 147261ddd..3a70f6c4e 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -31,6 +31,8 @@ parameters: timeout: 1440 dependencies: - name: frontend + source: current + version: 'latest' artifact: frontend patterns: '**/*' artifacts: | From 09ccd12b295d6fdafdb70406a959a5a01bc9f8ef Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:36:37 +0100 Subject: [PATCH 229/355] ci(azure-pipelines): add backend-dependencies dep for backend job --- azure-pipelines.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3a70f6c4e..4012cac1a 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -35,6 +35,11 @@ parameters: version: 'latest' artifact: frontend patterns: '**/*' + - name: backend-dependencies + source: specific + version: 'latestFromBranch' + artifact: backend + patterns: '.stack/**/*' artifacts: | bin/uniworx bin/uniworxdb From c7ee91d26b7feb1be15e5784eb3e8f6fcc3c3be5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:40:15 +0100 Subject: [PATCH 230/355] ci(azure-pipelines): distinguish between dependsOn and requiredArtifacts --- .azure-pipelines/templates/service.yaml | 5 ++++- azure-pipelines.yaml | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index d7fec499c..61a1922ff 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -18,7 +18,10 @@ parameters: type: number default: 60 # extraBuildOptions: '' - - name: serviceDependencies + - name: serviceDependsOn + type: object + default: [] + - name: serviceRequiredArtifacts type: object default: [] - name: serviceArtifacts diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 4012cac1a..7da44747d 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -29,7 +29,9 @@ parameters: tag: 8.10.4 pool: 'Prod Private Agent Pool DS3' timeout: 1440 - dependencies: + dependsOn: + - frontend + requiredArtifacts: - name: frontend source: current version: 'latest' @@ -60,5 +62,6 @@ stages: serviceBase: ${{ service.base }} servicePool: ${{ service.pool }} serviceTimeout: ${{ service.timeout }} - serviceDependencies: ${{ service.dependencies }} + serviceDependsOn: ${{ service.dependsOn }} + serviceRequiredArtifacts: ${{ service.requiredArtifacts }} serviceArtifacts: ${{ service.artifacts }} \ No newline at end of file From 2200b8512000fed9082ee3fd5e4751f0e7e92bef Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:41:50 +0100 Subject: [PATCH 231/355] ci(azure-pipelines): fix param refs --- .azure-pipelines/templates/service.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 61a1922ff..a1eea455d 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -37,7 +37,7 @@ parameters: stages: - stage: ${{ parameters.serviceName }} - dependsOn: ${{ parameters.serviceDependencies }} + dependsOn: ${{ parameters.serviceDependsOn }} pool: '${{ parameters.servicePool }}' jobs: - job: ImageBuild_${{parameters.serviceName}} @@ -112,7 +112,7 @@ stages: IN_CI: true steps: - checkout: self - - ${{ each dependency in parameters.serviceDependencies }}: + - ${{ each dependency in parameters.serviceRequiredArtifacts }}: - task: DownloadPipelineArtifact@2 displayName: Download artifacts from ${{ dependency.name }} dependency inputs: From 9fc8ba231536dcd5f45037ffe7b3ffb2c95fed2c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 17:42:45 +0100 Subject: [PATCH 232/355] ci(azure-pipelines): fix params --- azure-pipelines.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7da44747d..cd26e7d4e 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -14,7 +14,8 @@ parameters: # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ pool: 'Prod Private Agent Pool' timeout: 60 - dependencies: [] + dependsOn: [] + requiredArtifacts: [] artifacts: | assets/icons/fradrive/*.svg assets/favicons/*.png From 0988079b86d1bd6fec658d5dad32f3846c6e9120 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 18:02:19 +0100 Subject: [PATCH 233/355] ci(azure-pipelines): fix artifact project --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index a1eea455d..5b8b14f1f 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: $(Build.TriggeredBy.ProjectID) + project: '$(Build.Repository.Name)' pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From 100422db415392fd89a96df7d5dd6274316eb54e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 18:08:43 +0100 Subject: [PATCH 234/355] ci(azure-pipelines): fix artifact project contd --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 5b8b14f1f..2321c6242 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: '$(Build.Repository.Name)' + project: $(Build.Repository.Uri) pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From 83a92b05dd1fd05331a76577aecf490538c99f67 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2025 19:04:22 +0100 Subject: [PATCH 235/355] ci(azure-pipelines): try collection id as artifacts download project --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 2321c6242..c690bac0d 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: $(Build.Repository.Uri) + project: $(System.CollectionId) pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From ecfc0f74618c875cab64b90682ae49e127363bb6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 10:12:05 +0100 Subject: [PATCH 236/355] build(docker/fradrive): prepare fradrive Dockerfile for release [skip ci] --- docker/fradrive/Dockerfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) mode change 100644 => 100755 docker/fradrive/Dockerfile diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile old mode 100644 new mode 100755 index 9a19f1def..4457f7de6 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -1,16 +1,17 @@ -FROM debian:12.5 +ARG FROM_IMG=docker.io/library/debian +ARG FROM_TAG=12.5 -RUN apt-get -y update +FROM ${FROM_IMG}:${FROM_TAG} -# setup locales +# Setup locales RUN apt-get -y install locales locales-all RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 -# Binary runtime dependencies +# FraDrive runtime dependencies # TODO: minimize texlive dependencies, switch to basic schemes where possible -RUN apt-get -y install texlive-latex-recommended texlive-latex-extra texlive-luatex texlive-fonts-recommended texlive-fonts-extra texlive-lang-english texlive-lang-german +# RUN apt-get -y install texlive-latex-recommended texlive-latex-extra texlive-luatex texlive-fonts-recommended texlive-fonts-extra texlive-lang-english texlive-lang-german # Add uniworx user and directories RUN mkdir -p /var/lib @@ -20,10 +21,12 @@ RUN useradd -r -g uniworx -d /var/lib/uniworx -M uniworx --uid 999 RUN mkdir -p /var/lib/uniworx && chown -R uniworx:uniworx /var/lib/uniworx RUN mkdir -p /var/log/uniworx && chown -R uniworx:uniworx /var/log/uniworx -# TODO: is this still needed? +# Install FraDrive binaries # RUN install -d -g uniworx -o uniworx -m 0750 /var/lib/uniworx # RUN install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx -RUN cp /tmp/uniworx-bin/uniworx /usr/bin/uniworx +COPY uniworx /usr/bin/uniworx +COPY uniworxdb /usr/bin/uniworx +# COPY uniworxload /usr/bin/uniworx USER uniworx ENTRYPOINT fradrive-entrypoint.sh From 8a22a86399c4a2ce15904cbdcac97b443edb7617 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 10:24:44 +0100 Subject: [PATCH 237/355] ci(azure-pipelines): add release stage and image build --- azure-pipelines.yaml | 50 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index cd26e7d4e..089a5096f 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -56,6 +56,7 @@ variables: pool: 'Prod Private Agent Pool' stages: + - ${{ each service in parameters.services }}: - template: .azure-pipelines/templates/service.yaml parameters: @@ -65,4 +66,51 @@ stages: serviceTimeout: ${{ service.timeout }} serviceDependsOn: ${{ service.dependsOn }} serviceRequiredArtifacts: ${{ service.requiredArtifacts }} - serviceArtifacts: ${{ service.artifacts }} \ No newline at end of file + serviceArtifacts: ${{ service.artifacts }} + +- stage: release + dependsOn: + - backend + jobs: + - job: test + displayName: Release fradrive-test + condition: eq(variables.releaseTest, true) + container: + image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 + endpoint: devfra + steps: + - checkout: self + - task: DownloadPipelineArtifact@2 + displayName: Download binaries + inputs: + artifactName: backend + patterns: 'uniworx,uniworxdb' + targetPath: '$(Build.Repository.LocalPath)' + - script: | + ls -a . + pwd + find . + - task: Docker@2 + displayName: Login to container registry + inputs: + command: login + containerRegistry: devFra + - task: Bash@3 + displayName: Build container + inputs: + targetType: inline + script: | + cp docker/fradrive/Dockerfile . + docker build \ + --tag $(imageUpstream)/fradrive:$(Build.BuildNumber) \ + --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.trusted/ubuntu \ + --build-arg FROM_TAG=20.04 \ + --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ + --build-arg IN_CI=true \ + --build-arg IN_CONTAINER=true \ + . + - task: Docker@2 + displayName: Logout from container registry + inputs: + command: logout + containerRegistry: devFra \ No newline at end of file From 55531ef692031f1e70dda12aa3ea74a7f6ab7c85 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 11:01:53 +0100 Subject: [PATCH 238/355] ci(azure-pipelines): use project id for artifact download project --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index c690bac0d..a1eea455d 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: $(System.CollectionId) + project: $(Build.TriggeredBy.ProjectID) pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From 21ad3f06afeea0ff72b64eaa6930740e7d705bab Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 11:25:37 +0100 Subject: [PATCH 239/355] ci(azure-pipelines): try yaml-compiletime project def splice --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index a1eea455d..ad9deae36 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: $(Build.TriggeredBy.ProjectID) + project: ${{ Build.TriggeredBy.ProjectID }} pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From 96059f0a7b3e7f791a9df554810edfe44986a0db Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 11:26:18 +0100 Subject: [PATCH 240/355] ci(azure-pipelines): fix artifact project contd --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index ad9deae36..4fd5358e1 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: ${{ Build.TriggeredBy.ProjectID }} + project: '$(Build.TriggeredBy.ProjectID)' pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From 78d0d9e8536f06900402245e189b573a75bbecbf Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 11:34:05 +0100 Subject: [PATCH 241/355] ci(azure-pipelines): hardcode pipeline artifact download project --- .azure-pipelines/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 4fd5358e1..34b9efff1 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -118,7 +118,7 @@ stages: inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} - project: '$(Build.TriggeredBy.ProjectID)' + project: 'Fahrerausbildung' pipeline: $(System.DefinitionId) buildVersionToDownload: '${{ dependency.version }}' tags: '${{ dependency.artifact }}' From b14821e3b403437bd6133e3c860516a5d135ad9c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 12:14:11 +0100 Subject: [PATCH 242/355] ci(azure-pipelines): add continueOnError param to artifacts --- .azure-pipelines/templates/service.yaml | 1 + azure-pipelines.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 34b9efff1..f90dcc222 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -115,6 +115,7 @@ stages: - ${{ each dependency in parameters.serviceRequiredArtifacts }}: - task: DownloadPipelineArtifact@2 displayName: Download artifacts from ${{ dependency.name }} dependency + continueOnError: ${{ dependency.continueOnError }} inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 089a5096f..0b8e0b93b 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -38,11 +38,13 @@ parameters: version: 'latest' artifact: frontend patterns: '**/*' + continueOnError: false - name: backend-dependencies source: specific version: 'latestFromBranch' artifact: backend patterns: '.stack/**/*' + continueOnError: true artifacts: | bin/uniworx bin/uniworxdb From 311ba5234d2a5566b59c1ddd078916c91ed4adc0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 12:15:55 +0100 Subject: [PATCH 243/355] ci(azure-pipelines): add condition param to artifacts --- .azure-pipelines/templates/service.yaml | 1 + azure-pipelines.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index f90dcc222..17fa6bc63 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -116,6 +116,7 @@ stages: - task: DownloadPipelineArtifact@2 displayName: Download artifacts from ${{ dependency.name }} dependency continueOnError: ${{ dependency.continueOnError }} + condition: ${{ dependency.condition }} inputs: artifactName: ${{ dependency.artifact }} source: ${{ dependency.source }} diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0b8e0b93b..4f26b7ade 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -45,6 +45,7 @@ parameters: artifact: backend patterns: '.stack/**/*' continueOnError: true + condition: eq(variables.releaseTest, false) artifacts: | bin/uniworx bin/uniworxdb From 0a104db666ddb964992923587aee17dfac825f9a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 14:22:08 +0100 Subject: [PATCH 244/355] ci(azure-pipelines): add skipTests logic [skip ci] --- .azure-pipelines/templates/service.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 17fa6bc63..f2ae5f49a 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -32,8 +32,9 @@ parameters: default: - dependencies - compile - - lint - - test + - ${{ if eq(variables.skipTests, false) }}: + - lint + - test stages: - stage: ${{ parameters.serviceName }} From 3cbeba956ecf8496ee7bcf5798cc84d647c20718 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 29 Jan 2025 17:05:27 +0100 Subject: [PATCH 245/355] ci(azure-pipelines): fix buildSteps [skip ci] --- .azure-pipelines/templates/service.yaml | 6 ------ azure-pipelines.yaml | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index f2ae5f49a..576d8209c 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -29,12 +29,6 @@ parameters: default: '' - name: buildSteps type: object - default: - - dependencies - - compile - - ${{ if eq(variables.skipTests, false) }}: - - lint - - test stages: - stage: ${{ parameters.serviceName }} diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 4f26b7ade..05714176f 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -70,6 +70,16 @@ stages: serviceDependsOn: ${{ service.dependsOn }} serviceRequiredArtifacts: ${{ service.requiredArtifacts }} serviceArtifacts: ${{ service.artifacts }} + ${{ if eq(variables.skipTests, false) }}: + buildSteps: + - dependencies + - compile + - lint + - test + ${{ else }}: + buildSteps: + - dependencies + - compile - stage: release dependsOn: From 252641337a142d7d83929b1d8b182b532b642f3f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 3 Feb 2025 18:20:21 +0100 Subject: [PATCH 246/355] chore: tweak versioning script [skip ci] --- .gitlab-ci/version.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/version.pl b/.gitlab-ci/version.pl index 8a2e277a7..93aa64d23 100755 --- a/.gitlab-ci/version.pl +++ b/.gitlab-ci/version.pl @@ -7,7 +7,7 @@ use Data::Dumper; # Version changes: # v[x].[y].[z] -- Main version number -# v[x].[y].[z]-test-[branchstring]-num -- test/branch/devel version number +# v[x].[y].[z]-test-[branchstring]-[num] -- test/branch/devel version number # on main/master: Biggest version so far, increment by occuring changes # on other branches: find version; be it branch string, old format or main version number; # increments from there. Increment version number, but on global conflict use new version number @@ -52,12 +52,12 @@ my %parKinds = ( }, autokind=>{ arity=>1, - def=>'main=v,master=v,test=t,*=t', + def=>'release/prod=v,release/*=t,*=t', help=>'determine the tag kind from branch name instead of fixed value; use the first fitting glob', }, change=>{ arity=>1, - def=>'chore=patch,feat=minor,feature=minor,fix=patch,BREAK=major,perf=patch,refactor=patch,test=patch,style=patch,revert=null,docs=patch,build=null,ci=null', + def=>'chore=patch,feat=minor,feature=minor,fix=patch,BREAK=major,perf=patch,refactor=patch,test=patch,style=patch,revert=patch,docs=patch,build=patch,ci=patch', help=>'how to react on which commit type; can be partially given. Actions are: "null", "major", "minor", "patch" or state "invalid" for removing this type', }, changelog=>{ From c03fd0c81f7f97d012d035ff61fd5d6b2925d65c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 3 Feb 2025 18:22:36 +0100 Subject: [PATCH 247/355] chore: move version helper script to utils [skip ci] --- {.gitlab-ci => utils}/version.pl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.gitlab-ci => utils}/version.pl (100%) mode change 100755 => 100644 diff --git a/.gitlab-ci/version.pl b/utils/version.pl old mode 100755 new mode 100644 similarity index 100% rename from .gitlab-ci/version.pl rename to utils/version.pl From 0538142aa80733e70a6a3a14af06107c20224149 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 3 Feb 2025 18:24:46 +0100 Subject: [PATCH 248/355] ci(azure-pipelines): refer to devfra registry in lower-case only [skip ci] --- azure-pipelines.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 05714176f..98835ee1a 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -107,7 +107,7 @@ stages: displayName: Login to container registry inputs: command: login - containerRegistry: devFra + containerRegistry: devfra - task: Bash@3 displayName: Build container inputs: @@ -126,4 +126,4 @@ stages: displayName: Logout from container registry inputs: command: logout - containerRegistry: devFra \ No newline at end of file + containerRegistry: devfra \ No newline at end of file From 72920caf4c65c4663d6d977b85fd42ba6fd2a2dd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 3 Feb 2025 18:27:49 +0100 Subject: [PATCH 249/355] ci(azure-pipelines): fix release artifact patterns --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 98835ee1a..c9caab8b4 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -97,7 +97,7 @@ stages: displayName: Download binaries inputs: artifactName: backend - patterns: 'uniworx,uniworxdb' + patterns: 'bin/*' targetPath: '$(Build.Repository.LocalPath)' - script: | ls -a . From 4ec521361d4c4c0ef6302f245653f9969af995cc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 3 Feb 2025 18:30:58 +0100 Subject: [PATCH 250/355] build(Makefile): fix release target [skip ci] --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 49ae3443f..60564272f 100644 --- a/Makefile +++ b/Makefile @@ -80,10 +80,9 @@ clean-all: clean .PHONY: release # HELP: create, commit and push a new release release: - ./.gitlab-ci/version.pl -changelog CHANGELOG.md - git add CHANGELOG.md - VERSION=`.gitlab-ci/version.pl` - git tag $${VERSION} + VERSION=`./utils/version.pl -changelog CHANGELOG.md` ; \ + git add CHANGELOG.md ; \ + git tag $${VERSION} ; \ git commit -m "chore(release): $${VERSION}" # git push From 9e3a16011b07febb77d87f83562bcbe00c190bc5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2025 11:40:53 +0100 Subject: [PATCH 251/355] build(docker/fradrive): use relative bin path for binary copy [skip ci] --- docker/fradrive/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile index 4457f7de6..89eb84bec 100755 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -24,8 +24,8 @@ RUN mkdir -p /var/log/uniworx && chown -R uniworx:uniworx /var/log/uniworx # Install FraDrive binaries # RUN install -d -g uniworx -o uniworx -m 0750 /var/lib/uniworx # RUN install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx -COPY uniworx /usr/bin/uniworx -COPY uniworxdb /usr/bin/uniworx +COPY ./bin/uniworx /usr/bin/uniworx +COPY ./bin/uniworxdb /usr/bin/uniworx # COPY uniworxload /usr/bin/uniworx USER uniworx From 84a91be87f6a68206fb0bb092e10cc1281d7a17f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2025 11:42:05 +0100 Subject: [PATCH 252/355] ci(azure-pipelines): fix bin path for release artifact copy [skip ci] --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c9caab8b4..ef3c50204 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -97,7 +97,7 @@ stages: displayName: Download binaries inputs: artifactName: backend - patterns: 'bin/*' + patterns: 'backend/bin/*' targetPath: '$(Build.Repository.LocalPath)' - script: | ls -a . From 5761b96282103659f99791e7066297a226428738 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2025 11:44:07 +0100 Subject: [PATCH 253/355] ci(azure-pipelines): include all binaries in artifact uploads [skip ci] --- azure-pipelines.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ef3c50204..c15666865 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -47,8 +47,7 @@ parameters: continueOnError: true condition: eq(variables.releaseTest, false) artifacts: | - bin/uniworx - bin/uniworxdb + bin/* .stack/**/* variables: From c48751311688e7690bf7bf6b6c6faa7c46de1602 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2025 13:28:08 +0100 Subject: [PATCH 254/355] docs(Makefile): add documentation for shell-ghci target [skip ci] --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 60564272f..2f555db4c 100644 --- a/Makefile +++ b/Makefile @@ -319,6 +319,7 @@ well-known: static; AVSPASS=${AVSPASS:-nopasswordset} ; \ ./bin/uniworxdb $(UNIWORXDB_OPTS) +# HELP(shell-ghci): enter ghci shell. Use "make ghci SRC=" to load specific source modules." --shell-ghci: stack ghci -- $(SRC) # --main-is uniworx:exe:uniworx From eac726f364b6c9c89eee84749191534a432acc1d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2025 13:33:39 +0100 Subject: [PATCH 255/355] ci(azure-pipelines): use cached dependencies when variable is set --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c15666865..064d2564d 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -45,7 +45,7 @@ parameters: artifact: backend patterns: '.stack/**/*' continueOnError: true - condition: eq(variables.releaseTest, false) + condition: eq(variables.useCachedDependencies, true) artifacts: | bin/* .stack/**/* From bf0642ccb8be5a8a2ae19b185f600755f2306cd6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 4 Feb 2025 13:42:35 +0100 Subject: [PATCH 256/355] build(release): fix release branchversion comparison in release script [skip ci] --- utils/version.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/version.pl b/utils/version.pl index 93aa64d23..d00d80cdb 100644 --- a/utils/version.pl +++ b/utils/version.pl @@ -304,7 +304,7 @@ sub vsCompare { ($v->{minor} // 0) <=> ($w->{minor} // 0) || ($v->{patch} // 0) <=> ($w->{patch} // 0) || ($v->{branchname} // '') cmp ($w->{branchname} // '') || - ($v->{branchversion} // '') <=> ($w->{branchversion} // '') || + ($v->{branchversion} // 0) <=> ($w->{branchversion} // 0) || ($v->{subpatch} // '') cmp ($w->{subpatch} // '') ) } elsif('v' eq $v->{prefix} and 'v' ne $w->{prefix}) { From 12d8f49a651bd751bd7fdd2e27382a18e797ccb1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:02:39 +0100 Subject: [PATCH 257/355] build(release): fix version script [skip ci] --- utils/version.pl | 63 ++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/utils/version.pl b/utils/version.pl index d00d80cdb..d9b3aa60f 100644 --- a/utils/version.pl +++ b/utils/version.pl @@ -224,47 +224,35 @@ sub parseVersion { warn "$0: internal error (parseVersion called on undef at $c)\n"; return undef } - my ($pre,$ma,$mi,$p,$sp,$brn,$brv) = (); - if($v=~m#^([a-z]*)([0-9]+)$#) { - $pre = $1; - $ma = $2; - } elsif($v=~m#^([a-z]*)([0-9]+)\.([0-9]+)$#) { - $pre = $1; - $ma = $2; - $mi = $3 - } elsif($v=~m#^([a-z]*)([0-9]+)\.([0-9]+)\.([0-9]+)$#) { - $pre = $1; - $ma = $2; - $mi = $3; - $p = $4; - } elsif($v=~m#^([a-z]*)([0-9]+)\.([0-9]+)\.([0-9]+)-test-([a-z]+)-([0-9\.]+)$#) { - $pre = $1; - $ma = $2; - $mi = $3; - $p = $4; - $sp = $5; - $brn = $6; - $brv = $7; - } elsif($v=~m#^([a-z]*)([0-9]+)\.([0-9]+)\.([0-9]+)-(.*)$#) { - $pre = $1; - $ma = $2; - $mi = $3; - $p = $4; - $sp = $5; + my %cap = (); + if( + $v=~m#^(?
[a-z]*)(?[0-9]+)$# ||
+    $v=~m#^(?
[a-z]*)(?[0-9]+)\.(?[0-9]+)$# ||
+    $v=~m#^(?
[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)$# || + $v=~m#^(?

[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)-test-(?(?[a-z]+)-(?[0-9\.]+))$# || + $v=~m#^(?

[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)-(?.*)$# + ) { + %cap = %+ +# my ($pre,$ma,$mi,$p,$sp,$brn,$brv) = (); } else { warn "$0: unexpected old version number: $v\n" if $par{v}; return undef } - $pre = 'v' if '' eq $pre; - return { - prefix=>$pre, - major=>$ma, - minor=>$mi, - patch=>$p, - subpatch=>$sp, - branchname=>$brn, - branchversion=>$brv, + $cap{pre} = 'v' if '' eq $cap{pre}; + my %ret = ( + prefix=>$cap{pre}, + major=>$cap{ma}, + minor=>$cap{mi}, + patch=>$cap{p}, + subpatch=>$cap{sp}, + branchname=>$cap{brn}, + branchversion=>$cap{brv}, + ); + if($par{v}) { + my $parsed = join '; ', map { "$_=>$ret{$_}" } sort keys %ret; + warn "Version '$v' was parsed to '$parsed'\n" } + return \%ret } #@oldVersions = sort { @@ -474,7 +462,7 @@ SEARCHVERSION: for my $v(@versions) { sub justVersionInc { my ($v, $react) = @_; my $vv = parseVersion($v); - $vv->{patch}++ if $react->{patch}; + $vv->{patch}++; # if $react->{patch}; # in principal a good idea to increase only when a patch action happend, but we need a new version, even if nothing happend, so we always increase patch; if there are other changes as well, it is overwritten anyways do {$vv->{minor}++; $vv->{patch}=0} if $react->{minor}; do {$vv->{major}++; $vv->{minor}=0; $vv->{patch}=0} if $react->{major}; return vsJustVersion($vv); @@ -500,6 +488,7 @@ for(@allVersions) { $allVersions{$_} = 1 } while(exists $allVersions{$newVersion}) { + warn "Version conflict, so we try another version, '$newVersion' exists already\n" if $par{v}; if($mainVersion) { die "$0: probably internal error (collision in main version)\n" } From d89e9f67813f5743d27042ab7e36c71a460eed89 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:03:47 +0100 Subject: [PATCH 258/355] build(docker/fradrive): update apt repositories before install [skip ci] --- docker/fradrive/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile index 89eb84bec..6ebf8e71b 100755 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -4,7 +4,7 @@ ARG FROM_TAG=12.5 FROM ${FROM_IMG}:${FROM_TAG} # Setup locales -RUN apt-get -y install locales locales-all +RUN apt-get update && apt-get -y install locales locales-all RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 From a92fd673ab21c39439a16faa4993f687ceffdaad Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:04:15 +0100 Subject: [PATCH 259/355] build(docker/fradrive): do not install locales manually [skip ci] --- docker/fradrive/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile index 6ebf8e71b..aa82887bc 100755 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -4,7 +4,7 @@ ARG FROM_TAG=12.5 FROM ${FROM_IMG}:${FROM_TAG} # Setup locales -RUN apt-get update && apt-get -y install locales locales-all +# RUN apt-get update && apt-get -y install locales locales-all RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ locale-gen ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 From 871cc72995c3bf2a6357a9e337291b600211303f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:04:29 +0100 Subject: [PATCH 260/355] chore(release): v27.4.59-test-a0.0.1 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57676fc10..9a1e85da2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.1](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.0...v27.4.59-test-a0.0.1) (2025-02-05) + +### Bug Fixes + +* **ghci:** ghci works now as expected ([c3117db](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive/commit/c3117dbdcd1de9ef9f0751afa45018e2ebce2c42)) + ## [v27.4.59-test-a0.0.0](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59...v27.4.59-test-a0.0.0) (2024-10-25) ### Features From 30ad995a4049fa05aff619a187a24ed933df77e7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:31:36 +0100 Subject: [PATCH 261/355] ci(azure-pipelines): templatify release [skip ci] --- .azure-pipelines/templates/release.yaml | 51 +++++++++++++++++++++++++ azure-pipelines.yaml | 45 ++-------------------- 2 files changed, 54 insertions(+), 42 deletions(-) create mode 100644 .azure-pipelines/templates/release.yaml diff --git a/.azure-pipelines/templates/release.yaml b/.azure-pipelines/templates/release.yaml new file mode 100644 index 000000000..6afaf9439 --- /dev/null +++ b/.azure-pipelines/templates/release.yaml @@ -0,0 +1,51 @@ +# SPDX-FileCopyrightText: 2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: releaseTag + type: string + +jobs: + - job: test + displayName: Release fradrive-test + condition: or(eq(variables.releaseTest, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + container: + image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 + endpoint: devfra + steps: + - checkout: self + - task: DownloadPipelineArtifact@2 + displayName: Download binaries + inputs: + artifactName: backend + patterns: 'backend/bin/*' + targetPath: '$(Build.Repository.LocalPath)' + - script: | + ls -a . + pwd + find . + - task: Docker@2 + displayName: Login to container registry + inputs: + command: login + containerRegistry: devfra + - task: Bash@3 + displayName: Build container + inputs: + targetType: inline + script: | + cp docker/fradrive/Dockerfile . + docker build \ + --tag $(imageUpstream)/fradrive:$(Build.BuildNumber) \ + --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.trusted/ubuntu \ + --build-arg FROM_TAG=20.04 \ + --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ + --build-arg IN_CI=true \ + --build-arg IN_CONTAINER=true \ + . + - task: Docker@2 + displayName: Logout from container registry + inputs: + command: logout + containerRegistry: devfra \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 064d2564d..5852b40d8 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -84,45 +84,6 @@ stages: dependsOn: - backend jobs: - - job: test - displayName: Release fradrive-test - condition: eq(variables.releaseTest, true) - container: - image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 - endpoint: devfra - steps: - - checkout: self - - task: DownloadPipelineArtifact@2 - displayName: Download binaries - inputs: - artifactName: backend - patterns: 'backend/bin/*' - targetPath: '$(Build.Repository.LocalPath)' - - script: | - ls -a . - pwd - find . - - task: Docker@2 - displayName: Login to container registry - inputs: - command: login - containerRegistry: devfra - - task: Bash@3 - displayName: Build container - inputs: - targetType: inline - script: | - cp docker/fradrive/Dockerfile . - docker build \ - --tag $(imageUpstream)/fradrive:$(Build.BuildNumber) \ - --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.trusted/ubuntu \ - --build-arg FROM_TAG=20.04 \ - --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ - --build-arg IN_CI=true \ - --build-arg IN_CONTAINER=true \ - . - - task: Docker@2 - displayName: Logout from container registry - inputs: - command: logout - containerRegistry: devfra \ No newline at end of file + - template: .azure-pipelines/templates/release.yaml + parameters: + releaseTag: split(variables['Build.SourceBranch'], '/')[2] \ No newline at end of file From f48afbca43d37345d33b01ea14f7ada9c2cf9a30 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:32:00 +0100 Subject: [PATCH 262/355] ci(azure-pipelines): only run release stage under forceRelease || tag condition [skip ci] --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 5852b40d8..0161c5800 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -81,6 +81,7 @@ stages: - compile - stage: release + condition: or(eq(variables.forceRelease, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) dependsOn: - backend jobs: From 2c7858139a5866d1c7cb84fa31045b115be8629f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:40:30 +0100 Subject: [PATCH 263/355] ci(azure-pipelines): parametrize release endpoint [skip ci] --- .azure-pipelines/templates/release.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/release.yaml b/.azure-pipelines/templates/release.yaml index 6afaf9439..458585658 100644 --- a/.azure-pipelines/templates/release.yaml +++ b/.azure-pipelines/templates/release.yaml @@ -5,6 +5,9 @@ parameters: - name: releaseTag type: string + - name: releaseEndpoint + type: string + default: 'devfra' jobs: - job: test @@ -29,7 +32,7 @@ jobs: displayName: Login to container registry inputs: command: login - containerRegistry: devfra + containerRegistry: '${{ parameters.releaseEndpoint }}' - task: Bash@3 displayName: Build container inputs: @@ -48,4 +51,4 @@ jobs: displayName: Logout from container registry inputs: command: logout - containerRegistry: devfra \ No newline at end of file + containerRegistry: '${{ parameters.releaseEndpoint }}' \ No newline at end of file From 3bce50c1fed82d83117b9578f7bfea2338267ba8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:44:20 +0100 Subject: [PATCH 264/355] ci(azure-pipelines): work on release [skip ci] --- .azure-pipelines/templates/release.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines/templates/release.yaml b/.azure-pipelines/templates/release.yaml index 458585658..d1a5d2893 100644 --- a/.azure-pipelines/templates/release.yaml +++ b/.azure-pipelines/templates/release.yaml @@ -10,31 +10,28 @@ parameters: default: 'devfra' jobs: - - job: test - displayName: Release fradrive-test - condition: or(eq(variables.releaseTest, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + - job: Release + displayName: Release ${{ parameters.releaseTag }} container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra steps: - - checkout: self + + # Download required artifacts from pipeline - task: DownloadPipelineArtifact@2 - displayName: Download binaries + displayName: Download FraDrive binaries inputs: artifactName: backend patterns: 'backend/bin/*' targetPath: '$(Build.Repository.LocalPath)' - - script: | - ls -a . - pwd - find . + - task: Docker@2 displayName: Login to container registry inputs: command: login containerRegistry: '${{ parameters.releaseEndpoint }}' - task: Bash@3 - displayName: Build container + displayName: Build FraDrive container inputs: targetType: inline script: | @@ -47,6 +44,7 @@ jobs: --build-arg IN_CI=true \ --build-arg IN_CONTAINER=true \ . + # TODO: tag and push to registry - task: Docker@2 displayName: Logout from container registry inputs: From 59c49116b5f1ea077c6f5fcc4174129212022293 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:46:07 +0100 Subject: [PATCH 265/355] ci(azure-pipelines): add release tag [skip ci] --- .azure-pipelines/templates/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/release.yaml b/.azure-pipelines/templates/release.yaml index d1a5d2893..916117a08 100644 --- a/.azure-pipelines/templates/release.yaml +++ b/.azure-pipelines/templates/release.yaml @@ -38,6 +38,7 @@ jobs: cp docker/fradrive/Dockerfile . docker build \ --tag $(imageUpstream)/fradrive:$(Build.BuildNumber) \ + --tag $(imageUpstream)/fradrive:${{parameters.releaseTag}} \ --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.trusted/ubuntu \ --build-arg FROM_TAG=20.04 \ --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ From 8e42e4140da4d6ad6db5b537617e81aedbeb0015 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 11:50:29 +0100 Subject: [PATCH 266/355] docs(Makefile): add TODO [skip ci] --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2f555db4c..1f49dfd8a 100644 --- a/Makefile +++ b/Makefile @@ -79,8 +79,9 @@ clean-all: clean .PHONY: release # HELP: create, commit and push a new release +# TODO: only release when build and tests are passing!!! release: - VERSION=`./utils/version.pl -changelog CHANGELOG.md` ; \ + VERSION=`./utils/version.pl -changelog CHANGELOG.md -v` ; \ git add CHANGELOG.md ; \ git tag $${VERSION} ; \ git commit -m "chore(release): $${VERSION}" From 8136d92e486c25307b118f1cbf82306b46b0cf99 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 13:16:26 +0100 Subject: [PATCH 267/355] chore(release): v27.4.59-test-a0.0.2 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a1e85da2..ff186a367 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.2](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.1...v27.4.59-test-a0.0.2) (2025-02-05) + ## [v27.4.59-test-a0.0.1](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.0...v27.4.59-test-a0.0.1) (2025-02-05) ### Bug Fixes From 51267bfd7cfc82c4947f00ccca19a5b9d062dccd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 5 Feb 2025 13:17:39 +0100 Subject: [PATCH 268/355] build(release): fix version script (again) [skip ci] --- utils/version.pl | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/utils/version.pl b/utils/version.pl index d9b3aa60f..4a0c6ffc1 100644 --- a/utils/version.pl +++ b/utils/version.pl @@ -138,6 +138,7 @@ if($par{autokind}) { my @rules = split /,/, $par{autokind}; RULES: { for my $r(@rules) { + warn "$0: Processing autokind rule '$r'\n" if $par{v}; if($r!~m#(.*)=(.*)#) { die "$0: Bad rule in autokind: $r\n"; } @@ -153,14 +154,15 @@ if($par{autokind}) { if($par{'v'}) { - print "VERBOSE: Parameters\n"; + warn "VERBOSE: Parameters\n"; for my $k(sort keys %par) { - print " $k: $par{$k}\n" + warn " $k: $par{$k}\n" } } my %typeReact = (); for my $as(split /,/, $par{change}) { + warn "$0: processing change parameter '$as'\n" if $par{v}; if($as=~m#(.*)=(.*)#) { $typeReact{$1} = $2; } else { @@ -229,7 +231,7 @@ sub parseVersion { $v=~m#^(?

[a-z]*)(?[0-9]+)$# ||
     $v=~m#^(?
[a-z]*)(?[0-9]+)\.(?[0-9]+)$# ||
     $v=~m#^(?
[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)$# || - $v=~m#^(?

[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)-test-(?(?[a-z]+)-(?[0-9\.]+))$# || + $v=~m#^(?

[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)-test-(?(?[a-z]+)-?(?[0-9\.]+))$# || $v=~m#^(?

[a-z]*)(?[0-9]+)\.(?[0-9]+)\.(?

[0-9]+)-(?.*)$# ) { %cap = %+ @@ -249,7 +251,7 @@ sub parseVersion { branchversion=>$cap{brv}, ); if($par{v}) { - my $parsed = join '; ', map { "$_=>$ret{$_}" } sort keys %ret; + my $parsed = join '; ', map { "$_=>".($ret{$_}//'') } sort keys %ret; warn "Version '$v' was parsed to '$parsed'\n" } return \%ret @@ -360,6 +362,7 @@ if('-' eq $par{vcslog}) { } my @versions = (); for my $v(@versionsOrig) { + warn "$0: Processing orig version (part 1): '$v'\n" if $par{v}; if($v=~m#^(.*?\S)\s*::::\s*(.*?)\s*::::\s*(.*)#) { push @versions, { hash => $1, @@ -377,6 +380,7 @@ my $tag = undef; my @versionPast = (); VERSION: for my $v(@versions) { + warn "$0: Processing version (part 2): $v\n" if $par{v}; #if($v->{meta}=~m#tag\s*:\s*\Q$par{kind}\E(.*)\)#) { # $tag=$1; # last VERSION @@ -405,6 +409,7 @@ VERSION: for my $v(@versions) { #$tag = parseVersion($tag); for my $r(reverse @change) { + warn "$0: Processing change: $r\n" if $par{v}; if('major' eq $r->{react}) { $tag->{major}++; $tag->{minor}=0; @@ -451,6 +456,7 @@ my $highStart = $mainVersion ? $sortAll[0] : $sortSee[0]; my $highSee = $sortSee[0]; my %reactCollect = (); SEARCHVERSION: for my $v(@versions) { + warn "$0: search for version: '$v'\n" if $par{v}; next unless $v->{version}; next unless $v->{react}; $reactCollect{$v->{react}} = 1; @@ -465,7 +471,9 @@ sub justVersionInc { $vv->{patch}++; # if $react->{patch}; # in principal a good idea to increase only when a patch action happend, but we need a new version, even if nothing happend, so we always increase patch; if there are other changes as well, it is overwritten anyways do {$vv->{minor}++; $vv->{patch}=0} if $react->{minor}; do {$vv->{major}++; $vv->{minor}=0; $vv->{patch}=0} if $react->{major}; - return vsJustVersion($vv); + my $ret = vsJustVersion($vv); + warn "$0: version inc from '$v' to $ret\n" if $par{v}; + return $ret } my $newVersion = undef; @@ -488,7 +496,7 @@ for(@allVersions) { $allVersions{$_} = 1 } while(exists $allVersions{$newVersion}) { - warn "Version conflict, so we try another version, '$newVersion' exists already\n" if $par{v}; + warn "$0: Version conflict, so we try another version, '$newVersion' exists already\n" if $par{v}; if($mainVersion) { die "$0: probably internal error (collision in main version)\n" } @@ -518,6 +526,7 @@ if($par{changelog}) { my %seen = (); my @sects = ([]); for(@changelog) { + warn "$0: Changelog processing: '$_'\n" if $par{v}; push @sects, [] if m/^## /; push @{$sects[-1]}, $_; if(m#/commit/([a-f0-9]+)\s*\)\s*\)\s*$#) { @@ -531,6 +540,7 @@ if($par{changelog}) { shift @sects; } for my $s(@sects) { + warn "$0: Changelog processing, section search: '$s'\n" if $par{v}; my $hh = $s->[0]; chomp $hh; my $cnt = @$s; @@ -555,6 +565,7 @@ if($par{changelog}) { 'feature' => 'Features', ); SELECTCHANGELOG: for my $v(@versions) { + warn "$0: Changelog processing, version selection: '$v'\n" if $par{v}; last SELECTCHANGELOG if $seen{$v->{hash}}; next unless $v->{subject}=~m#^\s*([a-z]+)\s*(!?)\s*((?:\(.*?\))?)\s*:\s*(.*?)\s*$#i; my ($kind, $break, $context, $msg) = ($1, $2, $3, $4); From 85105cb93108afe3a081da19928c7049781d2e61 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 10:24:15 +0100 Subject: [PATCH 269/355] ci(azure-pipelines): fix releaseTag param [skip ci] --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0161c5800..67daf027b 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -87,4 +87,4 @@ stages: jobs: - template: .azure-pipelines/templates/release.yaml parameters: - releaseTag: split(variables['Build.SourceBranch'], '/')[2] \ No newline at end of file + releaseTag: ${{split(variables['Build.SourceBranch'], '/')[2]}} \ No newline at end of file From 0345f4a5e63863eadc959b81105e6a9b38f1a353 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 10:24:26 +0100 Subject: [PATCH 270/355] chore(release): v27.4.59-test-a0.0.3 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff186a367..64a35dedd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.3](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.2...v27.4.59-test-a0.0.3) (2025-02-06) + ## [v27.4.59-test-a0.0.2](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.1...v27.4.59-test-a0.0.2) (2025-02-05) ## [v27.4.59-test-a0.0.1](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.0...v27.4.59-test-a0.0.1) (2025-02-05) From 81203be81106f88a9019ff061497279f4aa0f247 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 16:55:03 +0100 Subject: [PATCH 271/355] ci(azure-pipelines): set custom triggers; allow tag pipelines [skip ci] --- azure-pipelines.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 67daf027b..d081d9555 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -2,6 +2,18 @@ # # SPDX-License-Identifier: AGPL-3.0-or-later +trigger: + branches: + include: + - '*' + paths: + exclude: + - CHANGELOG.md + tags: + include: + - prod-* + - test-* + parameters: - name: services type: object From cb7946b156b4702396bef1c925965e96d232ec38 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 16:59:44 +0100 Subject: [PATCH 272/355] ci(azure-pipelines): trigger pipeline on any tag [skip ci] --- azure-pipelines.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index d081d9555..56bfe257b 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -11,8 +11,7 @@ trigger: - CHANGELOG.md tags: include: - - prod-* - - test-* + - '*' parameters: - name: services From 6564e8f9755b2ed103875d17859b14974974c33b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 17:00:21 +0100 Subject: [PATCH 273/355] ci(azure-pipelines): refactor params [skip ci] --- azure-pipelines.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 56bfe257b..1ec2a099f 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -18,13 +18,13 @@ parameters: type: object default: - name: frontend - base: + imageBase: image: devfra.azurecr.io/de.fraport.build/npm tag: node-20 # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ - pool: 'Prod Private Agent Pool' - timeout: 60 + buildPool: 'Prod Private Agent Pool' + buildTimeout: 60 dependsOn: [] requiredArtifacts: [] artifacts: | @@ -36,11 +36,11 @@ parameters: frontend/src/env.sass config/manifest.json - name: backend - base: + imageBase: image: devfra.azurecr.io/de.fraport.build/haskell tag: 8.10.4 - pool: 'Prod Private Agent Pool DS3' - timeout: 1440 + buildPool: 'Prod Private Agent Pool DS3' + buildTimeout: 1440 dependsOn: - frontend requiredArtifacts: From 7b68b128a8dcb98f93689d9f2928dc09ebe2ba65 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 17:00:35 +0100 Subject: [PATCH 274/355] ci(azure-pipelines): remove .stack dir from backend artifacts [skip ci] --- azure-pipelines.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1ec2a099f..51db48aa2 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -59,7 +59,6 @@ parameters: condition: eq(variables.useCachedDependencies, true) artifacts: | bin/* - .stack/**/* variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From 32f449ec1254301e687bbcac15ac98b79261e9a6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 17:28:08 +0100 Subject: [PATCH 275/355] ci(azure-pipelines): restructure params contd [skip ci] --- azure-pipelines.yaml | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 51db48aa2..1c26871aa 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -23,42 +23,33 @@ parameters: tag: node-20 # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ + dependsOn: [] + dependencyArtifacts: | + node_modules/ + .npm/ buildPool: 'Prod Private Agent Pool' buildTimeout: 60 - dependsOn: [] - requiredArtifacts: [] - artifacts: | + buildArtifacts: | assets/icons/fradrive/*.svg assets/favicons/*.png assets/favicons/include.html - static/**/* - well-known/**/* frontend/src/env.sass config/manifest.json + static/**/* + well-known/**/* - name: backend imageBase: image: devfra.azurecr.io/de.fraport.build/haskell tag: 8.10.4 - buildPool: 'Prod Private Agent Pool DS3' - buildTimeout: 1440 dependsOn: - frontend - requiredArtifacts: - - name: frontend - source: current - version: 'latest' - artifact: frontend - patterns: '**/*' - continueOnError: false - - name: backend-dependencies - source: specific - version: 'latestFromBranch' - artifact: backend - patterns: '.stack/**/*' - continueOnError: true - condition: eq(variables.useCachedDependencies, true) - artifacts: | + dependencyArtifacts: | + .stack/**/* + buildPool: 'Prod Private Agent Pool DS3' + buildTimeout: 1440 + buildArtifacts: | bin/* + .stack-work/**/* variables: imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build From cfb48b6a1c8099b54007d713548cf660e4503837 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 17:30:27 +0100 Subject: [PATCH 276/355] ci(azure-pipelines): imageUpstream -> buildImageUpstream [skip ci] --- .azure-pipelines/templates/service.yaml | 10 +++++----- azure-pipelines.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/templates/service.yaml b/.azure-pipelines/templates/service.yaml index 576d8209c..152b1f6cb 100755 --- a/.azure-pipelines/templates/service.yaml +++ b/.azure-pipelines/templates/service.yaml @@ -59,7 +59,7 @@ stages: script: | cp docker/${{parameters.serviceName}}/Dockerfile . docker build \ - --tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) \ + --tag $(buildImageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) \ --build-arg FROM_IMG=${{parameters.serviceBase.image}} \ --build-arg FROM_TAG=${{parameters.serviceBase.tag}} \ --build-arg HTTPS_PROXY=http://proxy.frankfurt-airport.de:8080 \ @@ -75,15 +75,15 @@ stages: inputs: targetType: inline script: | - docker push $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) + docker push $(buildImageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.serviceName}} image condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true)) inputs: targetType: inline script: | - docker tag $(imageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) $(imageUpstream)/${{parameters.serviceName}}:latest - docker push $(imageUpstream)/${{parameters.serviceName}}:latest + docker tag $(buildImageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) $(buildImageUpstream)/${{parameters.serviceName}}:latest + docker push $(buildImageUpstream)/${{parameters.serviceName}}:latest - task: Docker@2 displayName: Logout from container registry inputs: @@ -99,7 +99,7 @@ stages: container: # TODO: use BuildNumber instead of latest in update branches # image: devfra.azurecr.io/de.fraport.fradrive.build/frontend:$(Build.BuildNumber) - image: $(imageUpstream)/${{parameters.serviceName}}:latest + image: $(buildImageUpstream)/${{parameters.serviceName}}:latest endpoint: devfra env: PROJECT_DIR: $(Build.Repository.LocalPath) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1c26871aa..3d0e7f36f 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -52,7 +52,7 @@ parameters: .stack-work/**/* variables: - imageUpstream: devfra.azurecr.io/de.fraport.fradrive.build + buildImageUpstream: devfra.azurecr.io/de.fraport.fradrive.build onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] From 6012286250db3acbbfce60b04f3ed282f670132e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 17:33:36 +0100 Subject: [PATCH 277/355] ci(azure-pipelines): implement more general make-target pipeline template [skip ci] --- .../build-step.yaml => steps/make.yaml} | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) rename .azure-pipelines/templates/{service/build-step.yaml => steps/make.yaml} (56%) diff --git a/.azure-pipelines/templates/service/build-step.yaml b/.azure-pipelines/templates/steps/make.yaml similarity index 56% rename from .azure-pipelines/templates/service/build-step.yaml rename to .azure-pipelines/templates/steps/make.yaml index c76918569..2b77bf718 100644 --- a/.azure-pipelines/templates/service/build-step.yaml +++ b/.azure-pipelines/templates/steps/make.yaml @@ -3,12 +3,23 @@ # SPDX-License-Identifier: AGPL-3.0-or-later parameters: - - name: service - - name: buildStep + - name: makeJob + type: string + values: + - dependencies + - compile + - lint + - test + - name: makeService + type: string + values: + - frontend + - backend steps: - task: Bash@3 - name: ${{parameters.buildStep}}_${{parameters.service}} + name: ${{parameters.makeJob}}_${{parameters.makeService}} + displayName: make ${{parameters.makeJob}} ${{parameters.makeService}} env: HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 @@ -18,4 +29,4 @@ steps: inputs: targetType: inline script: | - make -- --${{parameters.buildStep}}-${{parameters.service}} IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file + make -- --${{parameters.makeJob}}-${{parameters.makeService}} IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file From ba7b2de4cf02780f6abdde1ea3fcac485b84a138 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 17:35:18 +0100 Subject: [PATCH 278/355] ci(azure-pipelines): restructure pipeline workflow - build images [skip ci] --- .../templates/jobs/setup_image.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .azure-pipelines/templates/jobs/setup_image.yaml diff --git a/.azure-pipelines/templates/jobs/setup_image.yaml b/.azure-pipelines/templates/jobs/setup_image.yaml new file mode 100644 index 000000000..a4351ce13 --- /dev/null +++ b/.azure-pipelines/templates/jobs/setup_image.yaml @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: imageName + type: string + - name: imageBase + type: object + +jobs: +- job: SetupImage_${{parameters.imageName}} + displayName: Build ${{parameters.imageName}} image + condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + container: + image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 + endpoint: devfra + steps: + - task: Docker@2 + displayName: Login to container registry + inputs: + command: login + containerRegistry: devfra + - task: Bash@3 + displayName: Build ${{parameters.imageName}} image + inputs: + targetType: inline + script: | + cp docker/${{parameters.imageName}}/Dockerfile . + docker build \ + --tag $(buildImageUpstream)/${{parameters.imageName}}:$(Build.BuildNumber) \ + --build-arg FROM_IMG=${{parameters.imageBase.image}} \ + --build-arg FROM_TAG=${{parameters.imageBase.tag}} \ + --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 FRAPORT_NOPROXY=dev.azure.com,*.dev.azure.com,*.fraport.de,*.frankfurt-airport.de \ + --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ + --build-arg IN_CI=true \ + --build-arg IN_CONTAINER=true \ + . + - task: Bash@3 + displayName: Push ${{parameters.imageName}} image + inputs: + targetType: inline + script: | + docker push $(buildImageUpstream)/${{parameters.imageName}}:$(Build.BuildNumber) + - task: Bash@3 + displayName: Update latest ${{parameters.imageName}} image + condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true)) + inputs: + targetType: inline + script: | + docker tag $(buildImageUpstream)/${{parameters.imageName}}:$(Build.BuildNumber) $(buildImageUpstream)/${{parameters.imageName}}:latest + docker push $(buildImageUpstream)/${{parameters.imageName}}:latest + - task: Docker@2 + displayName: Logout from container registry + inputs: + command: logout + containerRegistry: devfra \ No newline at end of file From ef9f4a9345919a579c6f244bfc210d56df001ca8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:04:55 +0100 Subject: [PATCH 279/355] ci(azure-pipelines): restructure pipeline workflow --- .../templates/{ => jobs}/release.yaml | 7 +- .../templates/jobs/setup_dependencies.yaml | 81 +++++++++++++++++ .azure-pipelines/templates/steps/make.yaml | 2 +- azure-pipelines.yaml | 87 +++++++++++++------ 4 files changed, 148 insertions(+), 29 deletions(-) rename .azure-pipelines/templates/{ => jobs}/release.yaml (88%) create mode 100644 .azure-pipelines/templates/jobs/setup_dependencies.yaml diff --git a/.azure-pipelines/templates/release.yaml b/.azure-pipelines/templates/jobs/release.yaml similarity index 88% rename from .azure-pipelines/templates/release.yaml rename to .azure-pipelines/templates/jobs/release.yaml index 916117a08..0f7454a85 100644 --- a/.azure-pipelines/templates/release.yaml +++ b/.azure-pipelines/templates/jobs/release.yaml @@ -8,6 +8,9 @@ parameters: - name: releaseEndpoint type: string default: 'devfra' + values: + - 'devfra' + - 'prodfra' jobs: - job: Release @@ -37,8 +40,8 @@ jobs: script: | cp docker/fradrive/Dockerfile . docker build \ - --tag $(imageUpstream)/fradrive:$(Build.BuildNumber) \ - --tag $(imageUpstream)/fradrive:${{parameters.releaseTag}} \ + --tag $(buildImageUpstream)/fradrive:$(Build.BuildNumber) \ + --tag $(buildImageUpstream)/fradrive:${{parameters.releaseTag}} \ --build-arg FROM_IMG=devfra.azurecr.io/de.fraport.trusted/ubuntu \ --build-arg FROM_TAG=20.04 \ --build-arg PROJECT_DIR=$(Build.Repository.LocalPath) \ diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml new file mode 100644 index 000000000..8a0ba798b --- /dev/null +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -0,0 +1,81 @@ +# SPDX-FileCopyrightText: 2024-2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: service + type: string + - name: dependenciesArtifacts + type: string + - name: dependenciesBuildPool + type: string + default: 'Prod Private Agent Pool' + values: + - 'Prod Private Agent Pool' + - 'Prod Private Agent Pool DS2' + - 'Prod Private Agent Pool DS3' + - name: dependenciesBuildTimeout + type: number + default: 60 + - name: dependenciesSource + type: string + default: 'current' + values: + - 'current' + - 'specific' + - name: dependenciesVersion + type: string + default: 'latest' + values: + - 'latest' + - 'latestFromBranch' + +jobs: +- job: SetupDependencies_${{parameters.service}} + displayName: Install ${{parameters.service}} dependencies + dependsOn: SetupImage_${{parameters.service}} + pool: '${{parameters.dependenciesBuildPool}}' + container: + # TODO: do not use latest on update branches + image: $(buildImageUpstream)/${{parameters.service}}:latest + endpoint: devfra + env: + PROJECT_DIR: $(Build.Repository.LocalPath) + IN_CONTAINER: true + IN_CI: true + steps: + # Download previously-built dependency artifacts + - task: DownloadPipelineArtifact@2 + displayName: Download previously built ${{parameters.service}} dependencies + condition: eq(variables.useCachedDependencies, true) + continueOnError: true + inputs: + artifactName: '${{service}}-dependencies' + source: ${{ dependenciesSource }} + project: 'Fahrerausbildung' # TODO: hardcoded for now, could not figure out which predefined variable to use + pipeline: $(System.DefinitionId) + buildVersionToDownload: '${{dependenciesVersion}}' + # tags: '${{dependenciesArtifacts}}' + allowPartiallySucceededBuilds: true + allowFailedBuilds: true + patterns: '${{dependenciesArtifacts}}' + targetPath: '$(Build.Repository.LocalPath)' + + # Compile dependencies + - template: .azure-pipelines/templates/steps/make.yaml + parameters: + makeJob: dependencies + makeService: ${{parameters.service}} + + # Upload newly-built dependencies as artifacts + - task: CopyFiles@2 + displayName: Copy ${{parameters.service}} dependencies for upload + inputs: + Contents: ${{ parameters.dependenciesArtifacts }} + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + displayName: Upload ${{parameters.service}} dependencies as artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '${{parameters.service}}-dependencies' + publishLocation: 'Container' \ No newline at end of file diff --git a/.azure-pipelines/templates/steps/make.yaml b/.azure-pipelines/templates/steps/make.yaml index 2b77bf718..f7143e56c 100644 --- a/.azure-pipelines/templates/steps/make.yaml +++ b/.azure-pipelines/templates/steps/make.yaml @@ -19,7 +19,7 @@ parameters: steps: - task: Bash@3 name: ${{parameters.makeJob}}_${{parameters.makeService}} - displayName: make ${{parameters.makeJob}} ${{parameters.makeService}} + displayName: make ${{parameters.makeJob}}-${{parameters.makeService}} env: HTTPS_PROXY: http://proxy.frankfurt-airport.de:8080 HTTP_PROXY: http://proxy.frankfurt-airport.de:8080 diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3d0e7f36f..b2e607619 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -60,32 +60,67 @@ pool: 'Prod Private Agent Pool' stages: -- ${{ each service in parameters.services }}: - - template: .azure-pipelines/templates/service.yaml - parameters: - serviceName: ${{ service.name }} - serviceBase: ${{ service.base }} - servicePool: ${{ service.pool }} - serviceTimeout: ${{ service.timeout }} - serviceDependsOn: ${{ service.dependsOn }} - serviceRequiredArtifacts: ${{ service.requiredArtifacts }} - serviceArtifacts: ${{ service.artifacts }} - ${{ if eq(variables.skipTests, false) }}: - buildSteps: - - dependencies - - compile - - lint - - test - ${{ else }}: - buildSteps: - - dependencies - - compile - -- stage: release - condition: or(eq(variables.forceRelease, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) - dependsOn: - - backend +- stage: Setup jobs: - - template: .azure-pipelines/templates/release.yaml + - ${{ each service in parameters.services }}: + - template: .azure-pipelines/templates/jobs/setup_image.yaml + parameters: + imageName: ${{service.name}} + imageBase: ${{service.imageBase}} + - template: .azure-pipelines/templates/jobs/setup_dependencies.yaml + parameters: + dependenciesName: ${{service.name}} + dependenciesBuildPool: ${{service.buildPool}} + dependenciesBuildTimeout: ${{service.buildTimeout}} + dependenciesArtifacts: ${{service.dependenciesArtifacts}} + +- stage: Build + jobs: + - ${{ each service in parameters.services }}: + - job: Build_${{service.name}} + displayName: Compile ${{service.name}} + dependsOn: ${{service.dependsOn}} + steps: + - template: .azure-pipelines/templates/steps/make.yaml + parameters: + makeJob: compile + makeService: ${{service.name}} + - task: CopyFiles@2 + displayName: Prepare ${{service.name}} build artifacts for upload + inputs: + Contents: ${{service.artifacts}} + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + displayName: Publish ${{service.name}} build artifacts + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: '${{service.name}}' + publishLocation: 'Container' + +- stage: Test + condition: eq(variables.skipTests, false) + jobs: + - ${{ each service in parameters.services }}: + - job: Test_${{service.name}} + displayName: Compile ${{service.name}} + dependsOn: ${{service.dependsOn}} + steps: + - template: .azure-pipelines/templates/steps/make.yaml + parameters: + makeJob: lint + makeService: ${{service.name}} + - template: .azure-pipelines/templates/steps/make.yaml + parameters: + makeJob: test + makeService: ${{service.name}} + - job: TestReport_${{service.name}} + displayName: Upload test reports for ${{service.name}} + steps: + - script: echo "Work in progress" # TODO + +- stage: Release + condition: or(eq(variables.forceRelease, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) + jobs: + - template: .azure-pipelines/templates/jobs/release.yaml parameters: releaseTag: ${{split(variables['Build.SourceBranch'], '/')[2]}} \ No newline at end of file From fc13ac7a6dc956dc7bdcbc4b66a940a5183594d4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:06:41 +0100 Subject: [PATCH 280/355] ci(azure-pipelines): fix param name --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- azure-pipelines.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 8a0ba798b..32d5b9f8e 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-or-later parameters: - - name: service + - name: serviceName type: string - name: dependenciesArtifacts type: string diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b2e607619..05700e668 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -69,7 +69,7 @@ stages: imageBase: ${{service.imageBase}} - template: .azure-pipelines/templates/jobs/setup_dependencies.yaml parameters: - dependenciesName: ${{service.name}} + serviceName: ${{service.name}} dependenciesBuildPool: ${{service.buildPool}} dependenciesBuildTimeout: ${{service.buildTimeout}} dependenciesArtifacts: ${{service.dependenciesArtifacts}} From 1a3c18a8bd156058918218919638a81160df5ccb Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:07:20 +0100 Subject: [PATCH 281/355] ci(azure-pipelines): fix param name contd --- .../templates/jobs/setup_dependencies.yaml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 32d5b9f8e..c5ea41217 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -31,13 +31,13 @@ parameters: - 'latestFromBranch' jobs: -- job: SetupDependencies_${{parameters.service}} - displayName: Install ${{parameters.service}} dependencies - dependsOn: SetupImage_${{parameters.service}} +- job: SetupDependencies_${{parameters.serviceName}} + displayName: Install ${{parameters.serviceName}} dependencies + dependsOn: SetupImage_${{parameters.serviceName}} pool: '${{parameters.dependenciesBuildPool}}' container: # TODO: do not use latest on update branches - image: $(buildImageUpstream)/${{parameters.service}}:latest + image: $(buildImageUpstream)/${{parameters.serviceName}}:latest endpoint: devfra env: PROJECT_DIR: $(Build.Repository.LocalPath) @@ -46,11 +46,11 @@ jobs: steps: # Download previously-built dependency artifacts - task: DownloadPipelineArtifact@2 - displayName: Download previously built ${{parameters.service}} dependencies + displayName: Download previously built ${{parameters.serviceName}} dependencies condition: eq(variables.useCachedDependencies, true) continueOnError: true inputs: - artifactName: '${{service}}-dependencies' + artifactName: '${{serviceName}}-dependencies' source: ${{ dependenciesSource }} project: 'Fahrerausbildung' # TODO: hardcoded for now, could not figure out which predefined variable to use pipeline: $(System.DefinitionId) @@ -65,17 +65,17 @@ jobs: - template: .azure-pipelines/templates/steps/make.yaml parameters: makeJob: dependencies - makeService: ${{parameters.service}} + makeService: ${{parameters.serviceName}} # Upload newly-built dependencies as artifacts - task: CopyFiles@2 - displayName: Copy ${{parameters.service}} dependencies for upload + displayName: Copy ${{parameters.serviceName}} dependencies for upload inputs: Contents: ${{ parameters.dependenciesArtifacts }} TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishBuildArtifacts@1 - displayName: Upload ${{parameters.service}} dependencies as artifacts + displayName: Upload ${{parameters.serviceName}} dependencies as artifacts inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '${{parameters.service}}-dependencies' + ArtifactName: '${{parameters.serviceName}}-dependencies' publishLocation: 'Container' \ No newline at end of file From f969c23bac16382576dbaad83d1cbe72852348ce Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:08:28 +0100 Subject: [PATCH 282/355] ci(azure-pipelines): fix param splices --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index c5ea41217..831d6bf1c 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -50,15 +50,15 @@ jobs: condition: eq(variables.useCachedDependencies, true) continueOnError: true inputs: - artifactName: '${{serviceName}}-dependencies' - source: ${{ dependenciesSource }} + artifactName: '${{parameters.serviceName}}-dependencies' + source: ${{parameters.dependenciesSource}} project: 'Fahrerausbildung' # TODO: hardcoded for now, could not figure out which predefined variable to use pipeline: $(System.DefinitionId) - buildVersionToDownload: '${{dependenciesVersion}}' + buildVersionToDownload: '${{parameters.dependenciesVersion}}' # tags: '${{dependenciesArtifacts}}' allowPartiallySucceededBuilds: true allowFailedBuilds: true - patterns: '${{dependenciesArtifacts}}' + patterns: '${{parameters.dependenciesArtifacts}}' targetPath: '$(Build.Repository.LocalPath)' # Compile dependencies From ed8f859c1ea11222ef7d7ce0e8f9f1aec3120c25 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:09:58 +0100 Subject: [PATCH 283/355] ci(azure-pipelines): fix template locations --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 831d6bf1c..312af5be0 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -62,7 +62,7 @@ jobs: targetPath: '$(Build.Repository.LocalPath)' # Compile dependencies - - template: .azure-pipelines/templates/steps/make.yaml + - template: ./../steps/make.yaml parameters: makeJob: dependencies makeService: ${{parameters.serviceName}} From ee244e34a4b8159534aebdf84ce44a4c1cd4440d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:10:46 +0100 Subject: [PATCH 284/355] ci(azure-pipelines): fix template locations contd --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 312af5be0..4e4c139ff 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -62,7 +62,7 @@ jobs: targetPath: '$(Build.Repository.LocalPath)' # Compile dependencies - - template: ./../steps/make.yaml + - template: ./../../steps/make.yaml parameters: makeJob: dependencies makeService: ${{parameters.serviceName}} From b77356d73d5e02d2c9e955bdcd5380cbd6ec1948 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:12:28 +0100 Subject: [PATCH 285/355] ci(azure-pipelines): fix job dependsOn --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 05700e668..b3d3abab4 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -42,7 +42,7 @@ parameters: image: devfra.azurecr.io/de.fraport.build/haskell tag: 8.10.4 dependsOn: - - frontend + - Build_frontend dependencyArtifacts: | .stack/**/* buildPool: 'Prod Private Agent Pool DS3' From 2a1f114f484c1751a99c9e3d29313b9c6d3a12aa Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:16:59 +0100 Subject: [PATCH 286/355] ci(azure-pipelines): fix job dependsOn contd --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b3d3abab4..2d776f553 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -103,7 +103,7 @@ stages: - ${{ each service in parameters.services }}: - job: Test_${{service.name}} displayName: Compile ${{service.name}} - dependsOn: ${{service.dependsOn}} + dependsOn: Build_${{service.dependsOn}} steps: - template: .azure-pipelines/templates/steps/make.yaml parameters: From 622ba07b8fcf55de60b07088bd3540568cd582ce Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:20:03 +0100 Subject: [PATCH 287/355] ci(azure-pipelines): fix dependsOn contd ? --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2d776f553..b3d3abab4 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -103,7 +103,7 @@ stages: - ${{ each service in parameters.services }}: - job: Test_${{service.name}} displayName: Compile ${{service.name}} - dependsOn: Build_${{service.dependsOn}} + dependsOn: ${{service.dependsOn}} steps: - template: .azure-pipelines/templates/steps/make.yaml parameters: From 224f55852f70cc4efae8caa7a46c661265673df5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:22:05 +0100 Subject: [PATCH 288/355] ci(azure-pipelines): make stages depend on each other --- azure-pipelines.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b3d3abab4..94f8f8c7c 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -98,6 +98,7 @@ stages: publishLocation: 'Container' - stage: Test + dependsOn: Build condition: eq(variables.skipTests, false) jobs: - ${{ each service in parameters.services }}: From 11b17ab1e278036d591d946f612cc7736d6efa29 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:25:37 +0100 Subject: [PATCH 289/355] ci(azure-pipelines): disable Test stage for now --- azure-pipelines.yaml | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 94f8f8c7c..388f3c014 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -75,6 +75,7 @@ stages: dependenciesArtifacts: ${{service.dependenciesArtifacts}} - stage: Build + dependsOn: Setup jobs: - ${{ each service in parameters.services }}: - job: Build_${{service.name}} @@ -97,29 +98,30 @@ stages: ArtifactName: '${{service.name}}' publishLocation: 'Container' -- stage: Test - dependsOn: Build - condition: eq(variables.skipTests, false) - jobs: - - ${{ each service in parameters.services }}: - - job: Test_${{service.name}} - displayName: Compile ${{service.name}} - dependsOn: ${{service.dependsOn}} - steps: - - template: .azure-pipelines/templates/steps/make.yaml - parameters: - makeJob: lint - makeService: ${{service.name}} - - template: .azure-pipelines/templates/steps/make.yaml - parameters: - makeJob: test - makeService: ${{service.name}} - - job: TestReport_${{service.name}} - displayName: Upload test reports for ${{service.name}} - steps: - - script: echo "Work in progress" # TODO +# - stage: Test +# dependsOn: Setup +# condition: eq(variables.skipTests, false) +# jobs: +# - ${{ each service in parameters.services }}: +# - job: Test_${{service.name}} +# displayName: Compile ${{service.name}} +# dependsOn: ${{service.dependsOn}} +# steps: +# - template: .azure-pipelines/templates/steps/make.yaml +# parameters: +# makeJob: lint +# makeService: ${{service.name}} +# - template: .azure-pipelines/templates/steps/make.yaml +# parameters: +# makeJob: test +# makeService: ${{service.name}} +# - job: TestReport_${{service.name}} +# displayName: Upload test reports for ${{service.name}} +# steps: +# - script: echo "Work in progress" # TODO - stage: Release + dependsOn: Build # TODO include Test iff not skipped condition: or(eq(variables.forceRelease, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) jobs: - template: .azure-pipelines/templates/jobs/release.yaml From 517144c0cf237a62201ef55fd4059ca976f969bc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:46:32 +0100 Subject: [PATCH 290/355] ci(azure-pipelines): use build container for Build jobs --- azure-pipelines.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 388f3c014..f1f09ec60 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -81,6 +81,14 @@ stages: - job: Build_${{service.name}} displayName: Compile ${{service.name}} dependsOn: ${{service.dependsOn}} + container: + # TODO: do not use latest on update branches + image: $(buildImageUpstream)/${{service.name}}:latest + endpoint: devfra + env: + PROJECT_DIR: $(Build.Repository.LocalPath) + IN_CONTAINER: true + IN_CI: true steps: - template: .azure-pipelines/templates/steps/make.yaml parameters: From 17c7ed89c5166a00fdb3515b6ef5a00c285da288 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:50:47 +0100 Subject: [PATCH 291/355] ci(azure-pipelines): always run dependency build when not on update branch --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 4e4c139ff..becc5ece5 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -34,6 +34,11 @@ jobs: - job: SetupDependencies_${{parameters.serviceName}} displayName: Install ${{parameters.serviceName}} dependencies dependsOn: SetupImage_${{parameters.serviceName}} + condition: always() # TODO: only succeeded and skipped + ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: + condition: succeeded() + ${{ else }}: + condition: always() pool: '${{parameters.dependenciesBuildPool}}' container: # TODO: do not use latest on update branches From c62c435638f42bd64e02f1bd3a7af5d7f1ae95db Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 6 Feb 2025 18:57:12 +0100 Subject: [PATCH 292/355] ci(azure-pipelines): fix and deduplicate condition when to setup images --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 3 +-- .azure-pipelines/templates/jobs/setup_image.yaml | 2 +- azure-pipelines.yaml | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index becc5ece5..1dfbb5be5 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -34,8 +34,7 @@ jobs: - job: SetupDependencies_${{parameters.serviceName}} displayName: Install ${{parameters.serviceName}} dependencies dependsOn: SetupImage_${{parameters.serviceName}} - condition: always() # TODO: only succeeded and skipped - ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/') }}: + ${{ if eq(variables.setupImages, true) }}: condition: succeeded() ${{ else }}: condition: always() diff --git a/.azure-pipelines/templates/jobs/setup_image.yaml b/.azure-pipelines/templates/jobs/setup_image.yaml index a4351ce13..2028e2cc2 100644 --- a/.azure-pipelines/templates/jobs/setup_image.yaml +++ b/.azure-pipelines/templates/jobs/setup_image.yaml @@ -11,7 +11,7 @@ parameters: jobs: - job: SetupImage_${{parameters.imageName}} displayName: Build ${{parameters.imageName}} image - condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true), eq(variables.onUpdateBranch, true)) + condition: eq(variables.setupImages, true) container: image: devfra.azurecr.io/de.fraport.build/tools:1.1.0 endpoint: devfra diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index f1f09ec60..e44679ac2 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -53,8 +53,7 @@ parameters: variables: buildImageUpstream: devfra.azurecr.io/de.fraport.fradrive.build - onMasterBranch: $[eq(variables['Build.SourceBranch'], 'refs/heads/master')] - onUpdateBranch: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/update')] + setupImages: $[ or( eq(variables.forcePushLatest, true), eq(variables['Build.SourceBranch'], 'refs/heads/master'), startsWith(variables['Build.SourceBranch'], 'refs/heads/update'), startsWith(variables['Build.SourceBranch'], 'refs/tags/') ) ] pool: 'Prod Private Agent Pool' From 7fe8fcb5f69b43489290d8520e774c4ee0f72203 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 16:19:18 +0100 Subject: [PATCH 293/355] ci(azure-pipelines): reintroduce timeout for dependency builds --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 1dfbb5be5..34b543068 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -39,6 +39,7 @@ jobs: ${{ else }}: condition: always() pool: '${{parameters.dependenciesBuildPool}}' + timeoutInMinutes: ${{parameters.dependenciesBuildTimeout}} container: # TODO: do not use latest on update branches image: $(buildImageUpstream)/${{parameters.serviceName}}:latest From 87e80db4aaf541b903b1dfe7592e3c153936fa1a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 16:21:49 +0100 Subject: [PATCH 294/355] ci(azure-pipelines): fix dependenciesArtifacts param --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- azure-pipelines.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 34b543068..9b59091db 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -76,7 +76,7 @@ jobs: - task: CopyFiles@2 displayName: Copy ${{parameters.serviceName}} dependencies for upload inputs: - Contents: ${{ parameters.dependenciesArtifacts }} + Contents: '${{parameters.dependenciesArtifacts}}' TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishBuildArtifacts@1 displayName: Upload ${{parameters.serviceName}} dependencies as artifacts diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index e44679ac2..3f665aebb 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,7 +24,7 @@ parameters: # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ dependsOn: [] - dependencyArtifacts: | + dependenciesArtifacts: | node_modules/ .npm/ buildPool: 'Prod Private Agent Pool' @@ -43,7 +43,7 @@ parameters: tag: 8.10.4 dependsOn: - Build_frontend - dependencyArtifacts: | + dependenciesArtifacts: | .stack/**/* buildPool: 'Prod Private Agent Pool DS3' buildTimeout: 1440 From 6a279d262fd7964696a5afdd5b19189ecbb0b16f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 16:50:44 +0100 Subject: [PATCH 295/355] ci(azure-pipelines): use dependency cache instead of artifacts --- .../templates/jobs/setup_dependencies.yaml | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 9b59091db..702c701d9 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -17,18 +17,18 @@ parameters: - name: dependenciesBuildTimeout type: number default: 60 - - name: dependenciesSource - type: string - default: 'current' - values: - - 'current' - - 'specific' - - name: dependenciesVersion - type: string - default: 'latest' - values: - - 'latest' - - 'latestFromBranch' + # - name: dependenciesSource + # type: string + # default: 'current' + # values: + # - 'current' + # - 'specific' + # - name: dependenciesVersion + # type: string + # default: 'latest' + # values: + # - 'latest' + # - 'latestFromBranch' jobs: - job: SetupDependencies_${{parameters.serviceName}} @@ -49,22 +49,27 @@ jobs: IN_CONTAINER: true IN_CI: true steps: - # Download previously-built dependency artifacts - - task: DownloadPipelineArtifact@2 - displayName: Download previously built ${{parameters.serviceName}} dependencies - condition: eq(variables.useCachedDependencies, true) - continueOnError: true + # Restore previously-built dependencies from cache + - task: Cache@2 + displayName: Restore cached ${{parameters.serviceName}} dependencies inputs: - artifactName: '${{parameters.serviceName}}-dependencies' - source: ${{parameters.dependenciesSource}} - project: 'Fahrerausbildung' # TODO: hardcoded for now, could not figure out which predefined variable to use - pipeline: $(System.DefinitionId) - buildVersionToDownload: '${{parameters.dependenciesVersion}}' - # tags: '${{dependenciesArtifacts}}' - allowPartiallySucceededBuilds: true - allowFailedBuilds: true - patterns: '${{parameters.dependenciesArtifacts}}' - targetPath: '$(Build.Repository.LocalPath)' + key: '${{parameters.serviceName}}-dependencies' + path: '${{parameters.dependenciesArtifacts}}' + # - task: DownloadPipelineArtifact@2 + # displayName: Download previously built ${{parameters.serviceName}} dependencies + # condition: eq(variables.useCachedDependencies, true) + # continueOnError: true + # inputs: + # artifactName: '${{parameters.serviceName}}-dependencies' + # source: ${{parameters.dependenciesSource}} + # project: 'Fahrerausbildung' # TODO: hardcoded for now, could not figure out which predefined variable to use + # pipeline: $(System.DefinitionId) + # buildVersionToDownload: '${{parameters.dependenciesVersion}}' + # # tags: '${{dependenciesArtifacts}}' + # allowPartiallySucceededBuilds: true + # allowFailedBuilds: true + # patterns: '${{parameters.dependenciesArtifacts}}' + # targetPath: '$(Build.Repository.LocalPath)' # Compile dependencies - template: ./../../steps/make.yaml From 8157746fead1c6ec83688fe29c32e51e7babd376 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 17:17:25 +0100 Subject: [PATCH 296/355] ci(azure-pipelines): properly implement multi-entity caches for dependencies --- .../templates/jobs/setup_dependencies.yaml | 44 +++++++++++-------- azure-pipelines.yaml | 20 ++++++--- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 702c701d9..3275880cc 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -5,8 +5,11 @@ parameters: - name: serviceName type: string - - name: dependenciesArtifacts - type: string + # - name: dependenciesArtifacts + # type: string + - name: dependenciesCaches + type: array + default: [] - name: dependenciesBuildPool type: string default: 'Prod Private Agent Pool' @@ -49,12 +52,13 @@ jobs: IN_CONTAINER: true IN_CI: true steps: - # Restore previously-built dependencies from cache - - task: Cache@2 - displayName: Restore cached ${{parameters.serviceName}} dependencies - inputs: - key: '${{parameters.serviceName}}-dependencies' - path: '${{parameters.dependenciesArtifacts}}' + # Restore previously-built dependencies from caches + - ${{ each cache in parameters.dependenciesCaches }}: + - task: Cache@2 + displayName: Restore cached ${{parameters.serviceName}} dependencies + inputs: + key: "'${{parameters.serviceName}}-dependencies' | ${{cache.key}}" + path: '${{cache.path}}' # - task: DownloadPipelineArtifact@2 # displayName: Download previously built ${{parameters.serviceName}} dependencies # condition: eq(variables.useCachedDependencies, true) @@ -77,15 +81,17 @@ jobs: makeJob: dependencies makeService: ${{parameters.serviceName}} + # (Note: a post-job for updating the dependency cache is automatically created, so no further step is due here.) + # Upload newly-built dependencies as artifacts - - task: CopyFiles@2 - displayName: Copy ${{parameters.serviceName}} dependencies for upload - inputs: - Contents: '${{parameters.dependenciesArtifacts}}' - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: PublishBuildArtifacts@1 - displayName: Upload ${{parameters.serviceName}} dependencies as artifacts - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '${{parameters.serviceName}}-dependencies' - publishLocation: 'Container' \ No newline at end of file + # - task: CopyFiles@2 + # displayName: Copy ${{parameters.serviceName}} dependencies for upload + # inputs: + # Contents: '${{parameters.dependenciesArtifacts}}' + # TargetFolder: '$(Build.ArtifactStagingDirectory)' + # - task: PublishBuildArtifacts@1 + # displayName: Upload ${{parameters.serviceName}} dependencies as artifacts + # inputs: + # PathtoPublish: '$(Build.ArtifactStagingDirectory)' + # ArtifactName: '${{parameters.serviceName}}-dependencies' + # publishLocation: 'Container' \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3f665aebb..b6bdf7eb4 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -24,9 +24,15 @@ parameters: # extraBuildOptions: | # --build-arg NPM_CUSTOM_REGISTRY=https://pkgs.dev.azure.com/fraport/_packaging/packages/npm/registry/ dependsOn: [] - dependenciesArtifacts: | - node_modules/ - .npm/ + dependenciesCaches: + - key: package.json | package-lock.json + path: node_modules/ + - key: package.json | package-lock.json + path: .npm/ + - key: package.json | esbuild.config.mjs | utils/renamer.pl | utils/faviconize.pl | frontend/src/icons.scss + path: assets/icons/ + - key: package.json | esbuild.config.mjs | utils/renamer.pl | utils/faviconize.pl | frontend/src/icons.scss + path: assets/favions/ buildPool: 'Prod Private Agent Pool' buildTimeout: 60 buildArtifacts: | @@ -43,13 +49,13 @@ parameters: tag: 8.10.4 dependsOn: - Build_frontend - dependenciesArtifacts: | - .stack/**/* + dependenciesCaches: + - key: stack.yaml | stack.yaml.lock + path: .stack/ buildPool: 'Prod Private Agent Pool DS3' buildTimeout: 1440 buildArtifacts: | bin/* - .stack-work/**/* variables: buildImageUpstream: devfra.azurecr.io/de.fraport.fradrive.build @@ -69,9 +75,9 @@ stages: - template: .azure-pipelines/templates/jobs/setup_dependencies.yaml parameters: serviceName: ${{service.name}} + dependenciesCaches: ${{service.dependenciesCaches}} dependenciesBuildPool: ${{service.buildPool}} dependenciesBuildTimeout: ${{service.buildTimeout}} - dependenciesArtifacts: ${{service.dependenciesArtifacts}} - stage: Build dependsOn: Setup From 078f46e5a59f127e087923571ebc5af2afa17cf2 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 17:19:14 +0100 Subject: [PATCH 297/355] ci(azure-pipelines): fix dependencies caches type --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 3275880cc..27710c56d 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -8,7 +8,7 @@ parameters: # - name: dependenciesArtifacts # type: string - name: dependenciesCaches - type: array + type: object default: [] - name: dependenciesBuildPool type: string From 8cf41831f0d10e9bfbfbfffe84773efb16dd23ee Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 17:47:32 +0100 Subject: [PATCH 298/355] ci(azure-pipelines): fix cache keys --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 27710c56d..63ea90ff4 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -57,7 +57,7 @@ jobs: - task: Cache@2 displayName: Restore cached ${{parameters.serviceName}} dependencies inputs: - key: "'${{parameters.serviceName}}-dependencies' | ${{cache.key}}" + key: '"${{parameters.serviceName}}-dependencies" | ${{cache.key}}' path: '${{cache.path}}' # - task: DownloadPipelineArtifact@2 # displayName: Download previously built ${{parameters.serviceName}} dependencies From dcc4c70ec26ca6730eb0074025d9c47b743927d3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 18:07:30 +0100 Subject: [PATCH 299/355] ci(azure-pipelines): fix path typo --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index b6bdf7eb4..ab57d9c34 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -32,7 +32,7 @@ parameters: - key: package.json | esbuild.config.mjs | utils/renamer.pl | utils/faviconize.pl | frontend/src/icons.scss path: assets/icons/ - key: package.json | esbuild.config.mjs | utils/renamer.pl | utils/faviconize.pl | frontend/src/icons.scss - path: assets/favions/ + path: assets/favicons/ buildPool: 'Prod Private Agent Pool' buildTimeout: 60 buildArtifacts: | From 08084b619fd470b730dbb1f2d96bf2139e15db3e Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:03:43 +0100 Subject: [PATCH 300/355] chore(release): v27.4.59-test-a0.0.4 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64a35dedd..a68fc78e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.4](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.3...v27.4.59-test-a0.0.4) (2025-02-07) + ## [v27.4.59-test-a0.0.3](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.2...v27.4.59-test-a0.0.3) (2025-02-06) ## [v27.4.59-test-a0.0.2](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.1...v27.4.59-test-a0.0.2) (2025-02-05) From 00711e42c0bb44d9785838724f0e7ca4918c7260 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:06:28 +0100 Subject: [PATCH 301/355] ci(azure-pipelines): tweak triggers --- azure-pipelines.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ab57d9c34..93bdea129 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -6,12 +6,13 @@ trigger: branches: include: - '*' - paths: - exclude: - - CHANGELOG.md + # paths: + # exclude: + # - CHANGELOG.md tags: include: - '*' + exclude: [] parameters: - name: services From fb2647803b1593ddd68e1b5337489cfaae2307a8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:27:57 +0100 Subject: [PATCH 302/355] ci(azure-pipelines): fix build artifact reference --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 93bdea129..403144582 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -103,7 +103,7 @@ stages: - task: CopyFiles@2 displayName: Prepare ${{service.name}} build artifacts for upload inputs: - Contents: ${{service.artifacts}} + Contents: '${{service.buildArtifacts}}' TargetFolder: '$(Build.ArtifactStagingDirectory)' - task: PublishBuildArtifacts@1 displayName: Publish ${{service.name}} build artifacts From 248c8ca42e84c953f5742e5e0aae654a92695982 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:34:13 +0100 Subject: [PATCH 303/355] ci(azure-pipelines): templatify caching; use cache template for dependencies --- .../templates/jobs/setup_dependencies.yaml | 54 +++---------------- .azure-pipelines/templates/steps/cache.yaml | 18 +++++++ 2 files changed, 24 insertions(+), 48 deletions(-) create mode 100644 .azure-pipelines/templates/steps/cache.yaml diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 63ea90ff4..d3b041e8b 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -5,8 +5,6 @@ parameters: - name: serviceName type: string - # - name: dependenciesArtifacts - # type: string - name: dependenciesCaches type: object default: [] @@ -20,18 +18,6 @@ parameters: - name: dependenciesBuildTimeout type: number default: 60 - # - name: dependenciesSource - # type: string - # default: 'current' - # values: - # - 'current' - # - 'specific' - # - name: dependenciesVersion - # type: string - # default: 'latest' - # values: - # - 'latest' - # - 'latestFromBranch' jobs: - job: SetupDependencies_${{parameters.serviceName}} @@ -54,26 +40,11 @@ jobs: steps: # Restore previously-built dependencies from caches - ${{ each cache in parameters.dependenciesCaches }}: - - task: Cache@2 - displayName: Restore cached ${{parameters.serviceName}} dependencies - inputs: - key: '"${{parameters.serviceName}}-dependencies" | ${{cache.key}}' - path: '${{cache.path}}' - # - task: DownloadPipelineArtifact@2 - # displayName: Download previously built ${{parameters.serviceName}} dependencies - # condition: eq(variables.useCachedDependencies, true) - # continueOnError: true - # inputs: - # artifactName: '${{parameters.serviceName}}-dependencies' - # source: ${{parameters.dependenciesSource}} - # project: 'Fahrerausbildung' # TODO: hardcoded for now, could not figure out which predefined variable to use - # pipeline: $(System.DefinitionId) - # buildVersionToDownload: '${{parameters.dependenciesVersion}}' - # # tags: '${{dependenciesArtifacts}}' - # allowPartiallySucceededBuilds: true - # allowFailedBuilds: true - # patterns: '${{parameters.dependenciesArtifacts}}' - # targetPath: '$(Build.Repository.LocalPath)' + - template: ./../../steps/cache.yaml + parameters: + cacheIdent: '${{parameters.serviceName}}-dependencies' + cacheKeys: '${{cache.key}}' + cachePath: '${{cache.path}}' # Compile dependencies - template: ./../../steps/make.yaml @@ -81,17 +52,4 @@ jobs: makeJob: dependencies makeService: ${{parameters.serviceName}} - # (Note: a post-job for updating the dependency cache is automatically created, so no further step is due here.) - - # Upload newly-built dependencies as artifacts - # - task: CopyFiles@2 - # displayName: Copy ${{parameters.serviceName}} dependencies for upload - # inputs: - # Contents: '${{parameters.dependenciesArtifacts}}' - # TargetFolder: '$(Build.ArtifactStagingDirectory)' - # - task: PublishBuildArtifacts@1 - # displayName: Upload ${{parameters.serviceName}} dependencies as artifacts - # inputs: - # PathtoPublish: '$(Build.ArtifactStagingDirectory)' - # ArtifactName: '${{parameters.serviceName}}-dependencies' - # publishLocation: 'Container' \ No newline at end of file + # (Note: a post-job for updating the dependency cache is automatically created, so no further step is due here.) \ No newline at end of file diff --git a/.azure-pipelines/templates/steps/cache.yaml b/.azure-pipelines/templates/steps/cache.yaml new file mode 100644 index 000000000..a86689357 --- /dev/null +++ b/.azure-pipelines/templates/steps/cache.yaml @@ -0,0 +1,18 @@ +# SPDX-FileCopyrightText: 2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: cacheIdent + type: string + - name: cacheKeys + type: string + - name: cachePath + type: string + +steps: + - task: Cache@2 + displayName: Restore ${{parameters.cacheIdent}} cache + inputs: + key: '"${{parameters.cacheIdent}}" | ${{cacheKeys}}' + path: '${{cachePath}}' \ No newline at end of file From 640956df20736323ef313485b0a960a4985ac2e5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:37:15 +0100 Subject: [PATCH 304/355] ci(azure-pipelines): restore dependency caches for build --- azure-pipelines.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 403144582..3100fcf96 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -96,6 +96,12 @@ stages: IN_CONTAINER: true IN_CI: true steps: + - ${{ each dependencyCache in service.dependenciesCaches }}: + - template: .azure-pipelines/templates/steps/cache.yaml + parameters: + cacheIdent: '${{service.name}}-dependencies' + cacheKeys: '${{dependencyCache.key}}' + cachePath: '${{dependencyCache.path}}' - template: .azure-pipelines/templates/steps/make.yaml parameters: makeJob: compile From f310df9647bdab0f2d839b81216711b7e733482a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:37:52 +0100 Subject: [PATCH 305/355] ci(azure-pipelines): fix cache param reference --- .azure-pipelines/templates/steps/cache.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/steps/cache.yaml b/.azure-pipelines/templates/steps/cache.yaml index a86689357..56758e9a7 100644 --- a/.azure-pipelines/templates/steps/cache.yaml +++ b/.azure-pipelines/templates/steps/cache.yaml @@ -14,5 +14,5 @@ steps: - task: Cache@2 displayName: Restore ${{parameters.cacheIdent}} cache inputs: - key: '"${{parameters.cacheIdent}}" | ${{cacheKeys}}' - path: '${{cachePath}}' \ No newline at end of file + key: '"${{parameters.cacheIdent}}" | ${{parameters.cacheKeys}}' + path: '${{parameters.cachePath}}' \ No newline at end of file From 77d737026e6639658193d03d706fa92527cc08c5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 21:38:33 +0100 Subject: [PATCH 306/355] chore(release): v27.4.59-test-a0.0.5 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a68fc78e5..6af813d29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.5](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.4...v27.4.59-test-a0.0.5) (2025-02-07) + ## [v27.4.59-test-a0.0.4](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.3...v27.4.59-test-a0.0.4) (2025-02-07) ## [v27.4.59-test-a0.0.3](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.2...v27.4.59-test-a0.0.3) (2025-02-06) From 0325bb7a6331c662f091e7173125b146ceac9d82 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 7 Feb 2025 23:03:56 +0100 Subject: [PATCH 307/355] ci(azure-pipelines): apply pool and timeout params for build jobs --- azure-pipelines.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 3100fcf96..0bf1d1d16 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -87,6 +87,8 @@ stages: - job: Build_${{service.name}} displayName: Compile ${{service.name}} dependsOn: ${{service.dependsOn}} + pool: '${{service.buildPool}}' + timeoutInMinutes: ${{service.buildTimeout}} container: # TODO: do not use latest on update branches image: $(buildImageUpstream)/${{service.name}}:latest From b2a9a3b4b46abc160a5ac95687b61633097cb918 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 8 Feb 2025 00:14:12 +0100 Subject: [PATCH 308/355] ci(azure-pipelines): reuse parameters.service.dependsOn as identifier for required artifacts --- .../templates/steps/artifact-download.yml | 15 +++++++++++++++ azure-pipelines.yaml | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .azure-pipelines/templates/steps/artifact-download.yml diff --git a/.azure-pipelines/templates/steps/artifact-download.yml b/.azure-pipelines/templates/steps/artifact-download.yml new file mode 100644 index 000000000..23eb32c74 --- /dev/null +++ b/.azure-pipelines/templates/steps/artifact-download.yml @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: 2025 Sarah Vaupel +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +parameters: + - name: artifactName + type: string + +steps: + - task: DownloadPipelineArtifact@2 + displayName: Download artifacts from ${{parameters.artifactName}} + inputs: + source: 'current' + artifactName: '${{parameters.artifactName}}' + targetPath: '$(Build.Repository.LocalPath)' \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 0bf1d1d16..f35e8fd98 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -104,6 +104,10 @@ stages: cacheIdent: '${{service.name}}-dependencies' cacheKeys: '${{dependencyCache.key}}' cachePath: '${{dependencyCache.path}}' + - ${{ each dependency in service.dependsOn }}: + - template: .azure-pipelines/templates/steps/artifact-download.yaml + parameters: + artifactName: '${{dependency}}' - template: .azure-pipelines/templates/steps/make.yaml parameters: makeJob: compile @@ -117,7 +121,7 @@ stages: displayName: Publish ${{service.name}} build artifacts inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: '${{service.name}}' + ArtifactName: 'Build_${{service.name}}' publishLocation: 'Container' # - stage: Test From fc713fdbd0078a91f4467267fd05528a43bb94fc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 8 Feb 2025 00:14:59 +0100 Subject: [PATCH 309/355] ci(azure-pipelines): rename artifact-download yaml --- .../steps/{artifact-download.yml => artifact-download.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .azure-pipelines/templates/steps/{artifact-download.yml => artifact-download.yaml} (100%) diff --git a/.azure-pipelines/templates/steps/artifact-download.yml b/.azure-pipelines/templates/steps/artifact-download.yaml similarity index 100% rename from .azure-pipelines/templates/steps/artifact-download.yml rename to .azure-pipelines/templates/steps/artifact-download.yaml From 235d03d173de476404064b6e8ca305fd18f44896 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 8 Feb 2025 01:03:14 +0100 Subject: [PATCH 310/355] chore(release): v27.4.59-test-a0.0.6 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6af813d29..d69f11234 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.6](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.5...v27.4.59-test-a0.0.6) (2025-02-08) + ## [v27.4.59-test-a0.0.5](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.4...v27.4.59-test-a0.0.5) (2025-02-07) ## [v27.4.59-test-a0.0.4](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.3...v27.4.59-test-a0.0.4) (2025-02-07) From 0aeb28088df3e2763a0be559e44eb91369695c79 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sat, 8 Feb 2025 15:40:06 +0100 Subject: [PATCH 311/355] ci(azure-pipelines): fix release binary download path --- .azure-pipelines/templates/jobs/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/templates/jobs/release.yaml b/.azure-pipelines/templates/jobs/release.yaml index 0f7454a85..dff112582 100644 --- a/.azure-pipelines/templates/jobs/release.yaml +++ b/.azure-pipelines/templates/jobs/release.yaml @@ -24,8 +24,8 @@ jobs: - task: DownloadPipelineArtifact@2 displayName: Download FraDrive binaries inputs: - artifactName: backend - patterns: 'backend/bin/*' + artifactName: Build_backend + patterns: 'Build_backend/bin/*' targetPath: '$(Build.Repository.LocalPath)' - task: Docker@2 From 043b9344f630a4ba02297aa6c793a8804d5650ac Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 9 Feb 2025 12:34:38 +0100 Subject: [PATCH 312/355] build(docker/fradrive): remove locale-gen [skip ci] --- docker/fradrive/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile index aa82887bc..1e9d72c60 100755 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -5,9 +5,9 @@ FROM ${FROM_IMG}:${FROM_TAG} # Setup locales # RUN apt-get update && apt-get -y install locales locales-all -RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ - locale-gen -ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 +# RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ +# locale-gen +# ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 # FraDrive runtime dependencies # TODO: minimize texlive dependencies, switch to basic schemes where possible From 586550f2fd599f2bb342d01a771e3dd54eb00d52 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 9 Feb 2025 19:10:19 +0100 Subject: [PATCH 313/355] build(docker/fradrive): fix uniworxdb binary destination path [skip ci] --- docker/fradrive/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile index 1e9d72c60..3f1832dda 100755 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -25,7 +25,7 @@ RUN mkdir -p /var/log/uniworx && chown -R uniworx:uniworx /var/log/uniworx # RUN install -d -g uniworx -o uniworx -m 0750 /var/lib/uniworx # RUN install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx COPY ./bin/uniworx /usr/bin/uniworx -COPY ./bin/uniworxdb /usr/bin/uniworx +COPY ./bin/uniworxdb /usr/bin/uniworxdb # COPY uniworxload /usr/bin/uniworx USER uniworx From 6e3286b8a70bded1f31994007a9d788986c6c4c5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 13:47:42 +0100 Subject: [PATCH 314/355] ci(azure-pipelines): push releases to registry --- .azure-pipelines/templates/jobs/release.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/release.yaml b/.azure-pipelines/templates/jobs/release.yaml index dff112582..b9d3602ca 100644 --- a/.azure-pipelines/templates/jobs/release.yaml +++ b/.azure-pipelines/templates/jobs/release.yaml @@ -48,7 +48,11 @@ jobs: --build-arg IN_CI=true \ --build-arg IN_CONTAINER=true \ . - # TODO: tag and push to registry + - task: Docker@2 + displayName: Push container to registry + inputs: + command: push + tags: '$(Build.BuildNumber),${{parameters.releaseTag}}' - task: Docker@2 displayName: Logout from container registry inputs: From b9486187d86c5b2b9c93c744e391d3b9c6ffc633 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 13:55:47 +0100 Subject: [PATCH 315/355] ci(azure-pipelines): tweak triggers --- azure-pipelines.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index f35e8fd98..a3f2cbef6 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -6,13 +6,12 @@ trigger: branches: include: - '*' - # paths: - # exclude: - # - CHANGELOG.md tags: include: - '*' - exclude: [] + # paths: + # exclude: + # - CHANGELOG.md parameters: - name: services From 019d6475c5a7634ff94230dd8823227dad0e0cbd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 14:07:46 +0100 Subject: [PATCH 316/355] build(Makefile): fix release target --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f49dfd8a..a6d85c4d7 100644 --- a/Makefile +++ b/Makefile @@ -83,9 +83,9 @@ clean-all: clean release: VERSION=`./utils/version.pl -changelog CHANGELOG.md -v` ; \ git add CHANGELOG.md ; \ + git commit -m "chore(release): $${VERSION}" ; \ git tag $${VERSION} ; \ - git commit -m "chore(release): $${VERSION}" -# git push + git push origin ${VERSION} .PHONY: compile compile: From 3cd48bdea1694a14e0644330b6a39975999b3674 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 14:08:04 +0100 Subject: [PATCH 317/355] chore(release): v27.4.59-test-a0.0.7 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d69f11234..c8b74dad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.7](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.6...v27.4.59-test-a0.0.7) (2025-02-10) + ## [v27.4.59-test-a0.0.6](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.5...v27.4.59-test-a0.0.6) (2025-02-08) ## [v27.4.59-test-a0.0.5](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.4...v27.4.59-test-a0.0.5) (2025-02-07) From df677182415aa55d44ee2adea1b5d580c22ef7dc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 14:08:46 +0100 Subject: [PATCH 318/355] ci(azure-pipelines): exclude CHANGELOG changes as trigger [skip ci] --- azure-pipelines.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index a3f2cbef6..34aaf09e1 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -9,9 +9,9 @@ trigger: tags: include: - '*' - # paths: - # exclude: - # - CHANGELOG.md + paths: + exclude: + - CHANGELOG.md parameters: - name: services From 5e76a778213f9f1799c60167b4b1d112bd3c84fc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 14:08:56 +0100 Subject: [PATCH 319/355] chore(release): v27.4.59-test-a0.0.8 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8b74dad3..550bdf281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.8](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.7...v27.4.59-test-a0.0.8) (2025-02-10) + ## [v27.4.59-test-a0.0.7](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.6...v27.4.59-test-a0.0.7) (2025-02-10) ## [v27.4.59-test-a0.0.6](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.5...v27.4.59-test-a0.0.6) (2025-02-08) From ee498be12f7d3b387ccee655e7c4392bad6cd800 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 14:09:34 +0100 Subject: [PATCH 320/355] revert(azure-pipelines): revert path exclude --- azure-pipelines.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 34aaf09e1..7e3395613 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -9,9 +9,9 @@ trigger: tags: include: - '*' - paths: - exclude: - - CHANGELOG.md + #paths: + # exclude: + # - CHANGELOG.md parameters: - name: services From 258a240a773ca67c006ee931c3282e1f6a6d6efe Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 14:09:58 +0100 Subject: [PATCH 321/355] chore(release): v27.4.59-test-a0.0.9 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 550bdf281..878538911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.9](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.8...v27.4.59-test-a0.0.9) (2025-02-10) + ## [v27.4.59-test-a0.0.8](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.7...v27.4.59-test-a0.0.8) (2025-02-10) ## [v27.4.59-test-a0.0.7](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.6...v27.4.59-test-a0.0.7) (2025-02-10) From 084b9258dd8e1fdb2027089373fefcf64c9115ca Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:04:47 +0100 Subject: [PATCH 322/355] ci(azure-pipelines): start postgres container for tests --- azure-pipelines.yaml | 50 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 7e3395613..ff8eb787a 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -123,30 +123,36 @@ stages: ArtifactName: 'Build_${{service.name}}' publishLocation: 'Container' -# - stage: Test -# dependsOn: Setup -# condition: eq(variables.skipTests, false) -# jobs: -# - ${{ each service in parameters.services }}: -# - job: Test_${{service.name}} -# displayName: Compile ${{service.name}} -# dependsOn: ${{service.dependsOn}} -# steps: -# - template: .azure-pipelines/templates/steps/make.yaml -# parameters: -# makeJob: lint -# makeService: ${{service.name}} -# - template: .azure-pipelines/templates/steps/make.yaml -# parameters: -# makeJob: test -# makeService: ${{service.name}} -# - job: TestReport_${{service.name}} -# displayName: Upload test reports for ${{service.name}} -# steps: -# - script: echo "Work in progress" # TODO +- stage: Test + dependsOn: Setup + condition: eq(variables.skipTests, false) + jobs: + - task: Bash@3 + displayName: Start database container for testing + inputs: + targetType: inline + script: | + docker run -d devfra.azurecr.io/de.fraport.trusted/postgres:16.1-bookworm + - ${{ each service in parameters.services }}: + - job: Test_${{service.name}} + displayName: Run ${{service.name}} tests + dependsOn: ${{service.dependsOn}} + steps: + - template: .azure-pipelines/templates/steps/make.yaml + parameters: + makeJob: lint + makeService: ${{service.name}} + - template: .azure-pipelines/templates/steps/make.yaml + parameters: + makeJob: test + makeService: ${{service.name}} + - job: TestReport_${{service.name}} + displayName: Upload test reports for ${{service.name}} + steps: + - script: echo "Work in progress" # TODO - stage: Release - dependsOn: Build # TODO include Test iff not skipped + dependsOn: Test condition: or(eq(variables.forceRelease, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) jobs: - template: .azure-pipelines/templates/jobs/release.yaml From dea9faa055d664b5443df0f1a3c3548c035ee74b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:06:43 +0100 Subject: [PATCH 323/355] ci(azure-pipelines): fix test container step --- azure-pipelines.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index ff8eb787a..00e404689 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -127,17 +127,17 @@ stages: dependsOn: Setup condition: eq(variables.skipTests, false) jobs: - - task: Bash@3 - displayName: Start database container for testing - inputs: - targetType: inline - script: | - docker run -d devfra.azurecr.io/de.fraport.trusted/postgres:16.1-bookworm - ${{ each service in parameters.services }}: - job: Test_${{service.name}} displayName: Run ${{service.name}} tests dependsOn: ${{service.dependsOn}} steps: + - task: Bash@3 + displayName: Start database container for testing + inputs: + targetType: inline + script: | + docker run -d devfra.azurecr.io/de.fraport.trusted/postgres:16.1-bookworm - template: .azure-pipelines/templates/steps/make.yaml parameters: makeJob: lint From 9f411e329dbaed50667b9d97879a003edc74e90b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:07:41 +0100 Subject: [PATCH 324/355] ci(azure-pipelines): remove job-level dependsOn for test --- azure-pipelines.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 00e404689..8a12ad27f 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -130,7 +130,6 @@ stages: - ${{ each service in parameters.services }}: - job: Test_${{service.name}} displayName: Run ${{service.name}} tests - dependsOn: ${{service.dependsOn}} steps: - task: Bash@3 displayName: Start database container for testing From 9f49cef214f3b2aac489e03ca48a5762fd3c1136 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:13:02 +0100 Subject: [PATCH 325/355] ci(azure-pipelines): perform registry login/logout for testing --- azure-pipelines.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 8a12ad27f..47b0c7b4d 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -131,6 +131,11 @@ stages: - job: Test_${{service.name}} displayName: Run ${{service.name}} tests steps: + - task: Docker@2 + displayName: Login to container registry + inputs: + command: login + containerRegistry: devfra - task: Bash@3 displayName: Start database container for testing inputs: @@ -145,6 +150,11 @@ stages: parameters: makeJob: test makeService: ${{service.name}} + - task: Docker@2 + displayName: Logout from container registry + inputs: + command: logout + containerRegistry: devfra - job: TestReport_${{service.name}} displayName: Upload test reports for ${{service.name}} steps: From 0821b74fb78d09baeb6c12636c8280f696f621d5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:14:48 +0100 Subject: [PATCH 326/355] ci(azure-pipelines): make tests dependent on build instead of setup only --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 47b0c7b4d..c4fb727f8 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -124,7 +124,7 @@ stages: publishLocation: 'Container' - stage: Test - dependsOn: Setup + dependsOn: Build condition: eq(variables.skipTests, false) jobs: - ${{ each service in parameters.services }}: From 6b3775b9b95602e6859e67eee512687f5b10a229 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:18:28 +0100 Subject: [PATCH 327/355] ci(azure-pipelines): run tests in correct service containers --- azure-pipelines.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index c4fb727f8..2d08db398 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -130,6 +130,16 @@ stages: - ${{ each service in parameters.services }}: - job: Test_${{service.name}} displayName: Run ${{service.name}} tests + pool: '${{service.buildPool}}' + timeoutInMinutes: ${{service.buildTimeout}} + container: + # TODO: do not use latest on update branches + image: $(buildImageUpstream)/${{service.name}}:latest + endpoint: devfra + env: + PROJECT_DIR: $(Build.Repository.LocalPath) + IN_CONTAINER: true + IN_CI: true steps: - task: Docker@2 displayName: Login to container registry From 7a1139807d847d1dcf434a80149814f81dd75836 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:20:09 +0100 Subject: [PATCH 328/355] ci(azure-pipelines): use caches for testing --- azure-pipelines.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2d08db398..1c2aeaf9d 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -141,6 +141,16 @@ stages: IN_CONTAINER: true IN_CI: true steps: + - ${{ each dependencyCache in service.dependenciesCaches }}: + - template: .azure-pipelines/templates/steps/cache.yaml + parameters: + cacheIdent: '${{service.name}}-dependencies' + cacheKeys: '${{dependencyCache.key}}' + cachePath: '${{dependencyCache.path}}' + - ${{ each dependency in service.dependsOn }}: + - template: .azure-pipelines/templates/steps/artifact-download.yaml + parameters: + artifactName: '${{dependency}}' - task: Docker@2 displayName: Login to container registry inputs: From 7e8d910496681424f26bcada8ddde2b961fc56ad Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 15:56:59 +0100 Subject: [PATCH 329/355] ci(azure-pipelines): restrict number of used cores everywhere to allow for canceling jobs --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 4 ++++ .azure-pipelines/templates/steps/make.yaml | 5 ++++- azure-pipelines.yaml | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index d3b041e8b..ad31ed1a4 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -15,6 +15,9 @@ parameters: - 'Prod Private Agent Pool' - 'Prod Private Agent Pool DS2' - 'Prod Private Agent Pool DS3' + - name: dependenciesBuildCores + type: number + default: 1 - name: dependenciesBuildTimeout type: number default: 60 @@ -51,5 +54,6 @@ jobs: parameters: makeJob: dependencies makeService: ${{parameters.serviceName}} + makeVars: 'CPU_CORES=${{parameters.dependenciesBuildCores}} STACK_CORES=${{parameters.dependenciesBuildCores}}' # (Note: a post-job for updating the dependency cache is automatically created, so no further step is due here.) \ No newline at end of file diff --git a/.azure-pipelines/templates/steps/make.yaml b/.azure-pipelines/templates/steps/make.yaml index f7143e56c..f134e3354 100644 --- a/.azure-pipelines/templates/steps/make.yaml +++ b/.azure-pipelines/templates/steps/make.yaml @@ -15,6 +15,9 @@ parameters: values: - frontend - backend + - name: makeVars + type: string + default: '' steps: - task: Bash@3 @@ -29,4 +32,4 @@ steps: inputs: targetType: inline script: | - make -- --${{parameters.makeJob}}-${{parameters.makeService}} IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} \ No newline at end of file + make -- --${{parameters.makeJob}}-${{parameters.makeService}} IN_CONTAINER=true IN_CI=true PROJECT_DIR=${PROJECT_DIR} ${{parameters.makeVars}} \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 1c2aeaf9d..5d7823bd0 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -34,6 +34,7 @@ parameters: - key: package.json | esbuild.config.mjs | utils/renamer.pl | utils/faviconize.pl | frontend/src/icons.scss path: assets/favicons/ buildPool: 'Prod Private Agent Pool' + buildCores: 1 buildTimeout: 60 buildArtifacts: | assets/icons/fradrive/*.svg @@ -53,6 +54,7 @@ parameters: - key: stack.yaml | stack.yaml.lock path: .stack/ buildPool: 'Prod Private Agent Pool DS3' + buildCores: 3 buildTimeout: 1440 buildArtifacts: | bin/* @@ -77,6 +79,7 @@ stages: serviceName: ${{service.name}} dependenciesCaches: ${{service.dependenciesCaches}} dependenciesBuildPool: ${{service.buildPool}} + dependenciesBuildCores: ${{service.buildCores}} dependenciesBuildTimeout: ${{service.buildTimeout}} - stage: Build @@ -111,6 +114,7 @@ stages: parameters: makeJob: compile makeService: ${{service.name}} + makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=${{service.buildCores}}' - task: CopyFiles@2 displayName: Prepare ${{service.name}} build artifacts for upload inputs: @@ -166,10 +170,12 @@ stages: parameters: makeJob: lint makeService: ${{service.name}} + makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=${{service.buildCores}}' - template: .azure-pipelines/templates/steps/make.yaml parameters: makeJob: test makeService: ${{service.name}} + makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=${{service.buildCores}}' - task: Docker@2 displayName: Logout from container registry inputs: From 406c14dd8696c83b97c075442a2c581030d9d4f0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 16:50:20 +0100 Subject: [PATCH 330/355] ci(azure-pipelines): fix STACK_CORES --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 2 +- azure-pipelines.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index ad31ed1a4..322175ddd 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -54,6 +54,6 @@ jobs: parameters: makeJob: dependencies makeService: ${{parameters.serviceName}} - makeVars: 'CPU_CORES=${{parameters.dependenciesBuildCores}} STACK_CORES=${{parameters.dependenciesBuildCores}}' + makeVars: 'CPU_CORES=${{parameters.dependenciesBuildCores}} STACK_CORES=-j${{parameters.dependenciesBuildCores}}' # (Note: a post-job for updating the dependency cache is automatically created, so no further step is due here.) \ No newline at end of file diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 5d7823bd0..57d7588c9 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -114,7 +114,7 @@ stages: parameters: makeJob: compile makeService: ${{service.name}} - makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=${{service.buildCores}}' + makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' - task: CopyFiles@2 displayName: Prepare ${{service.name}} build artifacts for upload inputs: @@ -170,12 +170,12 @@ stages: parameters: makeJob: lint makeService: ${{service.name}} - makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=${{service.buildCores}}' + makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' - template: .azure-pipelines/templates/steps/make.yaml parameters: makeJob: test makeService: ${{service.name}} - makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=${{service.buildCores}}' + makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' - task: Docker@2 displayName: Logout from container registry inputs: From db75978dcf9338d656382a89dad58fade3ed56cc Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 19:30:09 +0100 Subject: [PATCH 331/355] ci(azure-pipelines): temporarily disable tests --- azure-pipelines.yaml | 116 +++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 57d7588c9..6c8dcc584 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -127,64 +127,64 @@ stages: ArtifactName: 'Build_${{service.name}}' publishLocation: 'Container' -- stage: Test - dependsOn: Build - condition: eq(variables.skipTests, false) - jobs: - - ${{ each service in parameters.services }}: - - job: Test_${{service.name}} - displayName: Run ${{service.name}} tests - pool: '${{service.buildPool}}' - timeoutInMinutes: ${{service.buildTimeout}} - container: - # TODO: do not use latest on update branches - image: $(buildImageUpstream)/${{service.name}}:latest - endpoint: devfra - env: - PROJECT_DIR: $(Build.Repository.LocalPath) - IN_CONTAINER: true - IN_CI: true - steps: - - ${{ each dependencyCache in service.dependenciesCaches }}: - - template: .azure-pipelines/templates/steps/cache.yaml - parameters: - cacheIdent: '${{service.name}}-dependencies' - cacheKeys: '${{dependencyCache.key}}' - cachePath: '${{dependencyCache.path}}' - - ${{ each dependency in service.dependsOn }}: - - template: .azure-pipelines/templates/steps/artifact-download.yaml - parameters: - artifactName: '${{dependency}}' - - task: Docker@2 - displayName: Login to container registry - inputs: - command: login - containerRegistry: devfra - - task: Bash@3 - displayName: Start database container for testing - inputs: - targetType: inline - script: | - docker run -d devfra.azurecr.io/de.fraport.trusted/postgres:16.1-bookworm - - template: .azure-pipelines/templates/steps/make.yaml - parameters: - makeJob: lint - makeService: ${{service.name}} - makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' - - template: .azure-pipelines/templates/steps/make.yaml - parameters: - makeJob: test - makeService: ${{service.name}} - makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' - - task: Docker@2 - displayName: Logout from container registry - inputs: - command: logout - containerRegistry: devfra - - job: TestReport_${{service.name}} - displayName: Upload test reports for ${{service.name}} - steps: - - script: echo "Work in progress" # TODO +# - stage: Test +# dependsOn: Build +# condition: eq(variables.skipTests, false) +# jobs: +# - ${{ each service in parameters.services }}: +# - job: Test_${{service.name}} +# displayName: Run ${{service.name}} tests +# pool: '${{service.buildPool}}' +# timeoutInMinutes: ${{service.buildTimeout}} +# container: +# # TODO: do not use latest on update branches +# image: $(buildImageUpstream)/${{service.name}}:latest +# endpoint: devfra +# env: +# PROJECT_DIR: $(Build.Repository.LocalPath) +# IN_CONTAINER: true +# IN_CI: true +# steps: +# - ${{ each dependencyCache in service.dependenciesCaches }}: +# - template: .azure-pipelines/templates/steps/cache.yaml +# parameters: +# cacheIdent: '${{service.name}}-dependencies' +# cacheKeys: '${{dependencyCache.key}}' +# cachePath: '${{dependencyCache.path}}' +# - ${{ each dependency in service.dependsOn }}: +# - template: .azure-pipelines/templates/steps/artifact-download.yaml +# parameters: +# artifactName: '${{dependency}}' +# - task: Docker@2 +# displayName: Login to container registry +# inputs: +# command: login +# containerRegistry: devfra +# - task: Bash@3 +# displayName: Start database container for testing +# inputs: +# targetType: inline +# script: | +# docker run -d devfra.azurecr.io/de.fraport.trusted/postgres:16.1-bookworm +# - template: .azure-pipelines/templates/steps/make.yaml +# parameters: +# makeJob: lint +# makeService: ${{service.name}} +# makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' +# - template: .azure-pipelines/templates/steps/make.yaml +# parameters: +# makeJob: test +# makeService: ${{service.name}} +# makeVars: 'CPU_CORES=${{service.buildCores}} STACK_CORES=-j${{service.buildCores}}' +# - task: Docker@2 +# displayName: Logout from container registry +# inputs: +# command: logout +# containerRegistry: devfra +# - job: TestReport_${{service.name}} +# displayName: Upload test reports for ${{service.name}} +# steps: +# - script: echo "Work in progress" # TODO - stage: Release dependsOn: Test From 4661eab21873ee298d11c27036b8c1b0fd778765 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 10 Feb 2025 19:30:58 +0100 Subject: [PATCH 332/355] ci(azure-pipelines): contd --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 6c8dcc584..2a2055f57 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -187,7 +187,7 @@ stages: # - script: echo "Work in progress" # TODO - stage: Release - dependsOn: Test + dependsOn: Build # TODO Test condition: or(eq(variables.forceRelease, true), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) jobs: - template: .azure-pipelines/templates/jobs/release.yaml From 9d16a22fd718684485e394da7b0fb564f359f010 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:12:54 +0100 Subject: [PATCH 333/355] ci(azure-pipelines): add repository for release push --- .azure-pipelines/templates/jobs/release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/templates/jobs/release.yaml b/.azure-pipelines/templates/jobs/release.yaml index b9d3602ca..d61c7b7b7 100644 --- a/.azure-pipelines/templates/jobs/release.yaml +++ b/.azure-pipelines/templates/jobs/release.yaml @@ -52,6 +52,7 @@ jobs: displayName: Push container to registry inputs: command: push + repository: '$(Build.Repository.Uri)' tags: '$(Build.BuildNumber),${{parameters.releaseTag}}' - task: Docker@2 displayName: Logout from container registry From 965ae3da29c77ef6e07ed50a535cd4d4906bc4a7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:13:57 +0100 Subject: [PATCH 334/355] build(Makefile): push commit separately for release --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a6d85c4d7..d06454643 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ release: VERSION=`./utils/version.pl -changelog CHANGELOG.md -v` ; \ git add CHANGELOG.md ; \ git commit -m "chore(release): $${VERSION}" ; \ + git push ; \ git tag $${VERSION} ; \ git push origin ${VERSION} From 6dda12cc66d34b431df974bad2b849960fbbad3a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:14:12 +0100 Subject: [PATCH 335/355] chore(release): v27.4.59-test-a0.0.10 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 878538911..e57642137 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-a0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.9...v27.4.59-test-a0.0.10) (2025-02-11) + ## [v27.4.59-test-a0.0.9](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.8...v27.4.59-test-a0.0.9) (2025-02-10) ## [v27.4.59-test-a0.0.8](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.7...v27.4.59-test-a0.0.8) (2025-02-10) From 7d621f0e0f431e4c5875ba06bb2dd34f41aeffba Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:14:53 +0100 Subject: [PATCH 336/355] build(Makefile): release - wait before tagging [skip ci] --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d06454643..734f4b087 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,7 @@ release: git add CHANGELOG.md ; \ git commit -m "chore(release): $${VERSION}" ; \ git push ; \ + sleep 5 ; \ git tag $${VERSION} ; \ git push origin ${VERSION} From 5c65c04ce70011173ba78371915d3db368d870d3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:15:01 +0100 Subject: [PATCH 337/355] chore(release): v27.4.59-test-b0.0.10 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e57642137..9d859d686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-b0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.10...v27.4.59-test-b0.0.10) (2025-02-11) + ## [v27.4.59-test-a0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.9...v27.4.59-test-a0.0.10) (2025-02-11) ## [v27.4.59-test-a0.0.9](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.8...v27.4.59-test-a0.0.9) (2025-02-10) From f351c7485e67a1f2e275d6323d144343b1d6f2d0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:15:42 +0100 Subject: [PATCH 338/355] chore(release): v27.4.59-test-c0.0.10 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d859d686..125a80e5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-c0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-b0.0.10...v27.4.59-test-c0.0.10) (2025-02-11) + ## [v27.4.59-test-b0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.10...v27.4.59-test-b0.0.10) (2025-02-11) ## [v27.4.59-test-a0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.9...v27.4.59-test-a0.0.10) (2025-02-11) From 3a1b6cf72ca39d04e39b8755fa74ee1af8e8ddbd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:19:29 +0100 Subject: [PATCH 339/355] chore(release): v27.4.59-test-b0.0.11 [skip ci] --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 125a80e5f..b9e5cc2d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-b0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-c0.0.10...v27.4.59-test-b0.0.11) (2025-02-11) + ## [v27.4.59-test-c0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-b0.0.10...v27.4.59-test-c0.0.10) (2025-02-11) ## [v27.4.59-test-b0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-a0.0.10...v27.4.59-test-b0.0.10) (2025-02-11) From 88342f73361e413aab57057df255c28aba765b59 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:20:17 +0100 Subject: [PATCH 340/355] chore(release): v27.4.59-test-c0.0.11 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9e5cc2d1..ad17d1074 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-c0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-b0.0.11...v27.4.59-test-c0.0.11) (2025-02-11) + ## [v27.4.59-test-b0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-c0.0.10...v27.4.59-test-b0.0.11) (2025-02-11) ## [v27.4.59-test-c0.0.10](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-b0.0.10...v27.4.59-test-c0.0.10) (2025-02-11) From c3399c49b34bf79060ebe313392b3172bad62efa Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:21:18 +0100 Subject: [PATCH 341/355] chore(release): v27.4.59-test-d0.0.11 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad17d1074..b5ed13e3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-d0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-c0.0.11...v27.4.59-test-d0.0.11) (2025-02-11) + ## [v27.4.59-test-c0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-b0.0.11...v27.4.59-test-c0.0.11) (2025-02-11) ## [v27.4.59-test-b0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-c0.0.10...v27.4.59-test-b0.0.11) (2025-02-11) From 20954b1351eec3a47048168884bc72f3d9c303ba Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:21:58 +0100 Subject: [PATCH 342/355] build(Makefile): fix release target using correct template splice --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 734f4b087..89fb315b7 100644 --- a/Makefile +++ b/Makefile @@ -85,9 +85,8 @@ release: git add CHANGELOG.md ; \ git commit -m "chore(release): $${VERSION}" ; \ git push ; \ - sleep 5 ; \ git tag $${VERSION} ; \ - git push origin ${VERSION} + git push origin $${VERSION} .PHONY: compile compile: From 7ed6b843bfb89fa5e4afaee717d223e97e410bc3 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 11 Feb 2025 23:25:03 +0100 Subject: [PATCH 343/355] chore(release): v27.4.59-test-d0.0.12 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5ed13e3d..654f9cd43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-d0.0.12](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-d0.0.11...v27.4.59-test-d0.0.12) (2025-02-11) + ## [v27.4.59-test-d0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-c0.0.11...v27.4.59-test-d0.0.11) (2025-02-11) ## [v27.4.59-test-c0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-b0.0.11...v27.4.59-test-c0.0.11) (2025-02-11) From 8e1bb820175ecd853fb8f847034e1fdc16fb36a6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 13:28:46 +0100 Subject: [PATCH 344/355] ci(azure-pipelines): fix release repository --- .azure-pipelines/templates/jobs/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/release.yaml b/.azure-pipelines/templates/jobs/release.yaml index d61c7b7b7..8a3be491e 100644 --- a/.azure-pipelines/templates/jobs/release.yaml +++ b/.azure-pipelines/templates/jobs/release.yaml @@ -52,7 +52,7 @@ jobs: displayName: Push container to registry inputs: command: push - repository: '$(Build.Repository.Uri)' + repository: '$(buildImageUpstream)/fradrive' tags: '$(Build.BuildNumber),${{parameters.releaseTag}}' - task: Docker@2 displayName: Logout from container registry From 53d9c17fb5cb3499fc63a083ca4efd148caccf54 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 13:29:19 +0100 Subject: [PATCH 345/355] chore(release): v27.4.59-test-e0.0.12 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 654f9cd43..76e359fda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-e0.0.12](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-d0.0.12...v27.4.59-test-e0.0.12) (2025-02-12) + ## [v27.4.59-test-d0.0.12](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-d0.0.11...v27.4.59-test-d0.0.12) (2025-02-11) ## [v27.4.59-test-d0.0.11](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-c0.0.11...v27.4.59-test-d0.0.11) (2025-02-11) From a04732b5fb291b8f2742c8840ed41abef2808eac Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 13:36:16 +0100 Subject: [PATCH 346/355] build(Makefile): remove obsolete git push for release [skip ci] --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 89fb315b7..6f2c66c42 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,6 @@ release: VERSION=`./utils/version.pl -changelog CHANGELOG.md -v` ; \ git add CHANGELOG.md ; \ git commit -m "chore(release): $${VERSION}" ; \ - git push ; \ git tag $${VERSION} ; \ git push origin $${VERSION} From ea92e17949a3837f28a73963f730c06259d3e77c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 15:02:15 +0100 Subject: [PATCH 347/355] ci(azure-pipelines): fix master-branch check for updating latest --- .azure-pipelines/templates/jobs/setup_image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_image.yaml b/.azure-pipelines/templates/jobs/setup_image.yaml index 2028e2cc2..8eceb73ef 100644 --- a/.azure-pipelines/templates/jobs/setup_image.yaml +++ b/.azure-pipelines/templates/jobs/setup_image.yaml @@ -47,7 +47,7 @@ jobs: docker push $(buildImageUpstream)/${{parameters.imageName}}:$(Build.BuildNumber) - task: Bash@3 displayName: Update latest ${{parameters.imageName}} image - condition: or(eq(variables.forcePushLatest, true), eq(variables.onMasterBranch, true)) + condition: or(eq(variables.forcePushLatest, true), eq(variables['Build.SourceBranch'], 'refs/heads/master')) inputs: targetType: inline script: | From 32441fc9c7bb7dcd6f214f297eed61491ca7e7c6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 15:04:56 +0100 Subject: [PATCH 348/355] ci(azure-pipelines): do not use latest images if images have been rebuilt --- .azure-pipelines/templates/jobs/setup_dependencies.yaml | 6 ++++-- azure-pipelines.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/templates/jobs/setup_dependencies.yaml b/.azure-pipelines/templates/jobs/setup_dependencies.yaml index 322175ddd..415f1d6bd 100644 --- a/.azure-pipelines/templates/jobs/setup_dependencies.yaml +++ b/.azure-pipelines/templates/jobs/setup_dependencies.yaml @@ -33,8 +33,10 @@ jobs: pool: '${{parameters.dependenciesBuildPool}}' timeoutInMinutes: ${{parameters.dependenciesBuildTimeout}} container: - # TODO: do not use latest on update branches - image: $(buildImageUpstream)/${{parameters.serviceName}}:latest + ${{ if variables.setupImages }}: + image: $(buildImageUpstream)/${{parameters.serviceName}}:$(Build.BuildNumber) + ${{ else }}: + image: $(buildImageUpstream)/${{parameters.serviceName}}:latest endpoint: devfra env: PROJECT_DIR: $(Build.Repository.LocalPath) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 2a2055f57..19892854d 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -92,8 +92,10 @@ stages: pool: '${{service.buildPool}}' timeoutInMinutes: ${{service.buildTimeout}} container: - # TODO: do not use latest on update branches - image: $(buildImageUpstream)/${{service.name}}:latest + ${{ if variables.setupImages }}: + image: $(buildImageUpstream)/${{service.name}}:$(Build.BuildNumber) + ${{ else }}: + image: $(buildImageUpstream)/${{service.name}}:latest endpoint: devfra env: PROJECT_DIR: $(Build.Repository.LocalPath) From 010fb965d96f12622317d8b2d84194f420d61ce1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 15:15:55 +0100 Subject: [PATCH 349/355] ci(azure-pipelines): publish built images as artifacts --- .azure-pipelines/templates/jobs/setup_image.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.azure-pipelines/templates/jobs/setup_image.yaml b/.azure-pipelines/templates/jobs/setup_image.yaml index 8eceb73ef..5fd943d0a 100644 --- a/.azure-pipelines/templates/jobs/setup_image.yaml +++ b/.azure-pipelines/templates/jobs/setup_image.yaml @@ -53,6 +53,18 @@ jobs: script: | docker tag $(buildImageUpstream)/${{parameters.imageName}}:$(Build.BuildNumber) $(buildImageUpstream)/${{parameters.imageName}}:latest docker push $(buildImageUpstream)/${{parameters.imageName}}:latest + - task: Bash@3 + displayName: Save image for publication + inputs: + targetType: inline + script: | + docker image save --output=$(Build.ArtifactStagingDirectory)/${{parameters.imageName}}.tar $(buildImageUpstream)/${{parameters.imageName}}:$(Build.BuildNumber) + - task: PublishBuildArtifacts@1 + displayName: Publish image as artifact + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: ${{parameters.imageName}} + publishLocation: 'Container' - task: Docker@2 displayName: Logout from container registry inputs: From 2d80c6e0ab9cbe577bd22e421269cb6e5f42fc89 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 15:18:44 +0100 Subject: [PATCH 350/355] ci(azure-pipelines): fix image version check for build --- azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 19892854d..61fbf0a2c 100755 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -92,7 +92,7 @@ stages: pool: '${{service.buildPool}}' timeoutInMinutes: ${{service.buildTimeout}} container: - ${{ if variables.setupImages }}: + ${{ if eq(variables.setupImages, true) }}: image: $(buildImageUpstream)/${{service.name}}:$(Build.BuildNumber) ${{ else }}: image: $(buildImageUpstream)/${{service.name}}:latest From 7c1a7e1e9ec947494501a1117ad02696ea70972f Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 16:19:48 +0100 Subject: [PATCH 351/355] ci(azure-pipelines): fix release repository --- .azure-pipelines/templates/jobs/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/release.yaml b/.azure-pipelines/templates/jobs/release.yaml index 8a3be491e..36bc6acae 100644 --- a/.azure-pipelines/templates/jobs/release.yaml +++ b/.azure-pipelines/templates/jobs/release.yaml @@ -52,7 +52,7 @@ jobs: displayName: Push container to registry inputs: command: push - repository: '$(buildImageUpstream)/fradrive' + repository: 'de.fraport.fradrive.build/fradrive' tags: '$(Build.BuildNumber),${{parameters.releaseTag}}' - task: Docker@2 displayName: Logout from container registry From 760ab5f06907ddd87de6b212600a6685b7c645a9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Wed, 12 Feb 2025 16:20:14 +0100 Subject: [PATCH 352/355] chore(release): v27.4.59-test-e0.0.13 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76e359fda..53db20379 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-e0.0.13](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-e0.0.12...v27.4.59-test-e0.0.13) (2025-02-12) + ## [v27.4.59-test-e0.0.12](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-d0.0.12...v27.4.59-test-e0.0.12) (2025-02-12) ## [v27.4.59-test-d0.0.12](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-d0.0.11...v27.4.59-test-d0.0.12) (2025-02-11) From 640f3bbba550452c5f1c8afd010435da86c4cfea Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 13 Feb 2025 11:10:51 +0100 Subject: [PATCH 353/355] ci(azure-pipelines): tweak image artifact name/location --- .azure-pipelines/templates/jobs/setup_image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/templates/jobs/setup_image.yaml b/.azure-pipelines/templates/jobs/setup_image.yaml index 5fd943d0a..0e751cec4 100644 --- a/.azure-pipelines/templates/jobs/setup_image.yaml +++ b/.azure-pipelines/templates/jobs/setup_image.yaml @@ -63,7 +63,7 @@ jobs: displayName: Publish image as artifact inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: ${{parameters.imageName}} + ArtifactName: Image_${{parameters.imageName}} publishLocation: 'Container' - task: Docker@2 displayName: Logout from container registry From 5d1dc8c3c01c29f42156a9db9ecc826819333823 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 13 Feb 2025 15:08:23 +0100 Subject: [PATCH 354/355] build(docker/fradrive): COPY entrypoint script into release container --- docker/fradrive/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/fradrive/Dockerfile b/docker/fradrive/Dockerfile index 3f1832dda..85a266054 100755 --- a/docker/fradrive/Dockerfile +++ b/docker/fradrive/Dockerfile @@ -27,8 +27,10 @@ RUN mkdir -p /var/log/uniworx && chown -R uniworx:uniworx /var/log/uniworx COPY ./bin/uniworx /usr/bin/uniworx COPY ./bin/uniworxdb /usr/bin/uniworxdb # COPY uniworxload /usr/bin/uniworx +COPY ./docker/fradrive/fradrive-entrypoint.sh /entrypoint.sh +RUN chmod 777 /entrypoint.sh USER uniworx -ENTRYPOINT fradrive-entrypoint.sh +ENTRYPOINT /entrypoint.sh EXPOSE 8080/tcp VOLUME /var/lib/uniworx /var/log \ No newline at end of file From 25c880c8ba36981d4ad9d541a6d98c622a20b3b0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 13 Feb 2025 15:08:39 +0100 Subject: [PATCH 355/355] chore(release): v27.4.59-test-e0.0.14 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53db20379..32e9f8238 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [v27.4.59-test-e0.0.14](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-e0.0.13...v27.4.59-test-e0.0.14) (2025-02-13) + ## [v27.4.59-test-e0.0.13](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-e0.0.12...v27.4.59-test-e0.0.13) (2025-02-12) ## [v27.4.59-test-e0.0.12](https://fraport@dev.azure.com/fraport/Fahrerausbildung/_git/FRADrive//compare/v27.4.59-test-d0.0.12...v27.4.59-test-e0.0.12) (2025-02-12)