como desde un gitlabci construir imagen .net crear un docker con ella docker y subir a ecr con un tag abrebiado y despues actualizar el ecs
stages:
- compile
- build
- deploy
compile:
stage: compile
image: mcr.microsoft.com/dotnet/sdk:latest
script:
- dotnet build -o build/
artifacts:
paths:
- build/
Microsoft
Microsoft Artifact Registry
Microsoft Artifact Registry (also known as Microsoft Container Registry or MCR) Discovery Portal
Hacemos el build 👇
build_image:
stage: build
image:
name: armandofcom/deploy:docker-awscli
entrypoint: [""]
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
environment: develop
before_script:
- DOCKER_HOST='/var/run/docker.sock'; if [ ! -S "$DOCKER_HOST" ]; then DOCKER_HOST='tcp://docker:2375'; export DOCKER_HOST=$DOCKER_HOST;fi; echo $DOCKER_HOST
- echo "Logging in to Amazon ECR..."
- aws ecr get-login-password --region eu-south-2 | docker login --username AWS --password-stdin *****.dkr.ecr.eu-south-2.amazonaws.com
script:
- echo "Building Docker image..."
- docker build -t $ECR_REPOSITORY_URI:${CI_COMMIT_SHORT_SHA} .
- echo "Pushing Docker image to ECR..."
- docker push $ECR_REPOSITORY_URI:${CI_COMMIT_SHORT_SHA}
only:
- develop
build_image:
stage: build
image:
name: armandofcom/deploy:docker-awscli
entrypoint: [""]
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
environment: develop
before_script:
- DOCKER_HOST='/var/run/docker.sock'; if [ ! -S "$DOCKER_HOST" ]; then DOCKER_HOST='tcp://docker:2375'; export DOCKER_HOST=$DOCKER_HOST;fi; echo $DOCKER_HOST
- echo "Logging in to Amazon ECR..."
- aws ecr get-login-password --region eu-south-2 | docker login --username AWS --password-stdin *****.dkr.ecr.eu-south-2.amazonaws.com
script:
- echo "Building Docker image..."
- docker build -t $ECR_REPOSITORY_URI:${CI_COMMIT_SHORT_SHA} .
- echo "Pushing Docker image to ECR..."
- docker push $ECR_REPOSITORY_URI:${CI_COMMIT_SHORT_SHA}
only:
- develop
Please open Telegram to view this post
VIEW IN TELEGRAM
actualizar el tag
stage: deploy
image: armandofcom/deploy:docker-awscli
environment: develop
before_script:
- apk update
- apk add jq
script:
- TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition $SERVICE_NAME --region eu-south-2)
- NEW_CONTAINER_DEFINTIION=$(echo $TASK_DEFINITION | jq --arg IMAGE "$ECR_REPOSITORY_URI:${CI_COMMIT_SHORT_SHA}" '.taskDefinition | .containerDefinitions[0].image = $IMAGE | del(.taskDefinitionArn) | del(.revision) | del(.status) | del(.requiresAttributes) | del(.compatibilities) | del(.registeredAt) | del(.registeredBy)')
- echo "Registering new container definition..."
- NEW_TASK_INFO=$(aws ecs register-task-definition --region eu-south-2 --family $SERVICE_NAME --cli-input-json "${NEW_CONTAINER_DEFINTIION}")
- NEW_REVISION=$(echo $NEW_TASK_INFO | jq '.taskDefinition.revision')
- echo "Updating the service..."
- aws ecs update-service --region eu-south-2 --cluster $CLUSTER_NAME --service $SERVICE_NAME --task-definition $SERVICE_NAME:${NEW_REVISION}
only:
- develop
dependencies:
- build_image
Si has comido en Antojos y no estas en cuba este video te recordara sabores
https://www.youtube.com/watch?v=LXrdXJ6mH8I
https://www.youtube.com/watch?v=LXrdXJ6mH8I
YouTube
El RESTAURANTE con las MEJORES CROQUETAS de La Habana 🔥
Visitamos uno de los mejores restaurantes de la Habana Vieja en Cuba, uno lugar que tiene las mejores croquetas de toda la Habana.
Si te gustó el vídeo por favor déjanos tu like 👍 y un comentario con tu opinión 🙏
Suscríbete y activa la campanita 🔔 para…
Si te gustó el vídeo por favor déjanos tu like 👍 y un comentario con tu opinión 🙏
Suscríbete y activa la campanita 🔔 para…
Si tienes que hacer un githubaccions y te toca hacer algo en php ahi tienes
https://github.com/shivammathur/setup-php
https://github.com/shivammathur/setup-php
GitHub
GitHub - shivammathur/setup-php: GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various…
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools. - shivammathur/setup-php
necesitas poner otro calendario de los festivos de otro pais listado aca
https://gist.github.com/dhoeric/76bd1c15168ee0ee61ad3bf1730dcb65
https://gist.github.com/dhoeric/76bd1c15168ee0ee61ad3bf1730dcb65
Gist
Google Calendar - Public Holiday Calendars
Google Calendar - Public Holiday Calendars. GitHub Gist: instantly share code, notes, and snippets.
This media is not supported in your browser
VIEW IN TELEGRAM
Quien más se identifica