From d0a654ea181be824731015343d31f87024031d12 Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Thu, 9 Dec 2021 20:59:52 +0000 Subject: [PATCH 1/3] Adding testing for all subcomponents to CI pipeline --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 040804f..c150fab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,5 +15,11 @@ test: - cd fedilogue - go get . - go test -v + - cd ../fedictl + - go get . + - go test -v + - cd ../restapi + - go get . + - go test -v only: - merge_requests From 7e9bf47c60254e41ec3936a37df270dd862769fd Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Thu, 9 Dec 2021 21:12:00 +0000 Subject: [PATCH 2/3] Adjusting Fatal to Fatalf --- restapi/restapi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/restapi/restapi.go b/restapi/restapi.go index 9ef1860..a3edf42 100644 --- a/restapi/restapi.go +++ b/restapi/restapi.go @@ -52,7 +52,7 @@ func gettrends() { data, err := json.Marshal(totalJson) if err != nil { - log.Fatal("error marshaling combined activity: %v", err) + log.Fatalf("error marshaling combined activity: %v\n", err) } trendingexport = string(data) @@ -140,7 +140,7 @@ func search(w http.ResponseWriter, r *http.Request) { data, err := json.Marshal(totalJson) if err != nil { - log.Fatal("error marshaling combined activity: %v", err) + log.Fatalf("error marshaling combined activity: %v\n", err) } fmt.Fprintf(w, "%s", data) } From 25abeacf7b0721f75d0eab58a402381ccfbc5f32 Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Thu, 9 Dec 2021 21:20:04 +0000 Subject: [PATCH 3/3] Adding build lines and artifacts to CI pipeline --- .gitlab-ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c150fab..09f6817 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,9 +5,19 @@ build: script: - cd fedilogue - go get . - - go build ./fedilogue + - go build + - cd ../fedictl + - go build + - cd ../restapi + - go build only: - main + artifacts: + name: "$CI_JOB_NAME" + paths: + - fedilogue/fedilogue + - fedictl/fedictl + - restapi/restapi test: stage: test