Skip to content

Commit

Permalink
Fix CI pipeline (#416)
Browse files Browse the repository at this point in the history
* Remove release pipeline.
* Remove CI badge.
* Fix goreportcard url.
* Remove copyright symbol.
  • Loading branch information
Donald Morton authored Nov 23, 2021
1 parent cd538a1 commit be8ee51
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 138 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Server Side Public License
VERSION 1, OCTOBER 16, 2018

Copyright 2018 MongoDB, Inc.
Copyright 2018 MongoDB, Inc.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Graylog Sidecar

[![Build Status](https://travis-ci.org/Graylog2/collector-sidecar.svg?branch=master)](https://travis-ci.org/Graylog2/collector-sidecar) [![Go Report Card](https://goreportcard.com/badge/github.com/graylog2/collector-sidecar)](https://goreportcard.com/report/github.com/graylog2/collector-sidecar)
[![Go Report Card](https://goreportcard.com/badge/Github.com/graylog2/collector-sidecar)](https://goreportcard.com/report/github.com/Graylog2/collector-sidecar)

The Graylog Sidecar is a supervisor process for 3rd party log collectors like NXLog and filebeat.
The Sidecar program is able to fetch and validate configuration files from a Graylog server for various log collectors.
Expand All @@ -22,4 +22,3 @@ Please check our [installation documentation](http://docs.graylog.org/en/latest/
* Clone the repository into your `$GOPATH` under `src/github.com/Graylog2/collector-sidecar`
* run `make` to install the dependencies and build the binary for the local platform
* run `make help` to see more targets

137 changes: 2 additions & 135 deletions jenkins.groovy
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
if (currentBuild.buildCauses.toString().contains('BranchIndexingCause'))
{
print "Build skipped due to trigger being Branch Indexing."
return
}

pipeline
{
agent none
Expand Down Expand Up @@ -60,7 +54,8 @@ pipeline
{
unstash 'build artifacts'
sh 'make package-all'
stash name: 'package artifacts', includes: 'dist/**'

stash name: 'package artifacts', includes: 'dist/pkg/**'
}

post
Expand All @@ -71,133 +66,5 @@ pipeline
}
}
}

stage('Upload packages to S3')
{
when
{
buildingTag()
}

agent
{
label 'linux'
}

steps
{
unstash 'package artifacts'
echo "Uploading to S3..."
s3Upload(workingDir:'dist/pkg', bucket:'graylog2-releases', path:"graylog-collector-sidecar/${TAG_NAME}", includePathPattern:'graylog*')
}
post
{
success
{
script
{
cleanWs()
}
}
}
}

// stage('Release to Package Repository')
// {
// when
// {
// buildingTag()
// }
//
// agent
// {
// label 'packages'
// }
//
// steps
// {
// echo "Checking out fpm-recipes..."
// checkout poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/4.0']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'WipeWorkspace']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'github-access-token2', url: 'https://github.com/Graylog2/fpm-recipes.git']]]
//
// script
// {
// sh "gl2-build-pkg-sidecar 1.1"
// }
// }
// post
// {
// success
// {
// script
// {
// cleanWs()
// }
// }
// }
// }

stage('Release to Github')
{
when
{
buildingTag()
}

agent
{
label 'linux'
}

environment
{
GITHUB_CREDS = credentials('github-access-token')
}

steps
{
echo "Releasing ${TAG_NAME} to Github..."
unstash 'package artifacts'

catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE')
{
script
{
def RELEASE_DATA = sh returnStdout: true, script: "curl -s --user \"$GITHUB_CREDS\" -X POST --data \'{ \"tag_name\": \"${TAG_NAME}\", \"name\": \"${TAG_NAME}\", \"body\": \"Insert features here.\"}\' https://api.github.com/repos/Graylog2/collector-sidecar/releases"
def props = readJSON text: RELEASE_DATA
echo RELEASE_DATA
if (props.id)
{
env.RELEASE_ID = props.id
}
else
{
error('Github Release ID is null.')
}

sh '''#!/bin/bash
set -x
for file in dist/pkg/*
do
FILENAME=$(basename $file)
curl -H "Authorization: token $GITHUB_CREDS" -H "Content-Type: application/octet-stream" --data-binary @dist/pkg/$FILENAME https://uploads.github.com/repos/Graylog2/collector-sidecar/releases/$RELEASE_ID/assets?name=$FILENAME
done
'''

sh "docker run --rm -v $WORKSPACE:$WORKSPACE -w $WORKSPACE/dist/chocolatey torch/jenkins-mono-choco:latest pack --version ${TAG_NAME}"
}
}
}
post
{
success
{
script
{
archiveArtifacts 'dist/chocolatey/*.nupkg'
cleanWs()
}
}
}
}
}
}

0 comments on commit be8ee51

Please sign in to comment.