GithubHelp home page GithubHelp logo

azure / arc-cicd-demo-src Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 93.0 731 KB

Example source repo for the Azure Arc-enabled Kubernetes GitOps tutorial

License: MIT License

Python 41.93% Dockerfile 0.43% CSS 7.41% HTML 4.88% Shell 45.34%

arc-cicd-demo-src's Introduction

arc-cicd-demo-src's People

Contributors

bjcmit avatar dtzar avatar eedorenko avatar microsoftopensource avatar pmalarme avatar sudivate avatar tcare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

arc-cicd-demo-src's Issues

Container Registry cannot be found, unless resource group is explicitly provided

context
Following: Tutorial GitOps CI/CD

Issue
The "az acr build" activity in the CI pipeline fails on finding the ACR instance:
image

This command works locally, but not on a (Microsoft hosted) build agent. I'm using a Service Connection (ARM, pointing to specific RG) and have assigned Owner permissions on the subscription-level to the pipeline Service Principal.

workaround
Explicitly adding the --resource-group parameter on the az acr build command.

Gitops-connector only support 1 kustomization per gitops repo

Does the gitops-connector only support 1 kustomization per gitops repo.

Our workflow has multiple Kustomization per gitops repo. When running multiple kustomization the dev kustomization event triggers the staging kustomization and vice versa.

hadolint2junitxml.py throwing json.decoder.JSONDecodeError

I got hadolint result in a file having below data
[{"line":1,"code":"DL3006","message":"Always tag the version of an image explicitly","column":1,"file":"Dockerfile","level":"warning"},{"line":2,"code":"DL3015","message":"Avoid additional packages by specifying --no-install-recommends","column":1,"file":"Dockerfile","level":"info"},{"line":2,"code":"DL3009","message":"Delete the apt-get lists after installing something","column":1,"file":"Dockerfile","level":"info"},{"line":2,"code":"SC2154","message":"node_verion is referenced but not assigned (did you mean 'node_version'?).","column":1,"file":"Dockerfile","level":"warning"},{"line":4,"code":"DL3045","message":"COPY to a relative destination without WORKDIR set.","column":1,"file":"Dockerfile","level":"warning"},{"line":5,"code":"DL3003","message":"Use WORKDIR to switch to a directory","column":1,"file":"Dockerfile","level":"warning"},{"line":5,"code":"DL3016","message":"Pin versions in npm. Instead of npm install <package> use npm install <package>@<version>","column":1,"file":"Dockerfile","level":"warning"},{"line":8,"code":"DL3011","message":"Valid UNIX ports range from 0 to 65535","column":1,"file":"Dockerfile","level":"error"}]

The py function always thows error . I guess there is a prblem with json.loads in hadolint2junitxml.py

I am facing a issue while CD pipeline is running. Below is the screenshot.

ts=2021-07-28T12:29:03.571042763Z caller=warming.go:180 component=warmer canonical_name=.azurecr.io/azvote/azure-vote-front auth={map[]} err="requesting tags: Get "https://.azurecr.io/v2/azvote/azure-vote-front/tags/list": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information."
ts=2021-07-28T12:30:02.239030293Z caller=warming.go:180 component=warmer canonical_name=.azurecr.io/azvote/azure-vote-back auth={map[]} err="requesting tags: Get "https://.azurecr.io/v2/azvote/azure-vote-back/tags/list": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information."
ts=2021-07-28T12:30:03.709831871Z caller=warming.go:180 component=warmer canonical_name=.azurecr.io/azvote/azure-vote-front auth={map[]} err="requesting tags: Get "https://.azurecr.io/v2/azvote/azure-vote-front/tags/list": unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information."

CD pipeline doesn't wait for deployment (error instead)

Hello,

Everytime the CD pipeline is ran manually or automatically triggered by the CI pipeline, I get an error on the "Wait for changes to be applied" task ("wait for the deployment completion" job to be specific)

image

Here is the output logged into the agent's console:

============================================================================== 
Task         : Wait for deployment completion
Description  : Invoke a REST API as a part of your pipeline.
Version      : 1.198.0
Author       : Microsoft Corporation
Help URL     : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/http-rest-api
============================================================================== 
2022-06-03T08:56:54.7618625Z PATCH https://dev.azure.com/REDACTED/REDACTED/_apis/git/repositories/arc-cicd-demo-gitops/pullRequests/9/properties?api-version=6.0
Request body: [
  {
    "op": "add",
    "path": "/callback-task-id",
    "from": null,
    "value": "{\"taskid\":\"6f2d1337-9ed3-578f-60ac-e83280f1bf3d\", \"jobid\":\"736cfeee-0e1e-576a-9966-266cc2920b0a\", \"planurl\":\"https://dev.azure.com/REDACTED/\",  \"planid\":\"607710ba-7a67-47d6-b381-24f8e5ceb42a\", \"projectid\":\"bb51bca6-9deb-4c65-9d53-8a7028050369\", \"pr_num\":\"9\"}"
  }
]
				Response Code: 0
				Response: An error was encountered while processing request. Exception: {"$id":"1","innerException":null,"message":"TF401019: The Git repository with name or identifier arc-cicd-demo-gitops does not exist or you do not have permissions for the operation you are attempting.","typeName":"Microsoft.TeamFoundation.Git.Server.GitRepositoryNotFoundException, Microsoft.TeamFoundation.Git.Server","typeKey":"GitRepositoryNotFoundException","errorCode":0,"eventId":3000}
Exception Message: The remote server returned an error: (404) Not Found. (type WebException)

As you have may noticed, I have changed the changed the api-version from 6.0-preview.1 to the stable version 6.0 (I get the same issue on the 6.0-preview.1 version).

I am also sure that the arc-cicd-demo-gitops repository exists and I have FULL permissions on my Build Service User
image

CD pipeline doesn't pick up Flux changes!

Hello,

I was following the guide on implementing CI/CD with GitOps (Flux v2).

On the CD pipeline section of the guide, step 5 (Monitor the Git Commit status on the Commit history tab. Once it is succeeded the CD pipeline will go ahead and start automated testing), I always get "failed" as the Git Commit Status on the branch "arc-cicd-demo-src".

The pipeline fails at the task of "Waiting for changes to be applied" (it runs until I get a timeout. approx after an hour).

image

Please note that the Flux picked up the changes and successfully applied them in 10 minutes.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.