Index year #9839
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
name: Index year | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: remotely, large datasets | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
# - name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v2 | |
- name: deploy-key (if dev or master) | |
run: | | |
mkdir -p ~/.ssh/; | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null; | |
echo "$SSHENC" | base64 -d | gpg -d --passphrase $SSHPWD --batch > /tmp/id_rsa_matchID; | |
chmod 600 /tmp/id_rsa_matchID; | |
ssh-add /tmp/id_rsa_matchID; | |
echo "$SSHPUB" > ~/.ssh/id_rsa_matchID.pub; | |
echo "Host * !""$BASTION_HOST" > ~/.ssh/config; | |
echo " ProxyCommand ssh -o StrictHostKeyChecking=no $BASTION_USER@$BASTION_HOST nc %h %p" >> ~/.ssh/config; | |
cat ~/.ssh/config; | |
env: | |
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }} | |
BASTION_HOST: ${{ secrets.BASTION_HOST }} | |
BASTION_USER: ${{ secrets.BASTION_USER }} | |
SSHENC: ${{ secrets.SSHENC }} | |
SSHPWD: ${{ secrets.SSHPWD }} | |
SSHPUB: ${{ secrets.SSHPUB }} | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
- name: Check | |
if: success() | |
run: | | |
make clean full-check \ | |
GIT_BRANCH=${GIT_BRANCH} \ | |
FILES_TO_PROCESS=${FILES_TO_PROCESS} \ | |
REPOSITORY_BUCKET=${REPOSITORY_BUCKET} | |
env: | |
VERBOSE: True | |
FILES_TO_PROCESS: deces-2020-m[0-1][0-9].txt.gz | |
REPOSITORY_BUCKET: fichier-des-personnes-decedees-elasticsearch-dev | |
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }} | |
STORAGE_ACCESS_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} | |
STORAGE_SECRET_KEY: ${{ secrets.STORAGE_SECRET_KEY }} | |
- name: Run | |
if: success() | |
run: | | |
make remote-all \ | |
GIT_BRANCH="$GIT_BRANCH" \ | |
FILES_TO_PROCESS=${FILES_TO_PROCESS} \ | |
REPOSITORY_BUCKET=${REPOSITORY_BUCKET} \ | |
SCW_FLAVOR=${SCW_FLAVOR} SCW_VOLUME_SIZE=${SCW_VOLUME_SIZE} SCW_VOLUME_TYPE=${SCW_VOLUME_TYPE} \ | |
CHUNK_SIZE=${CHUNK_SIZE} ES_THREADS=${ES_THREADS} RECIPE_THREADS=${RECIPE_THREADS} ES_MEM=${ES_MEM} RECIPE_QUEUE=${RECIPE_QUEUE} | |
env: | |
VERBOSE: True | |
FILES_TO_PROCESS: deces-2020-m[0-1][0-9].txt.gz | |
REPOSITORY_BUCKET: fichier-des-personnes-decedees-elasticsearch-dev | |
SCW_FLAVOR: PRO2-M | |
SCW_VOLUME_SIZE: 20000000000 | |
SCW_VOLUME_TYPE: b_ssd | |
CHUNK_SIZE: 75000 | |
ES_THREADS: 14 | |
RECIPE_THREADS: 16 | |
ES_MEM: 30000m | |
RECIPE_QUEUE: 18 | |
GIT_BRANCH: ${{ steps.extract_branch.outputs.branch }} | |
remote_http_proxy: ${{ secrets.remote_http_proxy }} | |
remote_https_proxy: ${{ secrets.remote_https_proxy }} | |
remote_no_proxy: localhost | |
SCW_ORGANIZATION_ID: ${{ secrets.SCW_ORGANIZATION_ID }} | |
SCW_PROJECT_ID: ${{ secrets.SCW_PROJECT_ID }} | |
SCW_SECRET_TOKEN: ${{ secrets.SCW_SECRET_TOKEN }} | |
SCW_SERVER_OPTS: ${{ secrets.SCW_SERVER_OPTS }} | |
STORAGE_ACCESS_KEY: ${{ secrets.STORAGE_ACCESS_KEY }} | |
STORAGE_SECRET_KEY: ${{ secrets.STORAGE_SECRET_KEY }} | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock |