-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from cbanek/tickets/DM-30753
[DM-30753] TAP SCHEMA publishing
- Loading branch information
Showing
7 changed files
with
470 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: CI | ||
|
||
"on": [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
# Only do Docker builds of ticket branches and tagged releases. | ||
if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/tickets/') | ||
|
||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check out felis | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: lsst-dm/felis.git | ||
ref: u/bvan/tap11_fix | ||
path: felis | ||
|
||
- name: Install felis | ||
id: felis | ||
run: pip install . | ||
working-directory: ./felis | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Run the build | ||
id: build | ||
run: ./build-all | ||
working-directory: ./tap-schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM mysql/mysql-server:8.0.13-1.1.8 | ||
|
||
ADD ./sql/*.sql /docker-entrypoint-initdb.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash -ex | ||
ENVIRONMENT="$1" | ||
GIT_TAG=`echo $GITHUB_REF | sed -E 's,refs/(heads|tags)/,,' | sed -E 's,/,-,g'` | ||
shift | ||
|
||
# Generate SQL files from Felis yaml files | ||
# Place the SQL files in the sql directory, which gets | ||
# copied into the docker image. | ||
for file in $@ | ||
do | ||
felis load-tap --dry-run --engine-url=postgresql+psycopg2:// --tap-schema-name=tap_schema --tap-tables-postfix=11 ../yml/$file > sql/$file.sql | ||
done | ||
|
||
# Build and push docker images | ||
docker build . -t lsstsqre/tap-schema-$ENVIRONMENT:$GIT_TAG | ||
docker push lsstsqre/tap-schema-$ENVIRONMENT:$GIT_TAG | ||
|
||
# Clean up any untracked files in the sql directory | ||
# between the different runs of this script. | ||
git clean -n | ||
git clean -f sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash -ex | ||
./build mock | ||
./build stable dp01_dc2.yaml hsc_gen2.yaml hsc.yaml sdss_stripe82_01.yml wise_00.yml | ||
./build int dp01_dc2.yaml hsc_gen2.yaml hsc.yaml sdss_stripe82_01.yml wise_00.yml | ||
./build idfprod dp01_dc2.yaml hsc_gen2.yaml hsc.yaml sdss_stripe82_01.yml wise_00.yml | ||
./build idfint dp01_dc2.yaml hsc_gen2.yaml hsc.yaml sdss_stripe82_01.yml wise_00.yml |
Oops, something went wrong.