bootstrap.yaml 1.48 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
osdu_gcp_bootstrap:
  stage: bootstrap
  image: python:3.8
  needs: ["osdu-gcp-deploy"]
  extends:
    - .osdu-gcp-variables
  variables:
    JSON_KEY: $OSDU_GCP_INTEGRATION_TESTER
    AUDIENCE: $GOOGLE_AUDIENCE
    DATA_PARTITION: $OSDU_TENANT
  script:
    - pip install -r $OSDU_GCP_DEPLOYMENTS_SUBDIR/requirements.txt
    - export BEARER_TOKEN=$(python $OSDU_GCP_DEPLOYMENTS_SUBDIR/Token.py)
    - python $OSDU_GCP_DEPLOYMENTS_SCRIPTS_SUBDIR/DeploySharedSchemas.py -u $OSDU_GCP_SCHEMA_URL/api/schema-service/v1/schema

  only:
    variables:
      - $OSDU_GCP == 'true'

osdu-gcp-test:
  needs: ["osdu_gcp_bootstrap"]
  only:
    variables:
      - $OSDU_GCP == 'true'
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

containerize_osdu_gcp_schema_bootstrap:
  stage: containerize
  image: docker:19.03.15
  tags: ["osdu-medium"]
  services:
    - docker:20.10.7-dind
  script:
    - export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/osdu-gcp-bootstrap:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/osdu-gcp-bootstrap:latest" ; fi
    - docker build -t $CI_REGISTRY_IMAGE/osdu-gcp-bootstrap:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file devops/$OSDU_GCP_VENDOR/bootstrap-osdu-module/Dockerfile .
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker push $CI_REGISTRY_IMAGE/osdu-gcp-bootstrap
  only:
    refs:
      - master
      - /.*bootstrap.*/
      - tags
    variables:
      - $OSDU_GCP == 'true'