Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ab5e9cb30 | |||
| 95c1145bf5 | |||
| ea04a1b788 | |||
| 3bc2499d09 | |||
| 1f5967ac45 | |||
| fd952f086b | |||
| 79500cb2c2 | |||
| 6c58864fcf | |||
| 7ea3ac182d | |||
| 8979d26005 | |||
| c8876dac88 | |||
| 9c8a257c2a | |||
| 8b77930ece | |||
| ba672d030f | |||
| 8ad7e016e7 | |||
| d843311d7b | |||
| 14ef2cfa9b | |||
| 648effcf86 |
@@ -18,6 +18,7 @@ stages:
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npm install -g @shipzone/npmci
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- docker
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shipzone/npmci",
|
||||
"version": "3.1.46",
|
||||
"version": "3.1.56",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@shipzone/npmci",
|
||||
"version": "3.1.46",
|
||||
"version": "3.1.56",
|
||||
"private": false,
|
||||
"description": "node and docker in gitlab ci on steroids",
|
||||
"main": "dist/index.js",
|
||||
@@ -9,8 +9,8 @@
|
||||
"npmci": "cli.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "(rm -f config.json) && tstest test/",
|
||||
"build": "(rm -f config.json) && tsbuild && (npm run testVersion)",
|
||||
"test": "tstest test/",
|
||||
"build": "tsbuild && (npm run testVersion)",
|
||||
"testVersion": "(cd test/assets/ && node ../../cli.js -v)"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -269,11 +269,10 @@ export class Dockerfile {
|
||||
);
|
||||
await bash(`docker tag ${this.buildTag} ${this.pushTag}`);
|
||||
await bash(`docker push ${this.pushTag}`);
|
||||
console.log('you can get the digest using this command');
|
||||
console.log(`docker inspect --format='{{index .RepoDigests 0}}' ${this.pushTag}`);
|
||||
/* const imageDigest = (await bash(
|
||||
`docker inspect --format='{{index .RepoDigests 0}}' ${pushTag}`
|
||||
)).split('@')[1]; */
|
||||
const imageDigest = (await bash(
|
||||
`docker inspect --format="{{index .RepoDigests 0}}" ${this.pushTag}`
|
||||
)).split('@')[1];
|
||||
console.log(`The image ${this.pushTag} has digest ${imageDigest}`);
|
||||
await this.npmciDockerManagerRef.npmciRef.cloudlyConnector.announceDockerContainer({
|
||||
dockerImageUrl: this.pushTag,
|
||||
dockerImageVersion: this.npmciDockerManagerRef.npmciRef.npmciConfig.getConfig().projectInfo
|
||||
|
||||
@@ -32,7 +32,7 @@ export class NpmciGitManager {
|
||||
public mirror = async () => {
|
||||
const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
|
||||
const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || this.npmciRef.npmciEnv.repo.user;
|
||||
const githubRepo = process.env.NPMCI_GIT_GITHUB || this.npmciRef.npmciEnv.repo;
|
||||
const githubRepo = process.env.NPMCI_GIT_GITHUB || this.npmciRef.npmciEnv.repo.repo;
|
||||
if (
|
||||
this.npmciRef.npmciConfig.getConfig().projectInfo.npm.packageJson.private === true ||
|
||||
this.npmciRef.npmciConfig.getConfig().npmAccessLevel === 'private'
|
||||
|
||||
Reference in New Issue
Block a user