diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-01-15 15:56:13 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2025-01-15 15:56:13 -0500 |
commit | 91e10597dd1409fbf4e88bbd43f23ce69dc4431b (patch) | |
tree | 35545e3d07c2d36a20d932e04afe14f5a2d6efc9 | |
parent | 24a2c53fa53316667d7618fac3d9ffe12aa5eb57 (diff) | |
download | ghasandbox-91e10597dd1409fbf4e88bbd43f23ce69dc4431b.tar.gz |
OK
-rw-r--r-- | .github/actions/stasis_indexer/action.yml | 156 | ||||
-rw-r--r-- | .github/workflows/pipeline_deliver.yml | 2 |
2 files changed, 88 insertions, 70 deletions
diff --git a/.github/actions/stasis_indexer/action.yml b/.github/actions/stasis_indexer/action.yml index c6e64ed..7eee977 100644 --- a/.github/actions/stasis_indexer/action.yml +++ b/.github/actions/stasis_indexer/action.yml @@ -1,17 +1,29 @@ name: STASIS Indexer -run-name: | - STASIS Indexer +description: | + Executes the STASIS indexer with arguments on: workflow_call: inputs: + artifactory_url: + type: string + description: Artifactory base address (without /artifactory) + required: true + default: "" + artifactory_repo: type: string description: Artifactory repository path where deliveries are stored required: true default: "some-repo" + artifactory_access_key: + type: string + description: Artifactory access key + required: true + default: "" + mission: type: choice description: Mission name (e.g. hst) @@ -41,73 +53,77 @@ on: required: false default: "" + release_notes_pat: + type: string + description: GitHub token with WRITE + required: true + default: "" + env: REMOTE_PATHS: "/path/to/somewhere" - #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 + +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + + - uses: actions/checkout@v4 + with: + repository: 'spacetelescope/stasis' + path: ${{ github.workspace }}/stasis + + - name: Install STASIS dependencies + 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: 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: 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: Run STASIS Indexer + 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" + env: + #Artifactory service URL (ending in /artifactory) + STASIS_JF_ARTIFACTORY_URL: ${{ inputs.artifactory_url }}/artifactory + #Artifactory "generic" repository to write to + STASIS_JF_REPO: ${{ inputs.artifactory_repo }} + STASIS_JF_ACCESS_TOKEN: ${{ inputs.artifactory_access_key }} + STASIS_GH_TOKEN: ${{ inputs.release_notes_pat }} + shell: bash diff --git a/.github/workflows/pipeline_deliver.yml b/.github/workflows/pipeline_deliver.yml index 2418007..c729a9b 100644 --- a/.github/workflows/pipeline_deliver.yml +++ b/.github/workflows/pipeline_deliver.yml @@ -52,9 +52,11 @@ jobs: - name: Index uses: ./.github/actions/stasis_indexer with: + artifactory_url: https://blah.tld artifactory_repo: ${{ inputs.artifactory_repo }} mission: ${{ inputs.mission }} build_name: ${{ inputs.build_name }} destination: ${{ inputs.destination }} stasis_indexer_args: ${{ inputs.stasis_indexer_args }} + release_notes_pat: anonymous |