From 5aebdc8b26ae329216d70f6b5a4c188014eb0ce6 Mon Sep 17 00:00:00 2001 From: "xiaochun.liu" Date: Mon, 24 Feb 2020 20:43:31 +0800 Subject: [PATCH] docker github action --- .github/workflows/ci_e2e.yml | 8 ++++++-- dockerfile/hooks/build | 4 ---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_e2e.yml b/.github/workflows/ci_e2e.yml index 0f867b60b3..616f62d049 100644 --- a/.github/workflows/ci_e2e.yml +++ b/.github/workflows/ci_e2e.yml @@ -39,9 +39,13 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - name: Build Image - run: export VERSION=latest && sh ./dockerfile/hooks/build + run: | + export VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'` + sh ./dockerfile/hooks/build - name: Docker Run - run: docker run -dit -e POSTGRESQL_USERNAME=test -e POSTGRESQL_PASSWORD=test -p 8888:8888 dolphinscheduler all + run: | + VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'` + docker run -dit -e POSTGRESQL_USERNAME=test -e POSTGRESQL_PASSWORD=test -p 8888:8888 dolphinscheduler:$VERSION all - name: Check Server Status run: sh ./dockerfile/hooks/check - name: Run e2e Test diff --git a/dockerfile/hooks/build b/dockerfile/hooks/build index 32d2ee4e38..ee173591af 100644 --- a/dockerfile/hooks/build +++ b/dockerfile/hooks/build @@ -18,10 +18,6 @@ echo "------ dolphinscheduler start - build -------" printenv -if [[ "${VERSION}x" = "x" ]]; then - VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'` -fi - if [[ "${DOCKER_REPO}x" = "x" ]]; then DOCKER_REPO='dolphinscheduler' fi