Skip to content

Commit 55b79df

Browse files
committed
Update sync script
1 parent ab5ae16 commit 55b79df

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ sudo: required
22
services:
33
- docker
44
script:
5-
- chmod +x ci.sh && chmod +x test.sh && travis_wait 65 ./ci.sh
5+
- chmod +x ci.sh && chmod +x test.sh && ./ci.sh

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
44
OV_PASSWORD=admin \
55
PUBLIC_HOSTNAME=openvas
66

7+
ARG SKIP_SYNC=false
8+
79
#Install Prerequisites
810
RUN apt-get update && \
911
apt-get install --assume-yes --quiet --no-install-recommends --fix-missing \
@@ -118,10 +120,10 @@ RUN cd /usr/src && \
118120
COPY ./scripts/greenbone-*.sh /usr/local/bin/
119121
RUN chmod +x /usr/local/bin/greenbone-*.sh
120122

121-
COPY ./feeds/community-nvt-feed-current.tar.bz2 /usr/src/
122-
RUN cd /usr/src && \
123-
tar -xC /usr/local/var/lib/openvas/plugins/ -f community-nvt-feed-current.tar.bz2 && \
124-
rm community-nvt-feed-current.tar.bz2
123+
#COPY ./feeds/community-nvt-feed-current.tar.bz2 /usr/src/
124+
#RUN cd /usr/src && \
125+
# tar -xC /usr/local/var/lib/openvas/plugins/ -f community-nvt-feed-current.tar.bz2 && \
126+
# rm community-nvt-feed-current.tar.bz2
125127

126128
RUN /usr/local/bin/greenbone-sync.sh
127129

ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ echo "Setup"
55
cd $(dirname $0)
66
mkdir -p logs images
77

8-
docker build -t openvas .
8+
docker build --build-arg SKIP_SYNC=true -t openvas .
99

1010
./test.sh
1111

scripts/greenbone-sync.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22

3-
greenbone-nvt-sync --rsync > /dev/null
4-
sleep 15
5-
greenbone-certdata-sync > /dev/null
6-
sleep 15
7-
greenbone-scapdata-sync > /dev/null
3+
if [ "$SKIP_SYNC" == "false" ]; then
4+
greenbone-nvt-sync --rsync
5+
sleep 15
6+
greenbone-certdata-sync
7+
sleep 15
8+
greenbone-scapdata-sync
9+
fi

0 commit comments

Comments
 (0)