Skip to content

Commit

Permalink
Merge pull request #73 from CybercentreCanada/cccs-sgaron-patch-1
Browse files Browse the repository at this point in the history
Cccs sgaron patch 1
  • Loading branch information
cccs-sgaron authored Jul 27, 2021
2 parents 834a4b3 + a33100d commit 626b928
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion assemblyline_result_sample_service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM cccs/assemblyline-v4-service-base:latest
ARG branch=latest
FROM cccs/assemblyline-v4-service-base:$branch

ENV SERVICE_PATH result_sample.ResultSample

Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ RUN pip install --no-cache-dir --user \
assemblyline-v4-service==$version \
assemblyline-client \
&& rm -rf ~/.cache/pip

# If this is a latest rather than stable build, try to push for unstable packages of assemblyline dependencies
RUN if [ "${branch}" = "latest" ]; then pip install --user --upgrade --pre assemblyline assemblyline-core assemblyline-service-client assemblyline-client; fi

# Remove files that existed before the pip install so that our copy command below doesn't take a snapshot of
# files that already exist in the base image
Expand All @@ -25,7 +28,7 @@ USER root
RUN chown root:root -R /var/lib/assemblyline/.local

# Restart a new image, this time the output one
FROM cccs/assemblyline:latest
FROM cccs/assemblyline:$branch

# Get the updated local dir from builder
COPY --chown=assemblyline:assemblyline --from=builder /var/lib/assemblyline/.local /var/lib/assemblyline/.local
Expand Down
6 changes: 3 additions & 3 deletions pipelines/azure-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ stages:
export VERSION=${TAG/stable}
export VERSION=${VERSION/beta/b}
export SERIES="`expr $TAG : '\([0-9]\+\.[0-9]\+\.\)'`${BUILD_TYPE}"
until sudo env "PATH=$PATH" python -m pip download "assemblyline-v4-service==$TAG" --pre --no-deps &> /dev/null; do sleep 2; done
until sudo env "PATH=$PATH" python -m pip download "assemblyline-v4-service==$VERSION" --pre --no-deps &> /dev/null; do sleep 2; done
export IMAGE="cccs/assemblyline-v4-service-base"
docker build --build-arg version=$VERSION --build-arg branch=$BUILD_TYPE -t $IMAGE:$TAG -t $IMAGE:$SERIES -t $IMAGE:BUILD_TYPE docker
docker build --build-arg version=$VERSION --build-arg branch=$BUILD_TYPE -t $IMAGE:$TAG -t $IMAGE:$SERIES -t $IMAGE:$BUILD_TYPE docker
docker push $IMAGE --all-tags
export IMAGE="cccs/assemblyline-service-resultsample"
docker build --build-arg version=$VERSION --build-arg branch=$BUILD_TYPE -f assemblyline_result_sample_service/Dockerfile -t $IMAGE:$TAG -t $IMAGE:$SERIES -t $IMAGE:BUILD_TYPE .
docker build --build-arg version=$VERSION --build-arg branch=$BUILD_TYPE -f assemblyline_result_sample_service/Dockerfile -t $IMAGE:$TAG -t $IMAGE:$SERIES -t $IMAGE:$BUILD_TYPE .
docker push $IMAGE --all-tags
displayName: Deploy to Docker Hub

0 comments on commit 626b928

Please sign in to comment.