Skip to content

Commit

Permalink
Add version to DockerFile and echo at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
rfaircloth-splunk committed Feb 3, 2020
1 parent 1008c53 commit b637492
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
- versioning/define_version
- versioning/create_version_file:
version_file_path: /tmp/workspace/VERSION

- versioning/create_version_file:
version_file_path: package
- docker/install-docker
- docker/check:
registry: $REGISTRY
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ services:
links:
- splunk
- sc4s
volumes:
- sc4s-results:/work/test-results
environment:
- SPLUNK_USER=admin
- SPLUNK_PASSWORD=${SPLUNK_PASSWORD}
Expand Down Expand Up @@ -85,7 +83,5 @@ services:
- ./replay:/work

volumes:
sc4s-results:
external: true
splunk-etc:
external: true
2 changes: 2 additions & 0 deletions package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ COPY sbin/entrypoint.sh /
RUN mkdir -p /opt/syslog-ng/var/data/disk-buffer
RUN source scl_source enable rh-python36 ;/opt/syslog-ng/sbin/syslog-ng -V

COPY VERSION /

EXPOSE 514
EXPOSE 601/tcp
EXPOSE 6514/tcp
Expand Down
1 change: 1 addition & 0 deletions package/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UNKNOWN
4 changes: 3 additions & 1 deletion package/sbin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ for file in /opt/syslog-ng/etc/conf.d/local/context/*.example ; do cp --verbose
cp --verbose -R /opt/syslog-ng/etc/local_config/* /opt/syslog-ng/etc/conf.d/local/config/

echo syslog-ng checking config
/opt/syslog-ng/sbin/syslog-ng -s >/var/log/syslog-ng.out 2>/var/log/syslog-ng.err
echo sc4s version=$(cat /version)
echo sc4s version=$(cat /version) >/var/log/syslog-ng.out
/opt/syslog-ng/sbin/syslog-ng -s >>/var/log/syslog-ng.out 2>/var/log/syslog-ng.err

echo syslog-ng starting
exec /opt/syslog-ng/sbin/syslog-ng $@

0 comments on commit b637492

Please sign in to comment.