diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-01-15 13:36:14 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-01-15 13:36:14 -0500 |
commit | 354c8e3b6f341532b7fbc861ac4781c2e05186bb (patch) | |
tree | f7557617eb76f5f75161f5e3714aaef3abb5ddd1 | |
parent | 3e90e3d26d695c340e10b925b2334fcf6833e016 (diff) | |
download | ghasandbox-354c8e3b6f341532b7fbc861ac4781c2e05186bb.tar.gz |
OK
-rw-r--r-- | .github/workflows/pipeline_deliver.yml | 57 | ||||
-rw-r--r-- | .github/workflows/stasis_indexer.yml | 113 |
2 files changed, 170 insertions, 0 deletions
diff --git a/.github/workflows/pipeline_deliver.yml b/.github/workflows/pipeline_deliver.yml new file mode 100644 index 0000000..d61dff9 --- /dev/null +++ b/.github/workflows/pipeline_deliver.yml @@ -0,0 +1,57 @@ +name: Deliver Pipeline + +run-name: | + Deliver Pipeline + +on: + workflow_dispatch: + inputs: + artifactory_repo: + type: string + description: Artifactory repository name where deliveries are stored + required: true + default: "some-repo" + + mission: + type: choice + description: Artifactory <artifactory_repo>/<mission> directory + options: + - thing1 + - thing2 + - thing3 + - thing4 + required: true + default: "thing4" + + build_name: + type: string + description: Artifactory <mission>/<build_name> directory + requires: true + default: "" + + destination: + type: string + description: Path to store an indexed delivery + required: true + default: "/path/to/stasis/releases" + + stasis_indexer_args: + type: string + description: arguments for stasis tool + required: true + default: "" + +jobs: + deliver: + name: Deliver + steps: + - name: Index + uses: ./.github/workflows/stasis_indexer.yml + secrets: inherit + with: + artifactory_repo: ${{ inputs.artifactory_repo }} + mission: ${{ inputs.mission }} + build_name: ${{ inputs.build_name }} + destination: ${{ inputs.destination }} + stasis_indexer_args: ${{ inputs.stasis_indexer_args }} + diff --git a/.github/workflows/stasis_indexer.yml b/.github/workflows/stasis_indexer.yml new file mode 100644 index 0000000..46ad2fc --- /dev/null +++ b/.github/workflows/stasis_indexer.yml @@ -0,0 +1,113 @@ +name: STASIS Indexer + +run-name: | + STASIS Indexer + +on: + workflow_call: + inputs: + artifactory_repo: + type: string + description: Artifactory repository name where deliveries are stored + required: true + default: "scsb-stasis" + + mission: + type: choice + description: Artifactory <artifactory_repo>/<mission> directory + options: + - hst + - jwst + - roman + - generic + required: true + default: "generic" + + build_name: + type: string + description: Artifactory <mission>/<build_name> directory + requires: true + default: "" + + destination: + type: string + description: Path to store an indexed delivery + required: true + default: "/eng/ssb/websites/ssbpublic/stasis/releases" + + stasis_indexer_args: + type: string + description: arguments for stasis tool + required: true + default: "" + +env: + REMOTE_PATHS: "/eng/ssb/websites/ssbpublic/stasis" + #Artifactory service URL (ending in /artifactory) + STASIS_JF_ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}/artifactory + #Artifactory "generic" repository to write to + STASIS_JF_REPO: ${{ inputs.artifactory_repo }} + STASIS_JF_ACCESS_TOKEN: ${{ secrets.ARTIFACTORY_ACCESS_KEY }} + STASIS_GH_TOKEN: ${{ secrets.RELEASE_NOTES_PAT }} + +jobs: + index: + name: STASIS Indexer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/checkout@v4 + with: + repository: 'spacetelescope/stasis' + path: ${{ github.workspace }}/stasis + + - name: Install STASIS dependencies + if: ${{ inputs.os == 'Linux' }} + run: | + sudo apt-get update + sudo apt-get install -y ca-certificates cmake libcurl4-openssl-dev libxml2-dev rsync + shell: bash + + - name: Set TMPDIR + run: | + echo TMPDIR=${{ runner.temp }} >> $GITHUB_ENV + shell: bash + + - name: Build STASIS + run: | + rm -rf ${{ github.workspace }}/stasis/build + cd ${{ github.workspace }}/stasis + mkdir -p build + cd build + cmake .. \ + -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/.local" \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" + make + make install + shell: bash + + - name: Install SSHFS + run: | + sudo apt update + sudo apt -y install sshfs + + - name: Mount external data areas + run: | + for remote in $REMOTE_PATHS; do + echo mounting $remote + done + shell: bash + + - name: Run Stasis Linux + run: | + src="${{ inputs.artifactory_repo }}/${{ inputs.mission }}/${{ inputs.build_name }}" + dest="${{ inputs.destination }}/${{ inputs.mission }}/${{ inputs.build_name }} + stasis_indexer \ + --unbuffered \ + --verbose \ + --web \ + --dest "${dest}" + ${{ inputs.stasis_args }} \ + "$src" + shell: bash |