Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Github actions to trigger internal Gitlab CI #490

Merged
merged 11 commits into from
Nov 7, 2023
16 changes: 0 additions & 16 deletions .github/workflows/ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,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/sentinelhub-py-dev/"
env:
GITLAB_HOSTNAME: "git.sinergise.com"
GITLAB_USERNAME: "github-action"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_PROJECT_ID: "354"
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: mirror_and_trigger

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

jobs:
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/sentinelhub-py-dev/"
env:
FOLLOW_TAGS: "true"
GITLAB_HOSTNAME: "git.sinergise.com"
GITLAB_USERNAME: "github-action"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_PROJECT_ID: "354"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 17 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
stages:
- update
- test
- build

update_base_image:
stage: update
Expand All @@ -15,11 +16,25 @@ update_base_image:
run_sh_integration_tests:
stage: test
image: "$BASE_IMAGE"
dependencies: [ ]
needs: [ ]
dependencies: []
needs: []
rules:
- when: always
if: '$UPDATE_BASE_IMAGE != "true"'
script:
- pip install -e .[AWS,DEV]
- pytest -m "sh_integration"

build_docker_image:
stage: build
needs: []
rules:
- if: $CI_COMMIT_TAG # 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-eo
- when: manual
trigger:
project: eo/infra/docker
allow_failure: true