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