From 03ead82b0b57bbb0d0c356de92bdf19c89be121d Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Sun, 31 Oct 2021 21:10:51 -0400 Subject: [PATCH] make a tarbal via gitlab ci runners new file: .gitlab-ci.yml modified: Makefile new file: make_tarball.sh --- .gitlab-ci.yml | 19 +++++++++++++++++++ Makefile | 3 ++- make_tarball.sh | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml create mode 100755 make_tarball.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4623f23 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +stages: + - build + - publish + +build: + stage: build + script: + - ./make_tarball.sh + artifacts: + paths: + - www.unturf.com.tar.gz + - commit-hash.txt + expire_in: 1 month + +publish: + stage: publish + script: + # publish build to Salt Master + - sudo /opt/salt-call-put-artifacts-onto-salt-master.sh diff --git a/Makefile b/Makefile index bc4317a..c1f717a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ + + http: # In the second shell, run a "mock" simple HTTP webserver to serve index.html: env/bin/python -m http.server 8000 - diff --git a/make_tarball.sh b/make_tarball.sh new file mode 100755 index 0000000..bb577bc --- /dev/null +++ b/make_tarball.sh @@ -0,0 +1,5 @@ +#tar -zcvf www.unturf.com.tar.gz output +rm -rf .git +cd ..; tar -zcvf www.unturf.com.tar.gz www.unturf.com; mv www.unturf.com.tar.gz www.unturf.com; cd www.unturf.com +# create git-commit.txt to track this builds git commit hash. +echo $GIT_COMMIT >> commit-hash.txt