diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dedbc9..aa9293b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,19 +28,10 @@ jobs: command: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: name: Build Docker image - command: docker build -f package/Dockerfile --build-arg RH_ORG=$RH_ORG --build-arg RH_ACTIVATION=$RH_ACTIVATION -t $IMAGE_NAME:build package - - run: - name: Tag Docker image - command: docker tag $IMAGE_NAME:build $IMAGE_NAME:$CIRCLE_SHA1 - - run: - name: Tag Docker image - command: docker tag $IMAGE_NAME:build $IMAGE_NAME:edge + command: docker build -f package/Dockerfile --build-arg RH_ORG=$RH_ORG --build-arg RH_ACTIVATION=$RH_ACTIVATION -t $IMAGE_NAME:$CIRCLE_SHA1 package - run: name: Push Docker image command: docker push $IMAGE_NAME:$CIRCLE_SHA1 - - run: - name: Push Docker image - command: docker push $IMAGE_NAME:edge build-egb: environment: IMAGE_NAME: rfaircloth/scs @@ -57,13 +48,10 @@ jobs: command: docker login -u $DOCKER_USER -p $DOCKER_PASS - run: name: Build Docker image - command: docker build -f perftests/bundlesrv/Dockerfile -t $IMAGE_NAME:egb-build perftests/bundlesrv - - run: - name: Tag Docker image - command: docker tag $IMAGE_NAME:egb-build $IMAGE_NAME:egb-$CIRCLE_SHA1 + command: docker build -f perftests/bundlesrv/Dockerfile -t $IMAGE_NAME:egb-$CIRCLE_SHA1 perftests/bundlesrv - run: name: Tag Docker image - command: docker tag $IMAGE_NAME:egb-build $IMAGE_NAME:egb-edge + command: docker tag $IMAGE_NAME:egb-$CIRCLE_SHA1 $IMAGE_NAME:egb-edge - run: name: Push Docker image command: docker push $IMAGE_NAME:egb-$CIRCLE_SHA1 @@ -135,13 +123,13 @@ jobs: registry.access.redhat.com/ubi7/ubi docker cp tests/ dummy:/work/tests/ docker rm dummy - - run: - name: Docker Compose build - command: | - docker-compose build +# - run: +# name: Docker Compose build +# command: | +# docker-compose build - run: name: Docker Compose up - command: docker-compose up --abort-on-container-exit + command: docker-compose -f ./docker-compose-ci.yml up --abort-on-container-exit - run: name: Collect test results from Docker Compose command: | @@ -174,7 +162,7 @@ jobs: - store_artifacts: path: /clair-reports - publish: + publish-common: environment: IMAGE_NAME: rfaircloth/scs docker: @@ -195,6 +183,48 @@ jobs: name: Docker push tag command: docker push $IMAGE_NAME:$CIRCLE_BRANCH + publish-edge: + environment: + IMAGE_NAME: rfaircloth/scs + docker: + - image: circleci/buildpack-deps:stretch + steps: + - setup_remote_docker: + docker_layer_caching: true + - run: + name: Docker Login + command: docker login -u $DOCKER_USER -p $DOCKER_PASS + - run: + name: Docker pull + command: docker pull $IMAGE_NAME:$CIRCLE_SHA1 + - run: + name: Docker tag image + command: docker tag $IMAGE_NAME:$CIRCLE_SHA1 $IMAGE_NAME:edge + - run: + name: Docker push tag + command: docker push $IMAGE_NAME:edge + + publish-latest: + environment: + IMAGE_NAME: rfaircloth/scs + docker: + - image: circleci/buildpack-deps:stretch + steps: + - setup_remote_docker: + docker_layer_caching: true + - run: + name: Docker Login + command: docker login -u $DOCKER_USER -p $DOCKER_PASS + - run: + name: Docker pull + command: docker pull $IMAGE_NAME:$CIRCLE_SHA1 + - run: + name: Docker tag image + command: docker tag $IMAGE_NAME:$CIRCLE_SHA1 splunk/scs:latest + - run: + name: Docker push tag + command: docker push splunk/scs:latest + workflows: build-publish: jobs: @@ -209,7 +239,7 @@ workflows: - test-scan_images: requires: - build - - publish: + - publish-common: requires: - dgoss - test-unit @@ -218,3 +248,19 @@ workflows: only: - master - develop + - publish-edge: + requires: + - dgoss + - test-unit + filters: + branches: + only: + - develop + - publish-latest: + requires: + - dgoss + - test-unit + filters: + branches: + only: + - master \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 335ef34..85546be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -95,6 +95,16 @@ available at [http://contributor-covenant.org/version/1/4][version] Use project issue tracker -## Contributing code +## Contributing code or data -Future Docs \ No newline at end of file +Future Docs covering the contribution process and requirements + +By submitting a Contribution to this Work, You agree that Your Contribution is made subject to the license files applicable to this Work. Contributions comprising code shall be made pursuant the BSD2 license; Contributions consisting of configuration information or data shall be made pursuant to the CCO license. In addition, You represent that: You are the copyright owner of the Contribution or (ii) You have the requisite rights to make the Contribution. + +Definitions: + +“You” shall mean: yourself if you are making a Contribution on your own behalf; or (ii) your company, if you are making a Contribution on behalf of your company. If you are making a Contribution on behalf of your company, you represent that you have the requisite authority to do so. + +"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You for inclusion in, or documentation of, this project/repository. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication submitted for inclusion in this project/repository, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the maintainers of the project/repository. + +“Work” shall mean the collective software, data, content, and documentation in this project/repository. diff --git a/clair-whitelist.yml b/clair-whitelist.yml index 979a352..586bcb7 100644 --- a/clair-whitelist.yml +++ b/clair-whitelist.yml @@ -15,6 +15,10 @@ generalwhitelist: RHSA-2018:2772: False Positive RHSA-2018:1374: False Positive RHSA-2018:0180: False Positive + RHSA-2019:2029: False Positive + RHSA-2019:1873: False Positive + + images: scs: diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml new file mode 100644 index 0000000..b7dbd53 --- /dev/null +++ b/docker-compose-ci.yml @@ -0,0 +1,78 @@ +#Splunk Connect for Syslog (SC4S) by Splunk, Inc. +# +#To the extent possible under law, the person who associated CC0 with +#Splunk Connect for Syslog (SC4S) has waived all copyright and related or neighboring rights +#to Splunk Connect for Syslog (SC4S). +# +#You should have received a copy of the CC0 legalcode along with this +#work. If not, see . +version: "3.2" +services: + test: + build: ./tests + links: + - splunk + - sc4s + volumes: + - sc4s-tests:/work/tests + - sc4s-results:/work/test-results + environment: + - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} + + sc4s: + image: rfaircloth/scs:${CIRCLE_SHA1} + hostname: sc4s + ports: + - "514" + - "601" + - "514/udp" + - "5514" + - "5514/udp" + stdin_open: true + tty: true + links: + - splunk + environment: + - SPLUNK_HEC_URL=${SPLUNK_HEC_URL} + - SPLUNK_HEC_STATSURL=${SPLUNK_HEC_STATSURL} + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_CONNECT_METHOD=${SPLUNK_CONNECT_METHOD} + - SPLUNK_DEFAULT_INDEX=${SPLUNK_DEFAULT_INDEX} + - SPLUNK_METRICS_INDEX=${SPLUNK_DEFAULT_INDEX} +# logging: +# driver: splunk +# options: +# splunk-token: a778f63a-5dff-4e3c-a72c-a03183659e94 +# splunk-url: https://splunk:8088/services/collector/event +# splunk-index: main +# splunk-insecureskipverify: true +# splunk-verify-connection: false + splunk: + image: splunk/splunk:latest + hostname: splunk + ports: + - "8000:8000" + - "8088:8088" + - "8089:8089" + environment: + - SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN} + - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} + - SPLUNK_START_ARGS=${SPLUNK_START_ARGS} + - SPLUNK_APPS_URL=${SPLUNK_APPS_URL} + - SPLUNKBASE_USERNAME=${SPLUNKBASE_USERNAME} + - SPLUNKBASE_PASSWORD=${SPLUNKBASE_PASSWORD} + volumes: + - ./splunk/SA-syslog-ng:/opt/splunk/etc/apps/SA-syslog-ng +# logging: +# driver: splunk +# options: +# splunk-token: a778f63a-5dff-4e3c-a72c-a03183659e94 +# splunk-url: https://splunk:8088/services/collector/event +# splunk-index: main +# splunk-insecureskipverify: true +# splunk-verify-connection: false +volumes: + sc4s-tests: + external: true + sc4s-results: + external: true diff --git a/docker-compose.yml b/docker-compose.yml index f13c181..fd562ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ # #You should have received a copy of the CC0 legalcode along with this #work. If not, see . -version: "3" +version: "3.2" services: test: build: ./tests @@ -20,7 +20,7 @@ services: - SPLUNK_PASSWORD=${SPLUNK_PASSWORD} sc4s: - image: rfaircloth/scs:latest + image: splunk/scs:latest build: context: ./package args: diff --git a/docs/gettingstarted.md b/docs/gettingstarted.md index 2d7c971..d1e71cc 100644 --- a/docs/gettingstarted.md +++ b/docs/gettingstarted.md @@ -19,7 +19,7 @@ version: "3" services: sc4s: - image: rfaircloth/scs:latest + image: splunk/scs:latest hostname: sc4s ports: - "514" diff --git a/package/Dockerfile b/package/Dockerfile index 7c47a5a..2f8698e 100644 --- a/package/Dockerfile +++ b/package/Dockerfile @@ -11,14 +11,13 @@ FROM registry.access.redhat.com/rhel7/rhel ARG RH_ORG ARG RH_ACTIVATION -ENV CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --enable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --enable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking" +ENV CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --enable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --enable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking" ENV DISTCHECK_CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --enable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --enable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking" COPY confluent.repo /etc/yum.repos.d/confluent.repo RUN subscription-manager register --org=$RH_ORG --activationkey=$RH_ACTIVATION --force RUN subscription-manager repos --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-server-rhscl-7-rpms -RUN subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" -RUN yum install wget -y +RUN yum update -y; yum install wget -y RUN rpm --import https://packages.confluent.io/rpm/5.2/archive.key RUN cd /tmp ;\ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ;\