From f91ade7f60a9c29fa0572c54877637422154386f Mon Sep 17 00:00:00 2001 From: ls Date: Fri, 11 Oct 2024 20:39:43 +0800 Subject: [PATCH] update --- .gitlab-ci.yml | 16 +++------------- Dockerfile | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 64b372d..73df135 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,32 +18,22 @@ stages: # List of stages for jobs, and their order of execution - build - - test - deploy build-job: # This job runs in the build stage, which runs first. stage: build script: - echo "Compiling the code..." + - mvn -s ./settings.xml -DskipTests=true clean install - echo "Compile complete." -unit-test-job: # This job runs in the test stage. - stage: test # It only starts when the job in the build stage completes successfully. - script: - - echo "Running unit tests... This will take about 60 seconds." - - sleep 60 - - echo "Code coverage is 90%" -lint-test-job: # This job also runs in the test stage. - stage: test # It can run at the same time as unit-test-job (in parallel). - script: - - echo "Linting code... This will take about 10 seconds." - - sleep 10 - - echo "No lint issues found." deploy-job: # This job runs in the deploy stage. stage: deploy # It only runs when *both* jobs in the test stage complete successfully. environment: production script: - echo "Deploying application..." + - docker login --username=lslvxy@163.com -password-stdin < /root/docker_password registry.cn-shanghai.aliyuncs.com + - docker build --platform linux/amd64 -t registry.cn-shanghai.aliyuncs.com/physical/physical-boot --push . - echo "Application successfully deployed." diff --git a/Dockerfile b/Dockerfile index a5ce954..30c8056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ #FROM bellsoft/liberica-openjdk-debian:17 -FROM maven:3.9.8-eclipse-temurin-17 as build +FROM maven:3.9.8-eclipse-temurin-17 AS build WORKDIR /app