Skip to content

Commit

Permalink
Release to correct build (#55)
Browse files Browse the repository at this point in the history
Mid point release to tag for proper latest
  • Loading branch information
Ryan Faircloth authored and GitHub committed Aug 22, 2019
1 parent d03f341 commit 8f38c19
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 30 deletions.
90 changes: 68 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -174,7 +162,7 @@ jobs:
- store_artifacts:
path: /clair-reports

publish:
publish-common:
environment:
IMAGE_NAME: rfaircloth/scs
docker:
Expand All @@ -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:
Expand All @@ -209,7 +239,7 @@ workflows:
- test-scan_images:
requires:
- build
- publish:
- publish-common:
requires:
- dgoss
- test-unit
Expand All @@ -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
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
4 changes: 4 additions & 0 deletions clair-whitelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
78 changes: 78 additions & 0 deletions docker-compose-ci.yml
Original file line number Diff line number Diff line change
@@ -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 <http://creativecommons.org/publicdomain/zero/1.0/>.
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
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
#You should have received a copy of the CC0 legalcode along with this
#work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
version: "3"
version: "3.2"
services:
test:
build: ./tests
Expand All @@ -20,7 +20,7 @@ services:
- SPLUNK_PASSWORD=${SPLUNK_PASSWORD}

sc4s:
image: rfaircloth/scs:latest
image: splunk/scs:latest
build:
context: ./package
args:
Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
version: "3"
services:
sc4s:
image: rfaircloth/scs:latest
image: splunk/scs:latest
hostname: sc4s
ports:
- "514"
Expand Down
5 changes: 2 additions & 3 deletions package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;\
Expand Down

0 comments on commit 8f38c19

Please sign in to comment.