diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1652742db620b0253adc9c95673119592f1a7428..328196ab364c7b9125dd3a8ca0f763c8ba3c60b6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,12 +67,11 @@ tag: - git tag $(./release/notifications.linux64 version | grep "Elixxir Notifications Server v"| cut -d ' ' -f4) -f - git push origin_tags -f --tags -trigger_integration: +trigger-integration: stage: trigger_integration - script: - # Server - - "curl -X POST -F token=2a4419808282d0a47c55eee8b9904e -F ref=master https://gitlab.com/api/v4/projects/28/trigger/pipeline" - # Client - - "curl -X POST -F token=602ad7669e7d6daa61b210a0c4312b -F ref=master https://gitlab.com/api/v4/projects/28/trigger/pipeline" + trigger: + project: elixxir/integration + branch: $CI_COMMIT_REF_NAME only: - master + - release diff --git a/notifications/notifications.go b/notifications/notifications.go index 71f2abd84df230243f6fd9a7936c630f4ab0ed85..750b1b5108f7a5e7db01eb4269fe282746567f5e 100644 --- a/notifications/notifications.go +++ b/notifications/notifications.go @@ -216,6 +216,7 @@ func notifyUser(ephID int64, data []*notifications.Data, apnsClient *apns.ApnsCo u, err := db.GetUserByHash(e.TransmissionRSAHash) if err != nil { jww.ERROR.Printf("Failed to lookup user with tRSA hash %+v: %+v", e.TransmissionRSAHash, err) + continue } isAPNS := !strings.Contains(u.Token, ":") diff --git a/storage/databaseImpl.go b/storage/databaseImpl.go index 7766a20d34f8565953873e9aa908af8cfd6cea24..3b2ff66d6cda95f2d5d942c6a05e53c31d90b001 100644 --- a/storage/databaseImpl.go +++ b/storage/databaseImpl.go @@ -18,7 +18,7 @@ func (impl *DatabaseImpl) GetUser(userId []byte) (*User, error) { u := &User{} err := impl.db.Take(u, "intermediary_id = ?", userId).Error if err != nil { - return nil, errors.Errorf("Failed to retrieve user with ID %s: %+v", userId, err) + return nil, err } return u, nil } @@ -28,7 +28,7 @@ func (impl *DatabaseImpl) GetUserByHash(transmissionRsaHash []byte) (*User, erro u := &User{} err := impl.db.Take(u, "transmission_rsa_hash = ?", transmissionRsaHash).Error if err != nil { - return nil, errors.Errorf("Failed to retrieve user with tRSA hash %s: %+v", transmissionRsaHash, err) + return nil, err } return u, nil }