From c00ca1942a2e63ef9f3462ae7f47d3151b3e0d39 Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 7 Jun 2021 10:42:50 -0700 Subject: [PATCH] + Pipelines for freechat prod and pipe versions Both of these are behind 'only' flags to avoid pointless rebuilding --- .gitlab-ci.yml | 49 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36e1c8a..89111f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,44 @@ -get_vars: - stage: test +image: docker + +stages: + - default + +variables: + USER: shockrah + +before_script: + - docker login --username $USER --password $PASS + + +build-freechat-prod: + # Can't use variables section here due to the sub shell being invoked here + before_script: + - export VERSION="$(date +%d-%m-%Y)" + + stage: default + only: + refs: + - master + changes: + - Freechat/Dockerfile script: - - sleep 10 & - - a=$! - - echo $a - - setsid echo this testvar value is $TEST_VAR + - cd Freechat/ + - echo $VERSION + - docker build -t freechat . + - docker tag freechat "$USER/freechat:$VERSION" + - docker push "$USER/freechat:$VERSION" + + +build-freechat-pipeline: + stage: default + only: + refs: + - master + changes: + - freechat-pipeline/entrypoint.sh + - freechat-pipeline/Dockerfile + script: + - cd freechat-pipeline/ + - docker build -t freechat-pipeline . + - docker tag freechat-pipeline "$USER/freechat-pipeline:latest" + - docker push "$USER/freechat-pipeline:latest"