kind: pipeline type: exec name: default clone: depth: 50 steps: - name: analyze environment: SONAR_TOKEN: from_secret: sonar_token commands: - if [[ -z "$(curl -s https://qa.adlerneves.com | grep '502 Bad Gateway')" ]]; then /opt/sonar-scanner/bin/sonar-scanner -Dsonar.login=$$SONAR_TOKEN ; fi - name: submodules depends_on: - analyze commands: - git submodule update --init --recursive --remote - name: build depends_on: - submodules commands: - hugo - name: deploy depends_on: - build commands: - sudo mkdir -p /var/lib/static-site-server-rs/sites/site_progress_bar/files - sudo cp -R public/. /var/lib/static-site-server-rs/sites/site_progress_bar/files/. - sudo install -m 644 -T site.yaml /var/lib/static-site-server-rs/sites/site_progress_bar/site.yaml - sudo chown http:http -R /var/lib/static-site-server-rs/sites/site_progress_bar - name: reload depends_on: - deploy commands: - sudo touch /var/lib/static-site-server-rs/routes.yaml