fix: 前端构建添加 --target production 参数
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -48,7 +48,7 @@ steps:
|
||||
commands:
|
||||
- echo "$DOCKER_PASSWORD" | docker login "$DOCKER_REGISTRY" -u "$DOCKER_USERNAME" --password-stdin
|
||||
- cd frontend
|
||||
- docker build -t $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:test -f Dockerfile --build-arg VITE_API_BASE_URL=https://kpl.ireborn.com.cn .
|
||||
- docker build -t $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:test -f Dockerfile --target production --build-arg VITE_API_BASE_URL=https://kpl.ireborn.com.cn .
|
||||
- docker tag $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:test $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:${DRONE_COMMIT_SHA:0:8}
|
||||
- docker push $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:test
|
||||
- docker push $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:${DRONE_COMMIT_SHA:0:8}
|
||||
@@ -105,7 +105,7 @@ steps:
|
||||
commands:
|
||||
- echo "$DOCKER_PASSWORD" | docker login "$DOCKER_REGISTRY" -u "$DOCKER_USERNAME" --password-stdin
|
||||
- cd frontend
|
||||
- docker build -t $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:staging -f Dockerfile --build-arg VITE_API_BASE_URL=https://aiedu.ireborn.com.cn .
|
||||
- docker build -t $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:staging -f Dockerfile --target production --build-arg VITE_API_BASE_URL=https://aiedu.ireborn.com.cn .
|
||||
- docker push $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:staging
|
||||
|
||||
volumes:
|
||||
@@ -161,7 +161,7 @@ steps:
|
||||
commands:
|
||||
- echo "$DOCKER_PASSWORD" | docker login "$DOCKER_REGISTRY" -u "$DOCKER_USERNAME" --password-stdin
|
||||
- cd frontend
|
||||
- docker build -t $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:main -f Dockerfile --build-arg VITE_API_BASE_URL=https://hua.ireborn.com.cn .
|
||||
- docker build -t $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:main -f Dockerfile --target production --build-arg VITE_API_BASE_URL=https://hua.ireborn.com.cn .
|
||||
- docker tag $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:main $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:latest
|
||||
- docker push $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:main
|
||||
- docker push $DOCKER_REGISTRY/ireborn/kaopeilian-frontend:latest
|
||||
|
||||
Reference in New Issue
Block a user