Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Github actions #2

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Related Issue(s)
## Related issue(s)

-

Expand All @@ -12,20 +12,12 @@ This change was validated by the following observations:

1.

## Merge Request Checklist
## Checklist

- [ ] I have deployed and validated this change
- [ ] Changelog
- [ ] I have added my changes to the changelog
- [ ] No changelog entry is necessary
- [ ] Readme Migration
- [ ] README migration
- [ ] I have added any migration steps to the Readme
- [ ] No migration is necessary
- [ ] Deploy Template
- [ ] updated with this change
- [ ] filed an issue to update
- [ ] no change is necessary
- [ ] FilmDrop Demo dev deployment
- [ ] updated with this change
- [ ] filed an issue to update
- [ ] no change is necessary
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Continuous integration

on:
pull_request:
push:
branches:
main

jobs:
update-lambdas:
runs-on: ubuntu-latest
env:
CI: true
STAC_SERVER_TAG: v2.2.3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Update stac-server lambdas
run: ./scripts/update-lambdas.sh
45 changes: 23 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
modules/jupyterhub-dask-eks/cluster.yaml
modules/jupyterhub-dask-eks/daskhub.yaml
modules/jupyterhub-dask-eks/spec.yaml
modules/jupyterhub-dask-eks/storageclass.yaml
.terraform/
terraform-visual-report
plan.json
saved.plan
*.tfstate
*.tfstate.*
.terraform.lock.hcl
terraform.tgz
bin/terraform
*.auto.tfvars
*.swp
*.swo
*.env*
*.tmp
*.orig
*.out
*.swo
*.swp
*.tfstate
*.tfstate.*
*.tmp
*.zip
*output
node_modules
package-lock.json
plan.out
.pytest*
__pycache__
.DS_Store
.opensearch.info
.pytest*
.terraform.lock*
.terraform.lock.hcl
.terraform.tfstate*
.terraform/
__pycache__
bin/terraform
modules/jupyterhub-dask-eks/cluster.yaml
modules/jupyterhub-dask-eks/daskhub.yaml
modules/jupyterhub-dask-eks/spec.yaml
modules/jupyterhub-dask-eks/storageclass.yaml
node_modules
package-lock.json
plan.json
plan.out
saved.plan
stac-server-*
.opensearch.info
stac-server.tgz
terraform-visual-report
terraform.tgz
51 changes: 0 additions & 51 deletions .gitlab-ci.yml

This file was deleted.

42 changes: 42 additions & 0 deletions scripts/update-lambdas.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
#
# Update the stac-server lambdas.
#
# Usage:
#
# ./scripts/update-lambdas.sh v2.2.3
#
# or
#
# export STAC_SERVER_TAG=v2.2.3
# ./scripts/update-lambdas.sh

set -e

if [ -z "$1" ]; then
if [ -z "${STAC_SERVER_TAG}" ]; then
echo "ERROR: STAC_SERVER_TAG is not set in the environment and is not provided on the command line."
echo "Usage: $0 [STAC_SERVER_TAG]"
exit 1
fi
else
STAC_SERVER_TAG="$1"
fi
STAC_SERVER_DIR="stac-server-${STAC_SERVER_TAG:1}"

echo "Downloading stac-server $STAC_SERVER_TAG to $STAC_SERVER_DIR..."
curl -L -f --no-progress-meter -o stac-server.tgz "https://github.com/stac-utils/stac-server/archive/refs/tags/${STAC_SERVER_TAG}.tar.gz"
tar -xzf stac-server.tgz

echo "Building stac-server in $STAC_SERVER_DIR..."
(cd "$STAC_SERVER_DIR"; npm install; BUILD_PRE_HOOK=true npm run build)

echo "Copying stac-server lambdas..."
mkdir -p modules/stac-server/lambda/api
cp "$STAC_SERVER_DIR/dist/api/api.zip" modules/stac-server/lambda/api/
mkdir -p modules/stac-server/lambda/ingest
cp "$STAC_SERVER_DIR/dist/ingest/ingest.zip" modules/stac-server/lambda/ingest/
mkdir -p modules/stac-server/lambda/pre-hook
cp "$STAC_SERVER_DIR/dist/pre-hook/pre-hook.zip" modules/stac-server/lambda/pre-hook/

echo "Done!"