.gitlab-ci.yml 4.44 KB
Newer Older
1
2
3
4
5
6
7
variables:
  #seismic store service variables
  ENVIRONMENT: cloud
  ISGITLAB: "true"
  PORT: 80
  REPLICA: 1
  UTEST_RUNTIME_IMAGE: seistore-svc-runtime
Daniel Perez's avatar
Daniel Perez committed
8
9
  SDMS_MIN_REPLICAS: 1
  SDMS_MAX_REPLICAS: 5
Rucha Deshpande's avatar
Rucha Deshpande committed
10

11
  #aws variables
Rucha Deshpande's avatar
Rucha Deshpande committed
12
13
14
15
  AWS_SERVICE: seismic-store
  AWS_BUILD_SUBDIR: src/cloud/providers/aws/build-aws
  AWS_TEST_SUBDIR: tests
  AWS_ENVIRONMENT: dev
Yunhua Koglin's avatar
Yunhua Koglin committed
16
17
  AWS_DEPLOY_TARGET: EKS
  AWS_EKS_DEPLOYMENT_NAME: os-seismic-store
Rucha Deshpande's avatar
Rucha Deshpande committed
18
19
20
21
22
  AWS_BUILDER_DOCKERFILE_PATH: src/cloud/providers/aws/build-aws/builder.Dockerfile
  AWS_RUNTIME_DOCKERFILE_PATH: src/cloud/providers/aws/build-aws/runtime.Dockerfile
  # skipping tests here. Using a local file to run tests
  AWS_SKIP_TESTS: "true"
  #azure variables
23
24
25
26
27
28
29
30
31
32
33
  AZURE_SERVICE: seismic-store-service
  #gcp variables
  GCP_APPLICATION_NAME: os-seismic-store-service
  GCP_DEPLOY_FILE: $OSDU_GCP_DEPLOY_FILE
  GCP_PROJECT: opendes-evt
  GCP_SERVICE: seismic-store-service
  GCP_VENDOR: gcp
  #ibm variables
  IBM_OPENSHIFT_PROJECT: og-cicd
  IBM_VENDOR: ibm

34
35
36
37
38
  OSDU_GCP_LOG_LEVEL: INFO
  OSDU_GCP_SERVICE: seismic-store
  OSDU_GCP_VENDOR: gcp
  OSDU_GCP_APPLICATION_NAME: seismic-store
  OSDU_GCP_APPLICATION: seismic-store
39
40
  OSDU_GCP_ENTITLEMENT_BASE_URL_PATH: /entitlements/v2
  OSDU_GCP_DATA_PARTITION_REST_HEADER_KEY: data-partition-id
41
  OSDU_GCP_DES_SERVICE_HOST_COMPLIANCE: https://community.osdu-gcp.go3-nrg.projects.epam.com/api
42
  OSDU_GCP_DES_SERVICE_HOST_STORAGE: https://os-storage-attcrcktoa-uc.a.run.app/api
43
  OSDU_GCP_ENV_VARS: CLOUDPROVIDER=${OSDU_GCP_CLOUD_PROVIDER},DES_SERVICE_HOST_PARTITION=${OSDU_GCP_PARTITION_API},ENTITLEMENT_BASE_URL_PATH=${OSDU_GCP_ENTITLEMENT_BASE_URL_PATH},DATA_PARTITION_REST_HEADER_KEY=${OSDU_GCP_DATA_PARTITION_REST_HEADER_KEY},DES_SERVICE_HOST_STORAGE=${OSDU_GCP_DES_SERVICE_HOST_STORAGE},DES_SERVICE_HOST_COMPLIANCE=${OSDU_GCP_DES_SERVICE_HOST_COMPLIANCE},SEISTORE_DES_TARGET_AUDIENCE=${GOOGLE_AUDIENCE},SERVICE_CLOUD_PROJECT=${OSDU_GCP_PROJECT},APP_ENVIRONMENT_IDENTIFIER=${TENANT},IMP_SERVICE_ACCOUNT_SIGNER=${OSDU_GCP_IMP_SERVICE_ACCOUNT_SIGNER},DES_SERVICE_HOST_ENTITLEMENT=${OSDU_GCP_ENTITLEMENTS_V2_BASE_URL},SEISTORE_DES_APPKEY=${OSDU_GCP_SEISTORE_DES_APPKEY},DES_REDIS_INSTANCE_ADDRESS=${OSDU_GCP_DES_REDIS_INSTANCE_ADDRESS},DES_REDIS_INSTANCE_PORT=${OSDU_GCP_DES_REDIS_INSTANCE_PORT},LOCKSMAP_REDIS_INSTANCE_ADDRESS=${OSDU_GCP_LOCKSMAP_REDIS_INSTANCE_ADDRESS}  --vpc-connector=$OSDU_GCP_VPC_CONNECTOR
