[gtk-web/new-website: 168/180] updated gitlab pipeline
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-web/new-website: 168/180] updated gitlab pipeline
- Date: Mon, 11 Nov 2019 14:58:33 +0000 (UTC)
commit 2df063514d6c51153809b48951eab65803e10676
Author: ravgeetdhillon <ravgeetdhillon gmail com>
Date: Sun Aug 25 15:55:55 2019 +0530
updated gitlab pipeline
.gitlab-ci.yml | 47 +++++++++++++++++++++++++++++++++++++----------
_config.yml | 2 +-
scripts/compile-sass.sh | 2 +-
scripts/get-api-data.sh | 12 ++++++------
scripts/structurize.sh | 6 +++---
5 files changed, 48 insertions(+), 21 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a165b92..8eb3b1c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,25 +4,52 @@ variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
+stages:
+ - download
+ - structuring
+ - generation
+ - test
+ - deploy
+
before_script:
- apt-get update -y
- apt-get install -y curl
+ - gem install bundler jekyll
+ - bundle install
+
+npm:
+ stage: download
+ script:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
- source /root/.bashrc
- nvm install node
- nvm use node
- npm install
- - gem install bundler jekyll
- - bundle install
- - mkdir ./_data/api_fetch
- - curl -o- https://gitlab.gnome.org/api/v4/projects/665/repository/tags?order_by=name >
./_data/api_fetch/tags.json
- - curl -o- https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fblog.gtk.org%2Ffeed%2F >
./_data/api_fetch/gtk-blog-feed.json
- - curl -o- https://gitlab.gnome.org/api/v4/projects/665/issues_statistics >
./_data/api_fetch/issues_stats.json
- - curl -o- https://gitlab.gnome.org/api/v4/projects/665/issues?state=opened >
./_data/api_fetch/issues_opened.json
- - mv ./node_modules/* ./assets/ -f
- - rm -rf ../node_modules
- - sass assets/scss/theme.scss assets/css/theme.css
+ artifacts:
+ paths:
+ - node_modules
+api:
+ stage: download
+ script:
+ - scripts/get-api-data.sh
+ artifacts:
+ paths:
+ - api_data
+
+structuring:
+ stage: structuring
+ script:
+ - scripts/structurize.sh
+ artifacts:
+ paths:
+ - assets
+
+sass:
+ stage: generation
+ script:
+ - scripts/compile-sass.sh
+
test:
stage: test
script:
diff --git a/_config.yml b/_config.yml
index c6dc577..3c911ad 100644
--- a/_config.yml
+++ b/_config.yml
@@ -46,12 +46,12 @@ exclude:
- Gemfile.lock
- package.json
- package-lock.json
- - community.html
- README.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- LICENSE.txt
- scripts/
+ - main.sh
# folder which contains all the collections
collections_dir: collections
diff --git a/scripts/compile-sass.sh b/scripts/compile-sass.sh
index 50a7ffe..e3000f7 100644
--- a/scripts/compile-sass.sh
+++ b/scripts/compile-sass.sh
@@ -1,5 +1,5 @@
echo 'compiling scss to css...'
-npm run sass
+sass ./assets/scss/theme.scss ./assets/css/theme.css
echo 'successfully compiled all scss files to css'
\ No newline at end of file
diff --git a/scripts/get-api-data.sh b/scripts/get-api-data.sh
index 616d312..8dbc4ed 100644
--- a/scripts/get-api-data.sh
+++ b/scripts/get-api-data.sh
@@ -1,23 +1,23 @@
echo 'creating directory for storing api results...'
-mkdir ../_data/api_fetch
+mkdir ./_data/api_fetch
echo 'getting the api data from the gitlab...'
-curl https://gitlab.gnome.org/api/v4/projects/665/repository/tags?order_by=name >
../_data/api_fetch/tags.json
+curl https://gitlab.gnome.org/api/v4/projects/665/repository/tags?order_by=name > ./_data/api_fetch/tags.json
echo 'successfully fetched gtk-release-tags'
-curl https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fblog.gtk.org%2Ffeed%2F >
../_data/api_fetch/gtk-blog-feed.json
+curl https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fblog.gtk.org%2Ffeed%2F >
./_data/api_fetch/gtk-blog-feed.json
echo 'successfully fetched the gtk blog feed in json format'
-curl https://gitlab.gnome.org/api/v4/projects/665/issues_statistics > ../_data/api_fetch/issues_stats.json
+curl https://gitlab.gnome.org/api/v4/projects/665/issues_statistics > ./_data/api_fetch/issues_stats.json
echo 'successfully fetched gtk-issue-statistics'
-curl https://gitlab.gnome.org/api/v4/projects/665/issues?state=opened > ../_data/api_fetch/issues_opened.json
+curl https://gitlab.gnome.org/api/v4/projects/665/issues?state=opened > ./_data/api_fetch/issues_opened.json
echo 'successfully fetched gtk-issues'
-ls ../_data/api_fetch
\ No newline at end of file
+ls ./_data/api_fetch
\ No newline at end of file
diff --git a/scripts/structurize.sh b/scripts/structurize.sh
index 4171bea..e5372e2 100644
--- a/scripts/structurize.sh
+++ b/scripts/structurize.sh
@@ -1,7 +1,7 @@
echo 'structurizing the website...'
-ls ../node_modules
+ls ./node_modules
-mv ../node_modules/* ../assets/ -f
+mv ./node_modules/* ./assets/ -f
-rm -rf ../node_modules
\ No newline at end of file
+rm -rf ./node_modules
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]