fix: build secrets for apps

This commit is contained in:
Andras Bacsai 2022-09-10 07:14:30 +00:00
parent d6d3fb46cc
commit bc66b98176
3 changed files with 2 additions and 3 deletions

View File

@ -556,7 +556,6 @@ export function checkPnpm(installCommand = null, buildCommand = null, startComma
);
}
export async function buildImage({
applicationId,
tag,
@ -677,8 +676,6 @@ export async function buildCacheImageWithNode(data, imageForBuild) {
secrets,
pullmergeRequestId
} = data;
const isPnpm = checkPnpm(installCommand, buildCommand);
const Dockerfile: Array<string> = [];
Dockerfile.push(`FROM ${imageForBuild}`);

View File

@ -28,6 +28,7 @@ export default async function (data) {
if (secrets.length > 0) {
secrets.forEach((secret) => {
if (secret.isBuildSecret) {
// TODO: fix secrets
if (
(pullmergeRequestId && secret.isPRMRSecret) ||
(!pullmergeRequestId && !secret.isPRMRSecret)

View File

@ -22,6 +22,7 @@ const createDockerfile = async (data, image): Promise<void> => {
if (secrets.length > 0) {
secrets.forEach((secret) => {
if (secret.isBuildSecret) {
console.log(secret)
if (pullmergeRequestId) {
const isSecretFound = secrets.filter(s => s.name === secret.name && s.isPRMRSecret)
if (isSecretFound.length > 0) {