Commit 151b2f10 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'fix/l3-components-common-proto' into 'develop'

Adapted L3_AttackMitigator/L3_CentralizedAttackDetector/L3_DistributedAttackDetector to common proto folder

See merge request teraflow-h2020/controller!145
parents 56525965 a2836b67
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Build, tag and push the Docker image to the GitLab registry
# Build, tag, and push the Docker image to the GitLab Docker registry
build compute:
  variables:
    IMAGE_NAME: 'compute' # name of the microservice
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Build, tag and push the Docker image to the GitLab registry
# Build, tag, and push the Docker image to the GitLab Docker registry
build context:
  variables:
    IMAGE_NAME: 'context' # name of the microservice
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Build, tag and push the Docker image to the GitLab registry
# Build, tag, and push the Docker image to the GitLab Docker registry
build device:
  variables:
    IMAGE_NAME: 'device' # name of the microservice
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Build, tag and push the Docker image to the GitLab registry
# Build, tag, and push the Docker image to the GitLab Docker registry
build interdomain:
  variables:
    IMAGE_NAME: 'interdomain' # name of the microservice
+10 −6
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Build, tag, and push the Docker images to the GitLab Docker registry
# Build, tag, and push the Docker image to the GitLab Docker registry
build l3_attackmitigator:
  variables:
    IMAGE_NAME: 'l3_attackmitigator' # name of the microservice
@@ -21,7 +21,7 @@ build l3_attackmitigator:
  before_script:
    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
  script:
    - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile ./src/
    - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile .
    - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
    - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
  after_script:
@@ -30,13 +30,15 @@ build l3_attackmitigator:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
    - changes:
      - src/common/**/*.py
      - proto/*.proto
      - src/$IMAGE_NAME/**/*.{py,in,yml}
      - src/$IMAGE_NAME/Dockerfile
      - src/$IMAGE_NAME/tests/*.py
      - manifests/${IMAGE_NAME}service.yaml
      - .gitlab-ci.yml

# Pull, execute, and run unitary tests for the Docker image from the GitLab registry
# Apply unit test to the component
unit test l3_attackmitigator:
  variables:
    IMAGE_NAME: 'l3_attackmitigator' # name of the microservice
@@ -64,6 +66,8 @@ unit test l3_attackmitigator:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
    - changes:
      - src/common/**/*.py
      - proto/*.proto
      - src/$IMAGE_NAME/**/*.{py,in,yml}
      - src/$IMAGE_NAME/Dockerfile
      - src/$IMAGE_NAME/tests/*.py
Loading