Skip to content

Commit

Permalink
update github actions and gitlab ci file
Browse files Browse the repository at this point in the history
  • Loading branch information
Matic Lubej committed Nov 6, 2023
1 parent 07affc1 commit 487631f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 16 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,3 @@ jobs:
files: coverage.xml
fail_ci_if_error: true
verbose: false

mirror-and-integration-test-on-gitlab:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Mirror + trigger CI
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
with:
args: "https://git.sinergise.com/eo/code/eo-learn/"
env:
GITLAB_HOSTNAME: "git.sinergise.com"
GITLAB_USERNAME: "github-action"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_PROJECT_ID: "164"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/ci_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: build

on:
pull_request:
push:
branches:
- "master"
- "develop"
workflow_call:
release:
types:
- created # draft release
# - published

mirror-and-integration-test-on-gitlab:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Mirror + trigger CI
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
with:
args: "https://git.sinergise.com/eo/code/eo-learn/"
env:
GITLAB_HOSTNAME: "git.sinergise.com"
GITLAB_USERNAME: "github-action"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_PROJECT_ID: "164"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: $GITHUB_REF
15 changes: 15 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ image: python:3.9

stages:
- test
- build

run_sh_integration_tests:
stage: test
Expand All @@ -13,3 +14,17 @@ run_sh_integration_tests:
- pip install .[DEV]
- sentinelhub.config --sh_client_id "$SH_CLIENT_ID" --sh_client_secret "$SH_CLIENT_SECRET" > /dev/null # Gitlab can't mask SH_CLIENT_SECRET in logs
- pytest -m sh_integration

build_docker_image:
stage: build
needs: []
rules:
- if: $GITHUB_REF =~ /^refs\/tags\/ # run only on releases
when: always
variables:
- CUSTOM_RUN_TAG: auto # this will create images with the latest tag and the version tag
- LAYER_NAME: dotai-eoo
when: manual
trigger:
project: teams/eor/dotai/infra
allow_failure: true

0 comments on commit 487631f

Please sign in to comment.