Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
eb2c5f3
separate build yamls for ci_prod branch (#415)
ganga1980 Aug 5, 2020
df29e35
re-enable adx path (#420)
vishiy Aug 6, 2020
bcc8506
Gangams/release changes (#419)
ganga1980 Aug 6, 2020
39534d6
fix for zero filled metrics (#423)
rashmichandrashekar Aug 6, 2020
5e0b429
consolidate windows agent image docker files (#422)
ganga1980 Aug 7, 2020
c5c28f0
Gangams/cluster creation scripts (#414)
ganga1980 Aug 13, 2020
d7a3750
fix: Pin to a particular version of ltsc2019 by SHA (#427)
bragi92 Aug 14, 2020
5e8de91
enable collecting npm metrics (optionally) (#425)
vishiy Aug 14, 2020
17e7ff8
Saaror patch 3 (#426)
saaror Aug 17, 2020
6c7c675
Gangams/add containerd support to windows agent (#428)
ganga1980 Aug 18, 2020
bac8a32
Gangams/arc k8s metrics (#413)
ganga1980 Aug 20, 2020
ab03640
fix: Reverting back to ltsc2019 tag (#429)
bragi92 Aug 21, 2020
af0f981
more kubelet metrics (#430)
vishiy Aug 27, 2020
7fc4d4c
fix nom issue when config is empty (#432)
vishiy Sep 1, 2020
281a77c
support multiple docker paths when docker root is updated thru knode …
vishiy Sep 1, 2020
d8d7f9f
Gangams/doc and other related updates (#434)
ganga1980 Sep 11, 2020
2d56087
add missing serviceprincipal in ps scripts (#435)
ganga1980 Sep 14, 2020
a28aaf0
fix telemetry bug (#436)
vishiy Sep 15, 2020
0062b32
Gangams/readmeupdates non aks 09162020 (#437)
ganga1980 Sep 16, 2020
1a7ef1c
Gangams/fix weird conflicts (#439)
ganga1980 Sep 16, 2020
bf75bf0
fix quote issue for the region (#441)
ganga1980 Sep 21, 2020
6287724
fix cpucapacity/limit bug (#442)
vishiy Sep 21, 2020
bd30a47
grwehner/pv-usage-metrics (#431)
gracewehner Sep 23, 2020
7304a6b
add new custom metric regions (#444)
vishiy Sep 23, 2020
2d8c03f
add 'Terminating' state (#443)
vishiy Sep 23, 2020
da06d76
Gangams/sept agent release tasks (#445)
ganga1980 Sep 25, 2020
5453054
grwehner/pv-collect-volume-name (#448)
gracewehner Sep 28, 2020
fe9f14d
Changes for september agent release (#449)
rashmichandrashekar Sep 30, 2020
f1657c6
Gangams/arc k8s related scripts, charts and doc updates (#450)
ganga1980 Oct 1, 2020
e6dad83
Install CA certs from wireserver (#451)
rashmichandrashekar Oct 1, 2020
23397ed
grwehner/pv-volume-name-in-mdm (#452)
gracewehner Oct 1, 2020
7562a96
Release changes for 10052020 release (#453)
vishiy Oct 5, 2020
4b47f44
Update onboarding_instructions.md (#456)
saaror Oct 12, 2020
3f86b23
chart update for sept2020 release (#457)
ganga1980 Oct 19, 2020
6203c3a
add missing version update in the script (#458)
ganga1980 Oct 19, 2020
5b15469
November release fixes - activate one agent, adx schema v2, win perf …
vishiy Oct 27, 2020
157ba20
remove hiphen for params in chart (#462)
vishiy Oct 28, 2020
7c448bc
Changes for cutting a new build for ciprod10272020 release (#460)
vishiy Oct 28, 2020
62b27d7
using latest stable version of msys2 (#465)
ganga1980 Oct 29, 2020
909cc16
fixing the windows-perf-dups (#466)
rashmichandrashekar Oct 29, 2020
d481c06
chart updates related to new microsoft/charts repo (#467)
ganga1980 Nov 6, 2020
aff1e13
Changes for creating 11092020 release (#468)
vishiy Nov 9, 2020
ca18850
MDM exception aggregation (#470)
rashmichandrashekar Nov 10, 2020
18c27dd
grwehner/mdm custom metric regions (#471)
gracewehner Nov 23, 2020
a5c12e9
updaitng rs limit to 1gb (#474)
rashmichandrashekar Dec 4, 2020
7453fd4
grwehner/pv inventory (#455)
gracewehner Dec 10, 2020
24b709f
Gangams/fix for build release pipeline issue (#476)
ganga1980 Dec 15, 2020
9061201
add pv fluentd plugin config to helm rs config (#477)
gracewehner Dec 15, 2020
064bc06
Gangams/fix rs ooming (#473)
ganga1980 Dec 16, 2020
9cb058c
Gangams/enable arc onboarding to ff (#478)
ganga1980 Dec 18, 2020
ef9d726
Convert PV type dictionary to json for telemetry so it shows up in lo…
gracewehner Jan 4, 2021
97bdb94
fix 2 windows tasks - 1) Dont log to termination log 2) enable ADX ro…
vishiy Jan 6, 2021
94237be
fix ci envvar collection in large pods (#483)
ganga1980 Jan 6, 2021
aacd496
grwehner/jan agent tasks (#481)
gracewehner Jan 7, 2021
148d739
updating fbit version and cpu limit (#485)
rashmichandrashekar Jan 8, 2021
bd33dd9
reverting to older version (#487)
rashmichandrashekar Jan 8, 2021
d5164d2
Gangams/add fbsettings configurable via configmap (#486)
ganga1980 Jan 11, 2021
908d9b0
Gangams/jan agent release tasks (#484)
ganga1980 Jan 11, 2021
8ede536
remove per container logs in ci (#488)
ganga1980 Jan 11, 2021
37e5218
updates for ciprod01112021 release (#489)
ganga1980 Jan 12, 2021
3c97af6
new yaml files (#491)
deagraw Jan 14, 2021
90e1a5b
Use cloud-specific instrumentation keys (#494)
daweim0 Jan 22, 2021
98b6d77
upgrade apt to latest version (#492)
ganga1980 Jan 22, 2021
ddcd3ee
Gangams/add support for extension msi for arc k8s cluster (#495)
ganga1980 Jan 27, 2021
0cd99e4
Gangams/arm template arc k8s extension (#496)
ganga1980 Jan 27, 2021
13521c5
Gangams/aks monitoring via policy (#497)
ganga1980 Feb 1, 2021
e4f36c7
revert to use operatingSystem from osImage for node os telemety (#498)
ganga1980 Feb 1, 2021
ec15ac1
Container log v2 schema changes (#499)
vishiy Feb 4, 2021
6031be8
Add priority class to the daemonsets (#500)
Michael-Sinz Feb 9, 2021
4212e1a
fix node metric issue (#502)
ganga1980 Feb 11, 2021
24644ce
Bug fixes for Feb release (#504)
rashmichandrashekar Feb 18, 2021
e56104c
Gangams/feb 2021 agent bug fix (#505)
ganga1980 Feb 23, 2021
e00b2aa
changes for release -ciprod02232021 (#506)
vishiy Feb 23, 2021
31f0e5f
Gangams/e2e test framework (#503)
ganga1980 Feb 23, 2021
91f954f
scrape new kubelet pod count metric name (#508)
gracewehner Feb 25, 2021
4a8ff23
Adding explicit json output to az commands as the script fails if az …
nyuen Mar 20, 2021
512e5c0
Gangams/arc proxy contract and token renewal updates (#511)
ganga1980 Mar 22, 2021
6b48b6a
doc updates for microsoft charts repo release (#512)
ganga1980 Mar 22, 2021
d93c680
Update enable-monitoring.sh (#514)
seenu433 Mar 23, 2021
4d386ce
Prometheus scraping from sidecar and OSM changes (#515)
rashmichandrashekar Mar 25, 2021
16936aa
add liveness timeout for exec (#518)
vishiy Mar 26, 2021
12964be
chart and other updates (#519)
rashmichandrashekar Mar 26, 2021
73548c0
Saaror osmdoc (#523)
saaror Apr 5, 2021
fea4ffa
telemetry bug fix (#527)
rashmichandrashekar Apr 6, 2021
e31cc87
Fix conflicting logrotate settings (#526)
gracewehner Apr 6, 2021
ca8fa12
bug fix (#528)
rashmichandrashekar Apr 6, 2021
1f6f6d2
Gangams/arc ev2 deployment (#522)
ganga1980 Apr 7, 2021
97678b6
added liveness and telemetry for telegraf (#517)
daweim0 Apr 9, 2021
63ea896
Windows metric fix (#530)
daweim0 Apr 13, 2021
42730a4
OSM doc update (#533)
rashmichandrashekar Apr 13, 2021
7ad52cd
Adding MDM metrics for threshold violation (#531)
rashmichandrashekar Apr 14, 2021
34d1f64
Rashmi/april agent 2021 (#538)
rashmichandrashekar Apr 21, 2021
fcc5048
add Read_from_Head config for all fluentbit tail plugins (#539)
gracewehner Apr 21, 2021
01e5529
fix programdata mount issue on containerd win nodes (#542)
ganga1980 Apr 22, 2021
b5d074a
Update sidecar mem limits (#541)
rashmichandrashekar Apr 22, 2021
5feeb3e
David/release 4 22 2021 (#544)
daweim0 Apr 22, 2021
1b2da4a
1m, 1m, 1s by default (#543)
daweim0 Apr 23, 2021
83e5816
David/aad stage 1 release (#556)
daweim0 May 12, 2021
8beabe3
Update ReleaseNotes.md (#558)
ganga1980 May 13, 2021
3805f44
Add wait time for telegraf and also force mdm egress to use tls 1.2 (…
vishiy May 19, 2021
7c5087f
partially disabled telegraf liveness probe check, we'll still have te…
daweim0 May 19, 2021
0d33489
changes for 05202021 release (#563)
daweim0 May 20, 2021
486acfd
Rashmi/jedi wireserver (#566)
rashmichandrashekar May 21, 2021
0fa350e
Update ReadMe.md (#565)
saaror May 21, 2021
c707539
Gangams/aad stage2 full switch to mdsd (#559)
ganga1980 May 22, 2021
959b455
Send perf metrics to MDM from windows daemonset (#568)
rashmichandrashekar May 27, 2021
e4da519
updating json gem to address CVE-2020-10663 (#567)
daweim0 May 28, 2021
49486a8
update recommended alerts readme (#570)
daweim0 May 28, 2021
ef23fc6
trying again to fix the json gem (#571)
daweim0 May 28, 2021
cfa804a
Addressing PR comments for - https://github.com/microsoft/Docker-Prov…
rashmichandrashekar Jun 1, 2021
0d3e4a1
Mem_Buf_limit is configurable via ConfigMap (#574)
tsubasaxZZZ Jun 10, 2021
50b99ff
add log rotation settings for fluentd logs (#577)
ganga1980 Jun 11, 2021
4cebe73
Gangams/release 06112021 (#578)
ganga1980 Jun 11, 2021
adabaf9
release note update (#579)
ganga1980 Jun 11, 2021
0c70120
Make sidecar fluentbit chunk size configurable (#573)
rashmichandrashekar Jun 14, 2021
a7a2d73
Fix vulnerabilities (#583)
vishiy Jun 15, 2021
154c11d
Windows build optimization (#582)
rashmichandrashekar Jun 16, 2021
68e90b6
fix windows build failure due to msys2 version
vishiy Jun 23, 2021
cf68a4f
Fix telegraf startup issue when endpoint is unreachable (#587)
rashmichandrashekar Jun 23, 2021
cd22753
revert fbit tail plugins defaults to std defaults (#586)
ganga1980 Jun 23, 2021
8c41a42
fixed another bug (#593)
daweim0 Jul 1, 2021
00f1a0d
feat: add new metrics to MDM for allocatable % calculation of cpu and…
bragi92 Jul 9, 2021
e1f9978
update adx sdk for perf issue (#601)
vishiy Jul 12, 2021
c9ade1b
remove md check
vishiy Jul 13, 2021
6e2732e
Gangams/release notes update for hotfix (#596)
ganga1980 Jul 13, 2021
6df299f
Cherry picking hotfix changes to ci_dev (#605)
rashmichandrashekar Jul 14, 2021
3b38337
release changes (#607)
rashmichandrashekar Jul 15, 2021
bcea7fc
Gangams/aad stage3 msi auth (#585)
ganga1980 Jul 19, 2021
13eb3a6
Gangams/remove chart version dependency (#589)
ganga1980 Jul 20, 2021
63f22d9
Gangams/july 2021 release tasks 3 (#613)
ganga1980 Jul 23, 2021
902c939
remove un-used output plugin (#614)
vishiy Jul 23, 2021
a76905a
fix telegraf telemetry and improve fluentd liveness (#611)
ganga1980 Jul 23, 2021
52612b5
Gangams/july 2021 release tasks 2 (#612)
ganga1980 Jul 23, 2021
5b5d048
Fix out_oms.go dependency vulnerabilities (#623)
gracewehner Aug 13, 2021
2a0f4ec
revert libsystemd0 update (#616)
ganga1980 Aug 13, 2021
45f35ae
updates for ci-prod release instructions (#619)
ganga1980 Aug 13, 2021
10b2ea6
cherry pick changes from ci_prod (#622)
ganga1980 Aug 13, 2021
ad31c55
Support az login for passwords starting with dash ('-') (#626)
vladimir-babichev Aug 14, 2021
57beb59
Gangams/add telemetry fbit settings (#628)
ganga1980 Aug 17, 2021
cf4775a
check onboarding status (#629)
ganga1980 Aug 19, 2021
da55fe5
Gangams/arc k8s conformance test updates (#617)
ganga1980 Aug 19, 2021
e39b83b
upgrade golang version for windows in pipeline build and locally (#630)
gracewehner Aug 20, 2021
3a02a4f
Updating a link in Readme.md (#632)
daweim0 Aug 25, 2021
e56c74b
Updating omsagent yaml to have parity with omsagent yaml file in AKS …
rashmichandrashekar Aug 25, 2021
d2817cb
Unit test tooling (#625)
daweim0 Aug 27, 2021
32f958b
run unit tests after a merge too (#634)
daweim0 Aug 27, 2021
c4a3bbc
flag stale PRs & issues
vishiy Aug 31, 2021
beb7f42
Adding script to collect logs (for troubleshooting) (#636)
daweim0 Sep 1, 2021
01e8178
Sarah/ev2 (#640)
sarahpeiffer Sep 11, 2021
ef7cb89
documenting fbit tail plugin configmap settings. (#638)
daweim0 Sep 13, 2021
6b42f13
Install unzip package on shell extension (#642)
sarahpeiffer Sep 13, 2021
7ef07e1
Changing installation in ev2 script (#644)
sarahpeiffer Sep 14, 2021
a025ce7
Adjust release pipeline to use cdpx acr (#647)
sarahpeiffer Sep 21, 2021
c6bc993
Sarah/ev2 prod (#649)
sarahpeiffer Sep 22, 2021
5e37947
CDPX repo naming change (#652)
sarahpeiffer Sep 23, 2021
a36d8df
Sarah/ev2 update (#654)
sarahpeiffer Sep 27, 2021
fdc99f6
change tag syntax for mcr repo check (#655)
sarahpeiffer Sep 28, 2021
6292218
Gangams/optimize win livenessprobe (#653)
ganga1980 Sep 28, 2021
cfacf39
Gangams/addon token adapter image tag to telemetry (#656)
ganga1980 Sep 29, 2021
ae9ebd7
Sarah/ev2 helm (#658)
sarahpeiffer Sep 30, 2021
a6c6c4a
Sarah/ev2 pipeline (#661)
sarahpeiffer Oct 4, 2021
9e2df4d
add charts directory to build artifacts (#662)
sarahpeiffer Oct 4, 2021
f1d0e43
Sarah/remove cdpx creds (#664)
sarahpeiffer Oct 6, 2021
6ff747c
chart updates for rbac api version change (#660)
ganga1980 Oct 7, 2021
f77587a
proxy support (for non-aks) (#665)
daweim0 Oct 8, 2021
180f030
updates for the release ciprod10082021 and win-ciprod10082021
ganga1980 Oct 8, 2021
414b98a
updates for the release ciprod10082021 and win-ciprod10082021
ganga1980 Oct 8, 2021
03bdd54
updates for the release ciprod10082021 and win-ciprod10082021
ganga1980 Oct 8, 2021
e6ed365
updates for the release ciprod10082021 and win-ciprod10082021
ganga1980 Oct 8, 2021
5c1b039
merge changes from dev to prod for the oct2021 release
ganga1980 Oct 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
format: 'table'
severity: 'CRITICAL,HIGH'
vuln-type: 'os,library'
skip-dirs: 'opt/telegraf,usr/sbin/telegraf,opt/td-agent-bit/bin/out_oms.so'
skip-dirs: 'opt/telegraf,usr/sbin/telegraf'
exit-code: '1'
timeout: '5m0s'
WINDOWS-build:
Expand Down Expand Up @@ -94,4 +94,4 @@ jobs:
cd ./kubernetes/windows/ && docker build . --file Dockerfile -t $env:IMAGETAG --build-arg IMAGE_TAG=$env:IMAGETAG_TELEMETRY
- name: List-docker-images
run: docker images --digests --all

34 changes: 34 additions & 0 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run Unit Tests
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- ci_dev
- ci_prod
push:
branches:
- ci_dev
- ci_prod
jobs:
Golang-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Run unit tests
run: |
cd ${{ github.workspace }}
./test/unit-tests/run_go_tests.sh
Ruby-Tests:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: install fluent
run: |
sudo gem install fluentd -v "1.12.2" --no-document
sudo fluentd --setup ./fluent
- name: Run unit tests
run: |
cd ${{ github.workspace }}
./test/unit-tests/run_ruby_tests.sh
28 changes: 28 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 10 * * *"

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 7
days-before-pr-stale: 7
stale-issue-message: 'This issue is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 7 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-issue-message: 'This issue was closed because it has been stalled for 12 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 12 days with no activity.'
days-before-issue-close: 5
days-before-pr-close: 5
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ intermediate
kubernetes/linux/Linux_ULINUX_1.0_x64_64_Release
# ignore generated .h files for go
source/plugins/go/src/*.h
*_mock.go
*_log.txt
*.log
*.byebug_history
5 changes: 5 additions & 0 deletions .pipelines/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ echo "----------- Build Docker Provider -------------------------------"
make
cd $DIR

echo "------------ Bundle Shell Extension Scripts for Agent Release -------------------------"
cd $DIR/../deployment/agent-deployment/ServiceGroupRoot/Scripts
tar -czvf ../artifacts.tar.gz pushAgentToAcr.sh
cd $DIR

echo "------------ Bundle Shell Extension Scripts & HELM chart -------------------------"
cd $DIR/../deployment/arc-k8s-extension/ServiceGroupRoot/Scripts
tar -czvf ../artifacts.tar.gz ../../../../charts/azuremonitor-containers/ pushChartToAcr.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ build:
name: 'Build Docker Provider Shell Bundle'
command: '.pipelines/build-linux.sh'
fail_on_stderr: false
artifacts:
- from: 'deployment'
to: 'build'
include:
- '**'
- from: '.pipelines'
to: 'build'
include:
- '*.sh'
- from: 'kubernetes'
to: 'build'
include:
- '*.yaml'
- from: 'charts'
to: 'build'
include:
- '**'
- from: 'test/e2e'
to: 'build'
include:
- '*.yaml'

package:
commands:
Expand All @@ -40,5 +61,9 @@ package:
# to be named differently. Defaults to Dockerfile.
# In effect, the -f option value passed to docker build will be repository_checkout_folder/src/DockerFinal/Foo.dockerfile.
repository_name: 'cdpxlinux' # only supported ones are cdpx acr repos
tag: 'ciprod' # OPTIONAL: Defaults to latest. The tag for the built image. Final tag will be 1.0.0alpha, 1.0.0-timestamp-commitID.
tag: 'ciprod' # OPTIONAL: Defaults to latest. The tag for the built image. Final tag will be 1.0.0alpha, 1.0.0-timestamp-commitID.
latest: false # OPTIONAL: Defaults to false. If tag is not set to latest and this flag is set, then tag as latest as well and push latest as well.
publish_unique_tag: true # If set, the image in the registry is tagged with the unique tag generated by CDPx
metadata_file:
artifact_path: 'linux-image-meta.json' # If defined, the drop outputs relative path to the file into which JSON metadata about the created image is emitted.
export_to_artifact_path: 'agentimage.tar.gz' # path for exported image and use this instead of fixed tag
20 changes: 20 additions & 0 deletions .pipelines/pipeline.user.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,22 @@ build:
to: 'build'
include:
- '**'
- from: '.pipelines'
to: 'build'
include:
- '*.sh'
- from: 'kubernetes'
to: 'build'
include:
- '*.yaml'
- from: 'charts'
to: 'build'
include:
- '**'
- from: 'test/e2e'
to: 'build'
include:
- '*.yaml'

package:
commands:
Expand All @@ -47,3 +63,7 @@ package:
repository_name: 'cdpxlinux' # only supported ones are cdpx acr repos
tag: 'cidev' # OPTIONAL: Defaults to latest. The tag for the built image. Final tag will be 1.0.0alpha, 1.0.0-timestamp-commitID.
latest: false # OPTIONAL: Defaults to false. If tag is not set to latest and this flag is set, then tag as latest as well and push latest as well.
publish_unique_tag: true # If set, the image in the registry is tagged with the unique tag generated by CDPx
metadata_file:
artifact_path: 'linux-image-meta.json' # If defined, the drop outputs relative path to the file into which JSON metadata about the created image is emitted.
export_to_artifact_path: 'agentimage.tar.gz' # path for exported image and use this instead of fixed tag
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
version: '2019'
runtime:
provider: 'appcontainer'
image: 'cdpxwin1809.azurecr.io/user/azure-monitor/container-insights:6.0'
image: 'cdpxwin1809.azurecr.io/user/azure-monitor/container-insights:latest'
source_mode: 'map'

version:
Expand Down Expand Up @@ -53,3 +53,7 @@ package:
repository_name: 'cdpxwin1809' # only supported ones are cdpx acr repos
tag: 'win-ciprod' # OPTIONAL: Defaults to latest. The tag for the built image. Final tag will be 1.0.0alpha, 1.0.0-timestamp-commitID.
latest: false # OPTIONAL: Defaults to false. If tag is not set to latest and this flag is set, then tag as latest as well and push latest as well.
publish_unique_tag: true # If set, the image in the registry is tagged with the unique tag generated by CDPx
metadata_file:
artifact_path: 'windows-image-meta.json' # If defined, the drop outputs relative path to the file into which JSON metadata about the created image is emitted.
export_to_artifact_path: 'agentimage.tar.zip' # path for exported image and use this instead of fixed tag
6 changes: 5 additions & 1 deletion .pipelines/pipeline.user.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
version: '2019'
runtime:
provider: 'appcontainer'
image: 'cdpxwin1809.azurecr.io/user/azure-monitor/container-insights:6.0'
image: 'cdpxwin1809.azurecr.io/user/azure-monitor/container-insights:latest'
source_mode: 'map'

version:
Expand Down Expand Up @@ -53,3 +53,7 @@ package:
repository_name: 'cdpxwin1809' # only supported ones are cdpx acr repos
tag: 'win-cidev' # OPTIONAL: Defaults to latest. The tag for the built image. Final tag will be 1.0.0alpha, 1.0.0-timestamp-commitID.
latest: false # OPTIONAL: Defaults to false. If tag is not set to latest and this flag is set, then tag as latest as well and push latest as well.
publish_unique_tag: true # If set, the image in the registry is tagged with the unique tag generated by CDPx
metadata_file:
artifact_path: 'windows-image-meta.json' # If defined, the drop outputs relative path to the file into which JSON metadata about the created image is emitted.
export_to_artifact_path: 'agentimage.tar.zip' # path for exported image and use this instead of fixed tag
74 changes: 74 additions & 0 deletions .pipelines/release-agent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/bin/bash

# Note - This script used in the pipeline as inline script

# These are plain pipeline variable which can be modified anyone in the team
# AGENT_RELEASE=cidev
# AGENT_IMAGE_TAG_SUFFIX=07222021

#Name of the ACR for ciprod & cidev images
ACR_NAME=containerinsightsprod.azurecr.io
AGENT_IMAGE_FULL_PATH=${ACR_NAME}/public/azuremonitor/containerinsights/${AGENT_RELEASE}:${AGENT_RELEASE}${AGENT_IMAGE_TAG_SUFFIX}
AGENT_IMAGE_TAR_FILE_NAME=agentimage.tar.gz

if [ -z $AGENT_IMAGE_TAG_SUFFIX ]; then
echo "-e error value of AGENT_RELEASE variable shouldnt be empty"
exit 1
fi

if [ -z $AGENT_RELEASE ]; then
echo "-e error AGENT_RELEASE shouldnt be empty"
exit 1
fi

echo "ACR NAME - ${ACR_NAME}"
echo "AGENT RELEASE - ${AGENT_RELEASE}"
echo "AGENT IMAGE TAG SUFFIX - ${AGENT_IMAGE_TAG_SUFFIX}"
echo "AGENT IMAGE FULL PATH - ${AGENT_IMAGE_FULL_PATH}"
echo "AGENT IMAGE TAR FILE PATH - ${AGENT_IMAGE_TAR_FILE_NAME}"

echo "loading linuxagent image tarball"
IMAGE_NAME=$(docker load -i ${AGENT_IMAGE_TAR_FILE_NAME})
echo IMAGE_NAME: $IMAGE_NAME
if [ $? -ne 0 ]; then
echo "-e error, on loading linux agent tarball from ${AGENT_IMAGE_TAR_FILE_NAME}"
echo "** Please check if this caused due to build error **"
exit 1
else
echo "successfully loaded linux agent image tarball"
fi
# IMAGE_ID=$(docker images $IMAGE_NAME | awk '{print $3 }' | tail -1)
# echo "Image Id is : ${IMAGE_ID}"
prefix="Loadedimage:"
IMAGE_NAME=$(echo $IMAGE_NAME | tr -d '"' | tr -d "[:space:]")
IMAGE_NAME=${IMAGE_NAME/#$prefix}
echo "*** trimmed image name-:${IMAGE_NAME}"
echo "tagging the image $IMAGE_NAME as ${AGENT_IMAGE_FULL_PATH}"
# docker tag $IMAGE_NAME ${AGENT_IMAGE_FULL_PATH}
docker tag $IMAGE_NAME $AGENT_IMAGE_FULL_PATH

if [ $? -ne 0 ]; then
echo "-e error tagging the image $IMAGE_NAME as ${AGENT_IMAGE_FULL_PATH}"
exit 1
else
echo "successfully tagged the image $IMAGE_NAME as ${AGENT_IMAGE_FULL_PATH}"
fi

# used pipeline identity to push the image to ciprod acr
echo "logging to acr: ${ACR_NAME}"
az acr login --name ${ACR_NAME}
if [ $? -ne 0 ]; then
echo "-e error log into acr failed: ${ACR_NAME}"
exit 1
else
echo "successfully logged into acr:${ACR_NAME}"
fi

echo "pushing ${AGENT_IMAGE_FULL_PATH}"
docker push ${AGENT_IMAGE_FULL_PATH}
if [ $? -ne 0 ]; then
echo "-e error on pushing the image ${AGENT_IMAGE_FULL_PATH}"
exit 1
else
echo "Successfully pushed the image ${AGENT_IMAGE_FULL_PATH}"
fi
Loading