Skip to content

Commit

Permalink
Merge pull request #19 from NASA-IMPACT/dev
Browse files Browse the repository at this point in the history
Merge dev into master for new release tag.
  • Loading branch information
sharkinsspatial authored Jul 5, 2021
2 parents ef0ce23 + 3923a35 commit c6d9431
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 15 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/build_push_prod_ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,28 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Build image
run: docker build . --tag hls-base-c2
- name: Build image 3.1.0
run: docker build . --tag hls-base-3.1.0 --build-arg lasrc_version=3.1.0

- name: Push to prod ECR
id: push-prod-ecr
- name: Push to tagged ECR 3.1.0
id: push-tagged-ecr-310
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-west-2
local-image: hls-base-c2
image: hls-base-c2:${GITHUB_REF##*/}
local-image: hls-base-3.1.0
image: hls-base-3.1.0:${GITHUB_REF##*/}

- name: Build image 3.0.5
run: docker build . --tag hls-base-3.0.5 --build-arg lasrc_version=3.0.5

- name: Push to tagged ECR 3.0.5
id: push-tagged-ecr-305
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-west-2
local-image: hls-base-3.0.5
image: hls-base-3.0.5:${GITHUB_REF##*/}
28 changes: 22 additions & 6 deletions .github/workflows/build_push_to_ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Create more disk space
run: sudo rm -rf /usr/share/dotnet && sudo rm -rf /opt/ghc && sudo rm -rf "/usr/local/share/boost" && sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -23,15 +26,28 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Build image
run: docker build . --tag hls-base-c2
- name: Build image 3.1.0
run: docker build . --tag hls-base-3.1.0 --build-arg lasrc_version=3.1.0

- name: Push to ECR 3.1.0
id: push-ecr-310
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-west-2
local-image: hls-base-3.1.0
image: hls-base-3.1.0

- name: Build image 3.0.5
run: docker build . --tag hls-base-3.0.5 --build-arg lasrc_version=3.0.5

- name: Push to latest ECR
id: push-latest-ecr
- name: Push to ECR 3.0.5
id: push-ecr-305
uses: jwalton/gh-ecr-push@v1
with:
access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: us-west-2
local-image: hls-base-c2
image: hls-base-c2
local-image: hls-base-3.0.5
image: hls-base-3.0.5
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM 018923174646.dkr.ecr.us-west-2.amazonaws.com/espa/external-c2:latest
ARG lasrc_version
ENV PREFIX=/usr/local \
SRC_DIR=/usr/local/src \
ESPAINC=/usr/local/include \
Expand All @@ -20,15 +21,15 @@ RUN yum -y install libXt

RUN REPO_NAME=espa-product-formatter \
&& cd $SRC_DIR \
&& git clone -b v3.0.2 https://github.com/NASA-IMPACT/${REPO_NAME}.git ${REPO_NAME} \
&& git clone -b v3.0.2-backtrace https://github.com/NASA-IMPACT/${REPO_NAME}.git ${REPO_NAME} \
&& cd ${REPO_NAME} \
&& make BUILD_STATIC=yes ENABLE_THREADING=yes \
&& make install \
&& cd $SRC_DIR \
&& rm -rf ${REPO_NAME}
RUN REPO_NAME=espa-surface-reflectance \
&& cd $SRC_DIR \
&& git clone -b eros-collection2-3.0.5 https://github.com/NASA-IMPACT/${REPO_NAME}.git \
&& git clone -b "eros-collection2-${lasrc_version}" https://github.com/NASA-IMPACT/${REPO_NAME}.git \
&& cd ${REPO_NAME} \
&& make BUILD_STATIC=yes ENABLE_THREADING=yes \
&& make install \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ After building the dependencies image, following the steps outlined [here](https
After building your dependencies image and pushing it to ECR you can build the `hls-base` image with:

```shell
$ docker build --no-cache -t hls-base .
$ docker build . --no-cache -t hls-base --build-arg lasrc_version=3.1.0
```
### CI
The repository contains two CI workflows. When commits are pushed to the collection2 branch a new image is built and pushed to ECR with no tag.
Expand Down

0 comments on commit c6d9431

Please sign in to comment.