diff --git a/.github/workflows/gitspiegel-trigger.yml b/.github/workflows/gitspiegel-trigger.yml deleted file mode 100644 index dce3aaf2..00000000 --- a/.github/workflows/gitspiegel-trigger.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: gitspiegel sync - -# This workflow doesn't do anything, it's only use is to trigger "workflow_run" -# webhook, that'll be consumed by gitspiegel -# This way, gitspiegel won't do mirroring, unless this workflow runs, -# and running the workflow is protected by GitHub - -on: - pull_request: - types: - - opened - - synchronize - - unlocked - - ready_for_review - - reopened - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Do nothing - run: echo "let's go" diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 89c7f80a..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,177 +0,0 @@ - -stages: - - test - - build - - deploy - - publish-docker-description - -default: - interruptible: true - retry: - max: 2 - when: - - runner_system_failure - - unknown_failure - - api_failure - -variables: - KUBE_NAMESPACE: "faucetbots" - CI_REGISTRY: "docker.io/paritytech" - GIT_STRATEGY: fetch - CI_IMAGE: "docker.io/paritytech/eng-automation-ci:latest" - # BUILDAH_IMAGE is defined in group variables - BUILDAH_COMMAND: "buildah --storage-driver overlay2" - ARGOCD_IMAGE: argoproj/argocd:v2.5.5 - DOCKERHUB_REPO: "paritytech" - IMAGE_NAME: docker.io/$DOCKERHUB_REPO/faucet - DOCKER_TAG: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" - -.common-refs: &common-refs - rules: - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "main" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - -.pr-refs: &pr-refs - rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - -.publish-refs: &publish-refs - rules: - - if: $CI_COMMIT_REF_NAME == "main" # on commits to main branch - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # on tags (i.e. v1.0, v2.1rc1) - - if: $CI_COMMIT_REF_NAME =~ /^stg-v[0-9]+\.[0-9]+.*$/ # on staging tags - -.deploy-stg-refs: &deploy-stg-refs - rules: - - if: $CI_COMMIT_REF_NAME == "main" # on commits to main branch - - if: $CI_COMMIT_REF_NAME =~ /^stg-v[0-9]+\.[0-9]+.*$/ # on staging tags - -.deploy-prod-refs: &deploy-prod-refs - rules: - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # on tags (i.e. v1.0, v2.1rc1) - -.kubernetes-env: &kubernetes-env - image: $CI_IMAGE - tags: - - kubernetes-parity-build - -# template task for building and pushing an image - -.build-push-docker-image: &build-push-docker-image - image: $BUILDAH_IMAGE - script: - - test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" || - ( echo "no docker credentials provided"; exit 1 ) - - $BUILDAH_COMMAND build - --format=docker - --build-arg VCS_REF="${CI_COMMIT_SHA}" - --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" - --build-arg VERSION="${DOCKER_TAG}" - --build-arg PROJECT_NAME="${CI_PROJECT_NAME}" - --tag "$IMAGE_NAME:${DOCKER_TAG}" - --tag "$IMAGE_NAME:latest" - --file "$DOCKERFILE" . - - echo "$Docker_Hub_Pass_Parity" | - buildah login --username "$Docker_Hub_User_Parity" --password-stdin docker.io - - $BUILDAH_COMMAND info - - $BUILDAH_COMMAND push --format=v2s2 "$IMAGE_NAME:${DOCKER_TAG}" - - $BUILDAH_COMMAND push --format=v2s2 "$IMAGE_NAME:latest" - after_script: - - buildah logout --all - -# test that docker image can build - -.build-only-docker-image: &build-only-docker-image - image: $BUILDAH_IMAGE - script: - - $BUILDAH_COMMAND build - --format=docker - --build-arg VCS_REF="${CI_COMMIT_SHA}" - --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" - --build-arg PROJECT_NAME="${CI_PROJECT_NAME}" - --tag "$IMAGE_NAME:latest" - --file "$DOCKERFILE" . - - $BUILDAH_COMMAND info - -#### stage: build - -build-docker: - stage: build - <<: *pr-refs - <<: *kubernetes-env - <<: *build-only-docker-image - variables: - DOCKERFILE: "Dockerfile" - -publish-docker: - stage: build - <<: *publish-refs - <<: *kubernetes-env - <<: *build-push-docker-image - variables: - DOCKERFILE: "Dockerfile" - -#### stage: deploy - -.deploy-with-argocd: &deploy-with-argocd - image: $ARGOCD_IMAGE - tags: - - kubernetes-parity-build - variables: - ARGOCD_OPTS: --grpc-web --grpc-web-root-path /$DOMAIN - script: - - argocd app list - - argocd app set $APP --helm-set substrate-faucet.image.tag="${DOCKER_TAG}" - - argocd app sync $APP - - argocd app wait $APP --timeout 180 - -deploy-versi: - stage: deploy - <<: *deploy-stg-refs - extends: .deploy-with-argocd - environment: versi - variables: - DOMAIN: parity-versi - APP: substrate-faucet-versi - -deploy-westend: - stage: deploy - <<: *deploy-prod-refs - extends: .deploy-with-argocd - environment: westend - variables: - DOMAIN: parity-testnet - APP: substrate-faucet-westend - -deploy-paseo: - stage: deploy - <<: *deploy-prod-refs - extends: .deploy-with-argocd - environment: paseo - variables: - DOMAIN: parity-testnet - APP: substrate-faucet-paseo - -#### stage: publish-docker-description -.publish-docker-image-description: - stage: publish-docker-description - <<: *kubernetes-env - image: paritytech/dockerhub-description - variables: - DOCKER_USERNAME: $Docker_Hub_User_Parity - DOCKER_PASSWORD: $Docker_Hub_Pass_Parity - script: - - cd / && sh entrypoint.sh - -publish-docker-image-description-faucet: - extends: .publish-docker-image-description - variables: - DOCKERHUB_REPOSITORY: $DOCKERHUB_REPO/$IMAGE_NAME - README_FILEPATH: $CI_PROJECT_DIR/Dockerfile.README.md - SHORT_DESCRIPTION: "Generic Faucet for Substrate based chains" - rules: - - if: $CI_COMMIT_REF_NAME == "main" - changes: - - Dockerfile.README.md