CI/CD
This commit is contained in:
parent
bd312a76ab
commit
8dfbeee1b1
|
@ -66,7 +66,7 @@ package-frontend:
|
|||
- apk update
|
||||
- apk add --no-cache zip
|
||||
- mkdir dist
|
||||
- docker run --name $PACKAGE_CONTAINER_NAME $CI_REGISTRY_IMAGE_NG gradle buildFrontend
|
||||
- docker run --name $PACKAGE_CONTAINER_NAME $CI_REGISTRY_IMAGE_NG gradle buildFrontend -PfrontendConfiguration=$FRONTEND_CONFIGURATION
|
||||
- docker cp $PACKAGE_CONTAINER_NAME:/usr/src/cre/dist/frontend/ dist/
|
||||
- zip -r $ARTIFACT_NAME.zip dist/
|
||||
- docker build -t $CI_REGISTRY_IMAGE_FRONTEND -f frontend.Dockerfile --build-arg ARTIFACT_NAME=$ARTIFACT_NAME .
|
||||
|
|
|
@ -111,6 +111,9 @@ tasks.register("buildBackend") {
|
|||
tasks.register("buildFrontend") {
|
||||
val outputDirectory = "dist/frontend"
|
||||
println("Building Angular frontend to ${projectDir.absolutePath}/$outputDirectory")
|
||||
|
||||
val configuration = project.gradle.startParameter.projectProperties["frontendConfiguration"] ?: "production"
|
||||
println("Using configuration $configuration")
|
||||
|
||||
// Creates the output directory if it does not exists.
|
||||
val outputDirectoryFile = File("${projectDir.absolutePath}/$outputDirectory")
|
||||
|
@ -123,7 +126,7 @@ tasks.register("buildFrontend") {
|
|||
}
|
||||
|
||||
exec {
|
||||
commandLineUniversal("cd src/main/frontend && npm run-script build")
|
||||
commandLineUniversal("cd src/main/frontend && ng build --configuration=$configuration --output-hashing=none --stats-json --source-map=false")
|
||||
}
|
||||
|
||||
exec {
|
||||
|
|
|
@ -7,7 +7,9 @@ WORKDIR /usr/src/cre/
|
|||
RUN apt update
|
||||
RUN apt install nodejs -y
|
||||
RUN apt install npm -y
|
||||
RUN apt install zip -y
|
||||
|
||||
RUN npm install -g typescript@3.9.7
|
||||
RUN npm install -g @angular/cli || true
|
||||
|
||||
ENV NG_CLI_ANALYTICS=ci
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: '/api'
|
||||
apiUrl: 'https://cre.fyloz.dev/api'
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue