Skip to content

Commit

Permalink
Changes travis and uses cloudbuild to run test and create image. Sets…
Browse files Browse the repository at this point in the history
… gfw-pipeline as base image.
  • Loading branch information
smpiano committed Jun 23, 2021
1 parent d508f52 commit 1ddfd05
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 55 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
Dockerfile
docker-compose.yaml
example
dev-temp
scripts/samples
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to

## [UNRELEASED]

### v3.1.1 - 2021-06-23

## Changed

* [PIPELINE-431](https://globalfishingwatch.atlassian.net/browse/PIPELINE-431): Removes
Travis and its references and uses cloudbuild instead to run the tests.
Uses [gfw-pipeline](https://github.com/GlobalFishingWatch/gfw-pipeline) as Docker base image.
Updates `pipe-tools` with update in beam reference when reading schema from json.
Removes 4 warnings from tests.

## v3.1.0 - 2021-04-29

### Added
Expand Down
29 changes: 1 addition & 28 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
FROM python:3.7

# Configure the working directory
RUN mkdir -p /opt/project
WORKDIR /opt/project


# Download and install google cloud. See the dockerfile at
# https://hub.docker.com/r/google/cloud-sdk/~/dockerfile/
ENV CLOUD_SDK_VERSION 338.0.0
RUN \
export CLOUD_SDK_APT_DEPS="curl gcc python-dev python-setuptools apt-transport-https lsb-release openssh-client git" && \
export CLOUD_SDK_PIP_DEPS="crcmod" && \
apt-get -qqy update && \
apt-get install -qqy $CLOUD_SDK_APT_DEPS && \
pip install -U $CLOUD_SDK_PIP_DEPS && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" > /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update && \
apt-get install -y google-cloud-sdk=${CLOUD_SDK_VERSION}-0 && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
gcloud config set metrics/environment github_docker_image

# Setup a volume for configuration and auth data
VOLUME ["/root/.config"]
FROM gcr.io/world-fishing-827/github.com/globalfishingwatch/gfw-pipeline:latest

# Setup local application dependencies
COPY . /opt/project
Expand All @@ -34,4 +8,3 @@ RUN pip install -e .

# Setup the entrypoint for quickly executing the pipelines
ENTRYPOINT ["scripts/run.sh"]

41 changes: 41 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
steps:

- name: 'gcr.io/cloud-builders/docker'
id: build
args: [
'build',
'-t',
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:latest',
'-t',
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:$TAG_NAME',
'.'
]

- name: 'gcr.io/cloud-builders/docker'
id: test
args: [
'run',
'--rm',
'--entrypoint',
'py.test',
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:latest'
]
waitFor: [ 'build' ]

- name: 'gcr.io/cloud-builders/docker'
id: push_latest
args: [
'push',
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:latest'
]
waitFor: [ 'build', 'test' ]

- name: 'gcr.io/cloud-builders/docker'
id: push_tagged
args: [
'push',
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:$TAG_NAME'
]
waitFor: [ 'build', 'test' ]

timeout: 600s
2 changes: 1 addition & 1 deletion pipe_segment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""


__version__ = '3.1.0'
__version__ = '3.1.1'
__author__ = 'Paul Woods'
__email__ = '[email protected]'
__source__ = 'https://github.com/GlobalFishingWatch/pipe-segment'
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
https://codeload.github.com/GlobalFishingWatch/gpsdio-segment/tar.gz/0.20.2#egg=gpsdio-segment
https://codeload.github.com/GlobalFishingWatch/pipe-tools/tar.gz/v3.2.0#egg=pipe-tools
https://codeload.github.com/GlobalFishingWatch/pipe-tools/tar.gz/v3.2.1#egg=pipe-tools
https://codeload.github.com/GlobalFishingWatch/ShipDataProcess/tar.gz/06b8495f55c6a44306ca9865b4c07d51d7ad5a7b#egg=shipdataprocess

0 comments on commit 1ddfd05

Please sign in to comment.