44

45
include:
46
47
48
  # pipeline logic
  - project: "osdu/platform/ci-cd-pipelines"
    file: "standard-setup.yml"
49
    ref: release/0.11
50

51
  # build
Diego Molteni's avatar
Diego Molteni committed
52
  - local: "devops/osdu/build/seismic-store-service.yml"
53

Daniel Perez's avatar
Daniel Perez committed
54
  # scan
55
  # fossa
56
  - local: "devops/osdu/scanners/fossa-node.yml"
57
58
  
  # lint
Daniel Perez's avatar
Daniel Perez committed
59
  - local: "/devops/osdu/scanners/lint-node.yml"
Daniel Perez's avatar
Daniel Perez committed
60
61
62
  
  # scan for secrets
  - local: "/devops/osdu/scanners/scan-for-secrets-node.yml"
63

64
65
66
  # containerize
  - project: "osdu/platform/ci-cd-pipelines"
    file: "containerize/seismic-store-service.yml"
67
    ref: release/0.11
68

Rucha Deshpande's avatar
Rucha Deshpande committed
69
70
  # aws
  - project: "osdu/platform/ci-cd-pipelines"
71
    file: "cloud-providers/aws-global.yml"
72
    ref: release/0.11
Rucha Deshpande's avatar
Rucha Deshpande committed
73
74
75

  - local: "/devops/aws/awstest.yml"

76
  # deploy
77
  #azure
Diego Molteni's avatar
Diego Molteni committed
78
  - local: "/devops/osdu/cloud-providers/azure-seismic-store-service.yml"
79
80

    #ibm
81
82
  - project: "osdu/platform/ci-cd-pipelines"
    file: "cloud-providers/ibm-seismic-store-service.yml"
83
    ref: release/0.11
84
85
    #gcp
  - project: "osdu/platform/ci-cd-pipelines"
86
    ref: release/0.11
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
    file: "cloud-providers/osdu-gcp-cloudrun.yml"

osdu-gcp-test:
  script:
    - echo "Tests not implemented"
  extends:
    - .osdu-gcp-variables
  only:
    variables:
      - $OSDU_GCP == 'true' && $OSDU_GCP_INT_TEST_TYPE != 'python'

osdu-gcp-test-python:
  script:
    - echo "Tests not implemented"
  only:
    variables:
      - $OSDU_GCP == 'true' && $OSDU_GCP_INT_TEST_TYPE == 'python'
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

osdu-gcp-containerize-gitlab:
  stage: containerize
  needs: ["compile-and-unit-test"]
  tags: ["osdu-medium"]
  extends: .osdu-gcp-variables
  image: docker:19.03
  cache: {}
  allow_failure: true
  script:
    - export EXTRA_DOCKER_TAG=""; if [ "$CI_COMMIT_TAG" != "" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/osdu-gcp:$CI_COMMIT_TAG" ; elif [ "$CI_COMMIT_REF_NAME" = "master" ] ; then EXTRA_DOCKER_TAG="-t $CI_REGISTRY_IMAGE/osdu-gcp:latest" ; fi
    - docker build -t $CI_REGISTRY_IMAGE/osdu-gcp:$CI_COMMIT_SHORT_SHA $EXTRA_DOCKER_TAG --file docker/runtime.Dockerfile .
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
    - docker push $CI_REGISTRY_IMAGE/osdu-gcp
  only:
    variables:
      - $OSDU_GCP == 'true'